From 65aa2c0a5e73af610e4328b1b51257a72f33d595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Fri, 20 Dec 2024 11:00:10 +0100 Subject: [PATCH] Hotfix: 3D navigation compass was not showing 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 --- src/modules/map/components/cesium/CesiumMap.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/map/components/cesium/CesiumMap.vue b/src/modules/map/components/cesium/CesiumMap.vue index a3527ac72..5ee796e12 100644 --- a/src/modules/map/components/cesium/CesiumMap.vue +++ b/src/modules/map/components/cesium/CesiumMap.vue @@ -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 @@ -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') }