Refactor discrete zooming into delayed continous zooming
See original GitHub issueThe discrete zooming capabilities could be improved significantly. The problems with apple’s magic mouse (#4410) and smooth-scrolling touchpads are becoming greater; the scrollwheel events have a time delay right now; and other map libraries allow for keeping the zoom buttons pressed for a smooth zooming effect.
IMHO, all the zooming handlers should rely on the same method: L.Map._move
, the one that Map.Handler.TouchZoom
uses right now. Ideally this would allow for better zoom snapping and a scroll-zooming with faster UI response.
The idea is to make a scroll-zoom interaction the same as a touch-zoom interaction: when it starts, fire a zoomstart
, fire zoom
on each wheel
event, and fire zoomend
(and snap) after the wheelDebounceTime
timeout.
Similar approach for keyboard or L.Control.Zoom
: fire zoomstart
on keydown
/mousedown
, fire zoom
every frame, then zoomend
(and snap) on keyup
/mouseup
.
Unless the Safari issue is very pressing, this can be pushed back into the queue.
See also #4610
Issue Analytics
- State:
- Created 7 years ago
- Reactions:37
- Comments:10 (5 by maintainers)
Top GitHub Comments
Hey there, any plans to work on this?
Also, can anybody share a good smooth scrolling configuration (or link to one)? (one like Google maps is probably what we all want)
@AndreasAtakan thank you for sharing. This is a nice plugin.