Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support center-oriented scroll/double-click zoom #1939

Merged
merged 1 commit into from
Aug 6, 2013

Conversation

jfirebaugh
Copy link
Member

This is needed for new share features on openstreetmap.org -- when the "Include marker" option is checked, the marker needs to be kept centered within the map, so zooming should temporarily be relative to the center, not to the current cursor location.

Some users have requested restoring the 0.5.x behavior for double-click zoom full-time. We don't have plans to do that, but this gives other Leaflet users that option.

I chose overloading a single configuration option rather than creating a new one because I anticipate we might want another mutually exclusive variant in the future -- zoom relative to an arbitrary LatLng. For example, Google Maps classic does this when you've clicked a POI.

@mourner
Copy link
Member

mourner commented Aug 6, 2013

Yep, will merge. cc @tomhughes

mourner added a commit that referenced this pull request Aug 6, 2013
Support center-oriented scroll/double-click zoom
@mourner mourner merged commit 8611e22 into Leaflet:master Aug 6, 2013
@mourner
Copy link
Member

mourner commented Aug 6, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants