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

Fix for zoom on tracked entity #11319

Merged
merged 1 commit into from
May 31, 2023
Merged

Fix for zoom on tracked entity #11319

merged 1 commit into from
May 31, 2023

Conversation

ggetz
Copy link
Contributor

@ggetz ggetz commented May 30, 2023

Fixes #11286

In #11268, we tweaked the camera controls when the globe is off.

However, the internals of screenSpaceCameraController override the internal value of ._globe when a non-identity camera transform is used, such as when tracking an entity. In most cases, this didn't matter. However in non-3D zoom this value did matter, and was now unexpectedly picking a position under the mouse to zoom to, which led to unexpected behavior-- no zooming. I added some additional unit tests to catch this edge case in case it comes up again in the future.

@cesium-concierge
Copy link

Thanks for the pull request @ggetz!

  • ✔️ Signed CLA found.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.

@ggetz ggetz marked this pull request as ready for review May 30, 2023 18:59
@ggetz ggetz requested a review from jjhembd May 30, 2023 19:00
Copy link
Contributor

@jjhembd jjhembd left a comment

Choose a reason for hiding this comment

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

Looks good!
The code change makes sense. (I hadn't noticed that the .update method sets the globe to undefined if a camera transform is set).
If I revert the change, the new spec catches the bug.
Thanks @ggetz!

@jjhembd jjhembd merged commit f0dc559 into main May 31, 2023
@jjhembd jjhembd deleted the tracked-entity-fix branch May 31, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V1.105.1 After set viewer.trackentity,camera cannot zoom
3 participants