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

Updates the Mouse Wheel to allow for more than 1 axis #696

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

hobnob
Copy link
Member

@hobnob hobnob commented Feb 22, 2024

The mouse wheel event previously had an amount property, which represented the movement on the Y axis of a mouse wheel (the up/down motion). However, many devices support more than 1 axis (such as side scrolling), and so this is now represented by the properties deltaX, deltaY, and deltaZ.

The 2 parameter constructor and deconstructor remain the same (assigning the amount to the deltaY), and so the tests for this remain the same.

This is, however, a breaking change, with anyone who currently uses the amount property needing to change that accessor to deltaY.

The mouse wheel event previously had an `amount` property, which represented
the movement on the Y axis of a mouse wheel (the up/down motion). However,
many devices support more than 1 axis (such as side scrolling), and so
this is now represented by the properties `deltaX`, `deltaY`, and `deltaZ`.

The 2 parameter constructor and deconstructor remain the same (assigning
the `amount` to the `deltaY`), and so the tests for this remain the same.

This is, however, a breaking change, with anyone who currently uses the
`amount` property needing to change that accessor to `deltaY`.
Copy link
Member

@davesmith00000 davesmith00000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @hobnob! 👍

@davesmith00000 davesmith00000 merged commit fd436d5 into main Feb 23, 2024
2 checks passed
@davesmith00000 davesmith00000 deleted the features/mouseWheel branch February 23, 2024 15:32
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