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

Update onMouseWheel listener #91

Merged
merged 1 commit into from
Apr 5, 2020
Merged

Update onMouseWheel listener #91

merged 1 commit into from
Apr 5, 2020

Conversation

jeanremy
Copy link
Contributor

@jeanremy jeanremy commented Apr 3, 2020

Hi,

I was trying to remove the listener on the wheel, because sometimes the canvas is just a part of the page. While it works well when ACTION.NONE is specified, it just blocks the scroll when you are on top of the canvas (because of the e.preventDefault). So before entering the function, we can just check if controls are enabled and if the user config is not NONE.
I'm not very familiar with TypeScript, I hope this change is acceptable.

Thank for your job by the way !

If user specify ACTION NONE, return
@yomotsu
Copy link
Owner

yomotsu commented Apr 5, 2020

Thanks for your contribution!
That makes sense!

@yomotsu yomotsu merged commit 5a0bb05 into yomotsu:dev Apr 5, 2020
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

Successfully merging this pull request may close these issues.

2 participants