cesium
cesium copied to clipboard
Cesium interaction state is stuck in "rotating" state after mouse up
What happened?
I have some logic in my app that involve the combination of CameraEventType.LEFT_DRAG
and KeyboardEventModifier.ALT
. I am running into an issue where even after I complete the CameraEventType.LEFT_DRAG
event, the controls seem to be stuck in a "rotating" state".
Reproduction steps
On the base Sandcastle example:
- Use
LEFT_DRAG
to start rotating the globe by left clicking and dragging the globe - While still holding down the left mouse button, hold down the
ALT
modifier -- the globe should stop responding to your mouse movement - Release the left mouse button to complete the
LEFT_DRAG
event while still holding theALT
modifier - Release the
ALT
modifier and attempt to move the mouse -- the camera is still in a "rotating" state
Sandcastle example
https://sandcastle.cesium.com/
Environment
Browser: Chrome 122 CesiumJS Version: CesiumJS 1.115 Operating System: Windows 10
Further Questions:
- Is this a bug or intended?
- Is there a way to disable
ALT
preventing camera rotation (See Reproduction Steps - Step 2) - Is there a workaround to "clear the rotating state forcefully"?
Thanks for the report @easternmotors. I do this this is a bug and that ScreenSpaceCameraController
does not account for this specific scenario.
In the meantime you can adjust the event types (including those with the modifier ALT
key) which allow the user to rotate the globe.
Thanks @ggetz! I tried changing the event types before creating this ticket to see if that would work but I could never get it working. This is what I tried which I think you were describing as a possible workaround but I am still seeing the same issue:
https://sandcastle.cesium.com/#c=jZDBSsQwEIZfZehphSXFq7bFpa4erAhu8WJF0nRWg2lSJmmXKr67SesuonvwMjD5v2/CjDDaOhgk7pAgBY07yNHKvmUP09uiisTU50Y7LjVSFZ2cV3o2mBWo0VdC1JuOC8x5i8QDTEYpT5Bx3OF6QO3KsUObwmOlYf/JjB9SVqyvyufL+9X1MkAfoQDgPj77nwbQmkZuJdJBuMGxNpyaSbn9TtmqKCfhs9JPfqdoGSXWjQqzeQrAhWw7Qw56UgvGYodtp/w2Nq578YaOCWvDMQKaxD/VpJEDyCY9cj0Qilvrk22v1Ea+YxVlSez5P6oyvJH65W5AUnwM2OtpVsyPjLEk9u1x0xmjak6/Jn8B
#11903
This was fixed with #12073