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

Cesium interaction state is stuck in "rotating" state after mouse up #11889

Open
easternmotors opened this issue Mar 19, 2024 · 4 comments
Open

Comments

@easternmotors
Copy link
Contributor

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:

  1. Use LEFT_DRAG to start rotating the globe by left clicking and dragging the globe
  2. While still holding down the left mouse button, hold down the ALT modifier -- the globe should stop responding to your mouse movement
  3. Release the left mouse button to complete the LEFT_DRAG event while still holding the ALT modifier
  4. 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

@easternmotors
Copy link
Contributor Author

easternmotors commented Mar 19, 2024

Further Questions:

  1. Is this a bug or intended?
  2. Is there a way to disable ALT preventing camera rotation (See Reproduction Steps - Step 2)
  3. Is there a workaround to "clear the rotating state forcefully"?
@ggetz
Copy link
Contributor

ggetz commented Mar 20, 2024

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.

@easternmotors
Copy link
Contributor Author

@EMapGIS
Copy link

EMapGIS commented Jul 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment