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

Disable mouse scroll zoom #21

Open
amhep opened this issue Apr 5, 2022 · 1 comment
Open

Disable mouse scroll zoom #21

amhep opened this issue Apr 5, 2022 · 1 comment

Comments

@amhep
Copy link

amhep commented Apr 5, 2022

When you use mouse scroll to navigate the page while your mouse is over the turntable, the image zooms in an undesirable way. Is there a way to disable zoom on mouse scroll?

@koushayeganeh
Copy link

try this: it worked for me:
replace container360 with the id that you gave to your threesixty component

useEffect(() => {
const container = document.getElementById("container360");
container.addEventListener("wheel", (event) => {
event.stopPropagation();
});
return () => {
container.removeEventListener("wheel", (event) => {
event.stopPropagation();
});
};
}, []);

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