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

OrbitControl: Fixed rotation toggle in KeyDown handler #29834

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

i3ene
Copy link

@i3ene i3ene commented Nov 7, 2024

Implemented the toggle via enableRotate also on _handleKeyDown. The previous behaviour seemed unexpected, allowing rotation via keys, even when rotating should be disabled if enableRotate was set to false.

Description

The previous implementation of _handleKeyDown did not take the enableRotate state into account. This seemed unexpected when enableRotate was set to false, but rotation was still possible with key events.
This commit guards the rotation of the keydown event additionally with the already available enableRotate variable and makes it more intuitive in its behavior again.

Implemented the toggle via `enableRotate` also on `_handleKeyDown`. The previous behaviour seemed unexpected, allowing rotation via keys, even when rotating should be disabled if `enableRotate` was set to `false`.
@i3ene i3ene changed the title Fixed rotation toggle in KeyDown handler OrbitControl: Fixed rotation toggle in KeyDown handler Nov 7, 2024
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.

1 participant