mapbox / mapbox-gl-draw

Draw tools for mapbox-gl-js
https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
ISC License
942 stars 590 forks source link

Mapbox gl draw control starts drawing onmouseenter #911

Closed shobishani closed 4 years ago

shobishani commented 5 years ago

mapbox-gl-js version: @latest mapbox-gl-draw version: @latest

Expected Behavior

I add the draw control on map init and I have custom button for multiple draw types. Rectangle, Free Polygon. so in DEV environment drawing works completely fine and perfect. In dev recorded video https://drive.google.com/file/d/1m1TEqQMjOgdDvFxk2HRihJMmuqLZX5WS/view

Actual Behavior after build

When I create build in react it does not behave correct. after building project DrawControl starts drawing on mouseover automatically but it should start drawing on Click and end drawing on click. In build it starts on mouseenter and automatically stops while the cursor is on the map. If you need any. This is current behavior after build. https://drive.google.com/file/d/1aH0G7bcU9fP3g6-o1l0n782fZzyu5w/view

Please tell me if you need anything else to help me. Thanks.

kkaefer commented 4 years ago

duplicate of #910