Skip to content

Commit

Permalink
Hotfix: 3D navigation compass was not showing
Browse files Browse the repository at this point in the history
Issue: The compass in the 3d viewer was hidden

Cause: We checked before there was an instance of the component if we could add the scene and the clock to the compass element, meaning it would create an empty compass.

Fix: We wait for the map to be ready before adding the compass
  • Loading branch information
ltkum committed Dec 20, 2024
1 parent 98085cb commit 65aa2c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/map/components/cesium/CesiumMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,6 @@ async function createViewer() {
viewerCreated.value = true
if (compassElement.value) {
compassElement.value.scene = viewer.scene
compassElement.value.clock = viewer.clock
}
if (IS_TESTING_WITH_CYPRESS) {
window.cesiumViewer = viewer
// reduce screen space error to downgrade visual quality but speed up tests
Expand All @@ -140,6 +135,11 @@ async function createViewer() {
isViewerReady: true,
...dispatcher,
})
if (compassElement.value) {
compassElement.value.scene = viewer.scene
compassElement.value.clock = viewer.clock
}
log.info('[Cesium] CesiumMap component mounted and ready')
}
Expand Down

0 comments on commit 65aa2c0

Please sign in to comment.