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

Zoom in with the mouse wheel moves the map center if near antimeridian

Open stepankuzmin opened this issue 2 years ago • 5 comments

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

stepankuzmin avatar May 19 '22 15:05 stepankuzmin

Related to #11866

avpeery avatar May 19 '22 16:05 avpeery

@stepankuzmin @avpeery any update on this? cc: @linsd75

erinc35 avatar Jun 16 '22 16:06 erinc35

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.

erinc35 avatar Jun 21 '22 19:06 erinc35

@stepankuzmin @avpeery are we able to estimate any timeline for this issue? cc @linsd75

erinc35 avatar Aug 01 '22 04:08 erinc35

Hey @erinc35,

Sorry for the delayed response. I'll update you on this after the planning this week.

stepankuzmin avatar Aug 09 '22 09:08 stepankuzmin

any update is appreciated @stepankuzmin

erinc35 avatar Aug 15 '22 16:08 erinc35

Hey @erinc35,

We picked up that issue in our Sprint Backlog, so we plan to work on this.

stepankuzmin avatar Aug 15 '22 17:08 stepankuzmin

@stepankuzmin can I get some update on this please?

erinc35 avatar Sep 02 '22 20:09 erinc35