Open nipsufn opened 1 year ago
Hi @nipsufn, i couldn't reproduce this. This could just as well be an issue with the mouse you are using, or its settings.
Could you maybe verify this doesn't happen in other programs as well? (e.g. normal website scrolling, word documents etc.)
It does not happen in other map apps (Google Maps, Mapy CZ).
I did some more digging, it appears that zoom levels are skipped when wheelDelta
on wheel
event is bigger than few tens.
Looks like Leaflet's code is responsible https://github.com/Leaflet/Leaflet/blob/3db042fcef041c269d489c3bf3e766df4a8771c5/src/map/handler/Map.ScrollWheelZoom.js#L61, and that upstream is aware of the issue but not very active: https://github.com/Leaflet/Leaflet/issues/8652, https://github.com/Leaflet/Leaflet/issues/4696.
Latter issue contains some code that could be used to override default behavior and a Leaflet plugin adjusting how zoom works.
With Leaflet being wrapped in Vue, I'm afraid this is a bit over my head to open a PR myself.
Using mouse scroll wheel yields inconsistent results, usually zooming in/out by 2 levels, but sometimes by 1. Appears to affect both Chromium and Firefox desktop browsers.