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

Mobile functionality / Enable only while hovering over the specific canvas #4

Open
marianssen opened this issue Dec 6, 2021 · 1 comment

Comments

@marianssen
Copy link

Hi!

I really love your plugin, and I'm trying to implement it a a full website with other content as well. Desktop version works just fine, since the user can easily scroll. However, on mobile, the scroll is over-ridden by the javascript, so the user is not able to scroll the website at all.

My question is - what do you think would be the easiest way to fix this? Would it be possible to track the mouse position only inside a certain div?

@marianssen
Copy link
Author

Nevermind, I got it working by changing the window parameter in lines:

window.addEventListener("touchstart", updateMouse, false);
window.addEventListener("touchmove", updateMouse, { passive: false });
window.addEventListener("mousemove", updateMouse, false);

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

1 participant