-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map pans at incorrect speed while pinching #10657
Comments
I dove a bit into the code behind this bug and found that it is caused by If you are at a low zoom level, zoom in, and then pan left without ending the drag event, the map will pan as if you're still at the low zoom level (which will be very fast as can be seen in the video of @rreusser). If we change r499 from: if (eventStarted("drag") && around) { to: if ((eventStarted("drag") || zoomDelta) && around) { the problem is solved, effectively resetting the dragOrigin not only on drag start, but also when there is a delta in the zoom level. I haven't looked into other (performance) side effects this code change potentially creates. See this as a little help to fix the bug. (Line numbers are based on the latest release by time of writing: v2.6.1) |
Any progress on this issue? |
mapbox-gl-js version: v2.2.0
browser: iOS Safari on iOS 12.5.1
Steps to Trigger Behavior
IMG_0016.mp4
Expected Behavior
Map pans at the same speed as centroid of pinch gesture
Actual Behavior
Order of operations (pinch vs. zoom) is perhaps reversed and map panning does not take into account zoom which has occurred since the start of the gesture.
The text was updated successfully, but these errors were encountered: