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

PB-548 : fix camera position present in URL at startup issue #881

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

pakb
Copy link
Contributor

@pakb pakb commented Jun 6, 2024

Removing 2D position URL params when 3D is active to diminish issues when we load the app directly in 3D. When zoom and/or position are present, the 3D viewer would react to changes in these values. This was creating some race condition issue at startup when a camera position was also described in the URL.

Camera initialization has also been separated from the logic to move the camera after init, so that we have a clearer logical decision (with logging)

Test link

@github-actions github-actions bot added the bug Something isn't working label Jun 6, 2024
Copy link

cypress bot commented Jun 6, 2024

Passing run #2410 ↗︎

0 207 20 0 Flakiness 0

Details:

PB-548 : if no pitch is given while parsing a legacy camera we look down
Project: web-mapviewer Commit: f4cd7e5d6c
Status: Passed Duration: 05:45 💡
Started: Jun 10, 2024 6:05 AM Ended: Jun 10, 2024 6:11 AM

Review all test suite changes for PR #881 ↗︎

@pakb pakb force-pushed the bug_PB-548_camera_after_reload branch 2 times, most recently from 79401cc to a6efde5 Compare June 7, 2024 06:29
@pakb pakb requested review from ltshb and ltkum June 7, 2024 08:57
@pakb pakb force-pushed the bug_PB-548_camera_after_reload branch from a6efde5 to 9c425bd Compare June 7, 2024 12:07
Comment on lines +50 to +55
store.subscribeAction({
after: (action, state) => {
if (state.position.camera === null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe put a comment here why we use action subscription instead of mutation as we usually do mutation watcher

pakb added 2 commits June 10, 2024 08:01
Removing 2D position URL params when 3D is active to diminish issues when we load the app directly in 3D. When zoom and/or position are present, the 3D viewer would react to changes in these values. This was creating some race condition issue at startup when a camera position was also described in the URL.

Camera initialization has also been separated from the logic to move the camera after init, so that we have a clearer logical decision (with logging)
@pakb pakb force-pushed the bug_PB-548_camera_after_reload branch from 9c425bd to f4cd7e5 Compare June 10, 2024 06:01
@pakb pakb merged commit 9cdb807 into develop Jun 10, 2024
6 checks passed
@pakb pakb deleted the bug_PB-548_camera_after_reload branch June 10, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants