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

Allow zooming to content instantly (without animation) #180

Open
dominic-simplan opened this issue Apr 30, 2018 · 2 comments
Open

Allow zooming to content instantly (without animation) #180

dominic-simplan opened this issue Apr 30, 2018 · 2 comments

Comments

@dominic-simplan
Copy link

Currently, there is a default animation duration applied whenever the map it zoomed to show it's content using zoomToContent(). I would like to instantly show the content, without the zooming animation.

Only possiblity I currently see is to implement the zoom/pan options of the leaflet library in the vaadin addon. But maybe there is some other way as well?

@mstahv
Copy link
Owner

mstahv commented Jul 5, 2018

Hi, you can enable/disable the default for animation simply using

leafletMap.setCustomInitOption("zoomAnimation", false);

I prototyped (in a branch feature/zoom-pan-animation with something more advanced, but that would add quite a lot complexity, of which I'm not sure that it is needed by too many users.

@mstahv
Copy link
Owner

mstahv commented Jul 5, 2018

Let me know if the customInitOption is enough for you!

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

No branches or pull requests

2 participants