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

Zoom event with key shift #1334

Closed
6vvvvvv opened this issue Sep 2, 2021 · 3 comments
Closed

Zoom event with key shift #1334

6vvvvvv opened this issue Sep 2, 2021 · 3 comments

Comments

@6vvvvvv
Copy link

6vvvvvv commented Sep 2, 2021

Is there a way that zoom in or zoom out event only happens when we have mousewheel + key shift?

I have set passive = true and the scroll event works fine but when I have onWheel=zoom.handleWheel, the zoom and scroll event happen at the same time.

image
image
2021-09-02-16-29-10

Thanks for helping to solve this problem.

@williaster
Copy link
Collaborator

hey @6vvvvvv which version of @visx/zoom are you using? this may have been fixed in the 2.0.0 release (the scroll + zoom simultaneously) as it was reimplemented using useGesture in #1305.

@jithureddy
Copy link

jithureddy commented Apr 21, 2023

Hey @6vvvvvv I am also starting to work on some complex hierarchical view. So did you consider foriegnObject for each tree node ? Thanks

@6vvvvvv
Copy link
Author

6vvvvvv commented Apr 21, 2023

@jithureddy
Yes. And it works as expected for a long time.

@6vvvvvv 6vvvvvv closed this as completed Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants