Closed wiseman closed 11 years ago
fixed by d5612466a
Annoyingly, it looks like scroll wheel zoom is handled differently from touch pinch/pull zoom--this change fixes the former but not the latter. At least it also fixes emulated scroll wheel zooms like the two-finger scroll on Mac trackpads/magic mice!
It looks like we could subclass L.Map.TouchZoom
and override its _getScaleOrigin
method to fix touch zooms.
I don't feel comfortable subclassing (don't really understand how in JS, and usually regret it in general) but I'll make a similar fix as I did for the scroll wheel handler.
On Tue, Jan 1, 2013 at 3:19 PM, John Wiseman notifications@github.comwrote:
It looks like we could subclass L.Map.TouchZoom and override its _getScaleOrigin method to fix touch zooms.
— Reply to this email directly or view it on GitHubhttps://github.com/wiseman/mavelous/issues/40#issuecomment-11797278.
I got it to stay centered as a result of pinch zooming, but during the zoom, the animation still pans it. This is annoying and I'm not sure if I'm just missing something simple...
If I zoom while the app is in map-follows-vehicle mode, the zooming happens with the touch/mouse location as the center, then when zooming is complete the map pans to center the vehicle icon. It should instead zoom with the vehicle icon as the center.