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

Question about smooth zoom #35

Open
zilch42 opened this issue Sep 4, 2024 · 3 comments
Open

Question about smooth zoom #35

zilch42 opened this issue Sep 4, 2024 · 3 comments

Comments

@zilch42
Copy link

zilch42 commented Sep 4, 2024

Hi there, so I've noticed that the animations of the interactive plots on the documentation site show smooth transitions between zoom levels, which looks great, however when I use the live example plots on the documentation website, as well as with interactive plots I have generated myself in jupyter notebook, the zoom is stepped rather than smooth. Is there anything specific I can do to get the smooth zoom transitions back?

Zoom.mp4
@lmcinnes
Copy link
Contributor

lmcinnes commented Sep 4, 2024

I can't say for sure, as I don't know your system, but one possibility is that you are zooming by using the scrollwheel on a mouse. This results in a scroll working in increments which results in stepped zooming. I have a mouse that has a free scrolling wheel which is smoother (than when I have it in stepped scrolling mode). The videos were created on a laptop with a trackpad that allows for smooth scrolling -- any touch based device (potentially using pinch-to-zoom) should also work.

@lmcinnes
Copy link
Contributor

lmcinnes commented Sep 4, 2024

After some digging it turns out that deck.gl actually supports a smooth zoom option even for mousewheels. You can test this by editing the generated HTML and adding:

controller: { scrollZoom: {speed: 0.01, smooth: true } },

in place of the line:

controller: true,

I'll do some testing to ensure this will all work in general and then hopefully amend the code to support this generally.

@zilch42
Copy link
Author

zilch42 commented Sep 4, 2024

Thanks! controller: { scrollZoom: {speed: 0.01, smooth: true } }, worked for me!

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