Skip to content

Conversation

@trygveaa
Copy link

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

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.

Fixes mapbox#962
@karimnaaji karimnaaji closed this Jun 16, 2020
@karimnaaji karimnaaji reopened this Jun 16, 2020
@arindam1993 arindam1993 changed the base branch from master to main June 17, 2020 01:23
@underbluewaters
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When plugin enable there is a significant delay when initiating zoom with 2 finger pinch on mobile devices

4 participants