mapbox-gl-draw icon indicating copy to clipboard operation
mapbox-gl-draw copied to clipboard

Don't call onDrag when multiple fingers are touching the map

Open trygveaa opened this issue 5 years ago • 1 comments

Calling onDrag when multiple fingers are touching the map causes a delay when you start pinch zooming. This is because the pinch is interpreted as a tap in the beginning, which causes stopPropagation to be called.

I think dragging is an action you only do with one finger, so therefore I think not calling onDrag is the correct solution to this.

I'm not sure how to test this, as I haven't figured out how to check if events are called. Are there any existing tests doing such checks?

Fixes #962

trygveaa avatar Mar 20 '20 15:03 trygveaa

I've used this approach in my own fork to avoid wrecking a shape that's in direct_select mode while pinch-zooming on a mobile device. I'm finding editing on mobile to be pretty impossible without that change.

underbluewaters avatar Dec 01 '21 23:12 underbluewaters