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

Why wheelDeltaY field is undefined in event object in wheel event handler? #462

Open
RhapsodY-69 opened this issue Sep 11, 2023 · 1 comment

Comments

@RhapsodY-69
Copy link

I need to distinguish whether user is moving viewport with mouse or touchpad, but it seems the only one solution for this is to use wheelDeltaY, however i can't find it in WheelEvent pixi-viewport fires

@blnvdanil
Copy link
Contributor

Are you listening the wheel event this way viewport.on("wheel", (e) => console.log(e))? If you are, then you should check out the documentation of Federated Events system of pixijs, this event if not special to viewport. I suppose that e.nativeEvent is what you are looking for in this case.

Viewport does not listen this event by the way, what viewport does is it attaches wheel event listener to the cavnas, that way it has an original WheelEvent of the browser.

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