mapbox-gl-js
mapbox-gl-js copied to clipboard
Zoom in with the mouse wheel moves the map center if near antimeridian
If the map is zoomed out to the maximum value and the center is near antimeridian, then if the mouse cursor is positioned on one of the points on the map closer to the left or right side, then when zooming in (with an actual mouse wheel), the map will automatically scroll to one of the sides.
This is probably related to how we are handling mouse vs trackpad wheel events. E.g., the trackpad is not affected by this, as well as if you scroll slowly with the mouse wheel.
This is a regression after we started always wrapping the center coordinate to the range [-180, 180]
.
https://github.com/mapbox/mapbox-gl-js/blob/a505e03fb837b423902bab2a987bc5ff1c68debb/src/geo/transform.js#L1824-L1825
Original issue from https://github.com/mapbox-collab/earth2-collab/issues/17
https://user-images.githubusercontent.com/533564/169334784-652b3555-231e-4aab-b8a0-0a63235867ca.mov
Related to #11866
@stepankuzmin @avpeery any update on this? cc: @linsd75
Customer reached out again. @stepankuzmin @avpeery
Because a lot of users are using a conventional mousewheel to adjust the zoom level on the map, there should be no issues when trying to locate their destination on the map. With this issue occuring - we have many user complaining that it lowers their overall enjoyment purchasing tiles on E2.
A fix/update for a Q3 release is highly appreciated.
@stepankuzmin @avpeery are we able to estimate any timeline for this issue? cc @linsd75
Hey @erinc35,
Sorry for the delayed response. I'll update you on this after the planning this week.
any update is appreciated @stepankuzmin
Hey @erinc35,
We picked up that issue in our Sprint Backlog, so we plan to work on this.
@stepankuzmin can I get some update on this please?