From 2344eaac7a81fb7ee5244cbb481c51f03fd7496b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Tue, 14 May 2024 12:14:20 +0200 Subject: [PATCH 1/7] PB-490: move 3d zoom buttons to right toolbox Issue : The zoom in and out buttons were added to the cesium viewer near the compass, when it is a bit more logical to have them stay where they are in the 2D viewer. Fix : We move the logic of those buttons to the toolbox zoom buttons, use that logic when we are in 3d, and removed the cesium buttons. temp --- .../map/components/cesium/CesiumMap.vue | 18 +++++--- .../map/components/cesium/CesiumToolbox.vue | 45 ------------------- .../map/components/toolbox/MapToolbox.vue | 2 +- .../map/components/toolbox/ZoomButtons.vue | 38 +++++++++++++++- 4 files changed, 50 insertions(+), 53 deletions(-) diff --git a/src/modules/map/components/cesium/CesiumMap.vue b/src/modules/map/components/cesium/CesiumMap.vue index 0c7d5d1b2..fa40e5b6c 100644 --- a/src/modules/map/components/cesium/CesiumMap.vue +++ b/src/modules/map/components/cesium/CesiumMap.vue @@ -68,15 +68,18 @@ - @@ -74,16 +39,6 @@ function moveBackward() { display: flex; $compass-size: 95px; - $button-size: calc($compass-size / 2); - &-button { - width: $button-size; - height: $button-size; - border-radius: calc($button-size / 2); - border: 2px solid rgba(0, 0, 0, 0.4); - background: rgb(224, 225, 226); - font-size: calc($button-size / 2.5); - color: rgba(0, 0, 0, 0.8); - } &-compass { position: relative; diff --git a/src/modules/map/components/toolbox/MapToolbox.vue b/src/modules/map/components/toolbox/MapToolbox.vue index 7e4ecdc9e..6bda05ea7 100644 --- a/src/modules/map/components/toolbox/MapToolbox.vue +++ b/src/modules/map/components/toolbox/MapToolbox.vue @@ -51,7 +51,7 @@ const is3dActive = computed(() => store.state.cesium.active) > - + diff --git a/src/modules/map/components/toolbox/ZoomButtons.vue b/src/modules/map/components/toolbox/ZoomButtons.vue index a9e11d577..6768a3cc1 100644 --- a/src/modules/map/components/toolbox/ZoomButtons.vue +++ b/src/modules/map/components/toolbox/ZoomButtons.vue @@ -1,4 +1,6 @@ From 9de5e4af488e959c2c91f870479ebf4f21e469f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Mon, 27 May 2024 10:19:56 +0200 Subject: [PATCH 2/7] PB-490: css for compass transferred --- src/modules/map/components/cesium/CesiumMap.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/modules/map/components/cesium/CesiumMap.vue b/src/modules/map/components/cesium/CesiumMap.vue index fa40e5b6c..11eb20a7c 100644 --- a/src/modules/map/components/cesium/CesiumMap.vue +++ b/src/modules/map/components/cesium/CesiumMap.vue @@ -149,11 +149,7 @@ const dispatcher = { dispatcher: 'CesiumMap.vue' } // TODO : REF TO COMPASS export default { components: { -<<<<<<< HEAD CesiumGeolocationFeedback, - CesiumToolbox, -======= ->>>>>>> 9ad6fc74 (PB-490: move 3d zoom buttons to right toolbox) FontAwesomeIcon, CesiumPopover, FeatureEdit, @@ -650,5 +646,16 @@ export default { .cesium-toolbox { bottom: calc($footer-height + $screen-padding-for-ui-elements); z-index: $zindex-map + 1; + //display: flex; + + $compass-size: 95px; + + &-compass { + position: relative; + width: $compass-size; + height: $compass-size; + --cesium-compass-stroke-color: rgba(0, 0, 0, 0.6); + --cesium-compass-fill-color: rgb(224, 225, 226); + } } From aafed61fd312a1f16ac7d0f6a039aef93a05aa41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Mon, 27 May 2024 10:54:09 +0200 Subject: [PATCH 3/7] PB-490: getting rid of the cesium toolbox component --- .../map/components/cesium/CesiumMap.vue | 9 ++-- .../map/components/cesium/CesiumToolbox.vue | 51 ------------------- 2 files changed, 5 insertions(+), 55 deletions(-) delete mode 100644 src/modules/map/components/cesium/CesiumToolbox.vue diff --git a/src/modules/map/components/cesium/CesiumMap.vue b/src/modules/map/components/cesium/CesiumMap.vue index 11eb20a7c..db1bf4a2a 100644 --- a/src/modules/map/components/cesium/CesiumMap.vue +++ b/src/modules/map/components/cesium/CesiumMap.vue @@ -70,7 +70,7 @@ @@ -401,8 +401,10 @@ export default { limitCameraPitchRoll(CAMERA_MIN_PITCH, CAMERA_MAX_PITCH, 0.0, 0.0) ) - this.$refs.compass.scene = this.viewer.scene - this.$refs.compass.clock = this.viewer.clock + if (this.$refs.compass) { + this.$refs.compass.scene = this.viewer.scene + this.$refs.compass.clock = this.viewer.clock + } this.flyToPosition() @@ -646,7 +648,6 @@ export default { .cesium-toolbox { bottom: calc($footer-height + $screen-padding-for-ui-elements); z-index: $zindex-map + 1; - //display: flex; $compass-size: 95px; diff --git a/src/modules/map/components/cesium/CesiumToolbox.vue b/src/modules/map/components/cesium/CesiumToolbox.vue deleted file mode 100644 index c521e5466..000000000 --- a/src/modules/map/components/cesium/CesiumToolbox.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - From a5c86ed30c459c660891f01c6a6aa86de7f55606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Mon, 27 May 2024 10:54:09 +0200 Subject: [PATCH 4/7] PB-490: getting rid of the cesium toolbox component removing comment --- src/modules/map/components/cesium/CesiumMap.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/map/components/cesium/CesiumMap.vue b/src/modules/map/components/cesium/CesiumMap.vue index db1bf4a2a..b9f9867d2 100644 --- a/src/modules/map/components/cesium/CesiumMap.vue +++ b/src/modules/map/components/cesium/CesiumMap.vue @@ -146,7 +146,6 @@ import { identifyGeoJSONFeatureAt } from '@/utils/identifyOnVectorLayer' import log from '@/utils/logging' const dispatcher = { dispatcher: 'CesiumMap.vue' } -// TODO : REF TO COMPASS export default { components: { CesiumGeolocationFeedback, From 7dc45a049f06942e3827750b0a88ed89e2d66d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Tue, 28 May 2024 17:13:27 +0200 Subject: [PATCH 5/7] PB-490: removing useless comment and adding context to a variable that was moved from the cesium toolbox to the zoom buttons --- src/modules/map/components/toolbox/ZoomButtons.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/map/components/toolbox/ZoomButtons.vue b/src/modules/map/components/toolbox/ZoomButtons.vue index 6768a3cc1..ce1fa8ecb 100644 --- a/src/modules/map/components/toolbox/ZoomButtons.vue +++ b/src/modules/map/components/toolbox/ZoomButtons.vue @@ -15,8 +15,9 @@ useTippyTooltip('#zoomButtons [data-tippy-content]', { placement: 'left' }) const getViewer = inject('getViewer') -// the '200' magic number has been found empirically to be the most agreeable to emulate -// a zoom level. +// The `step` variable is used with the 3D viewer. The goal was to find an increase or +// decrease in the zoom that emulated a zoom level in an agreeable way. `200` here is a +// magic number, found empirically, to achieve that goal. const step = computed(() => resolution.value * 200) function moveCamera(distance) { From 7b21b8528d6ac3c6abcc428957b2562c56be4659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Thu, 30 May 2024 17:32:28 +0200 Subject: [PATCH 6/7] PB-490: small css adaptation --- src/modules/map/components/cesium/CesiumMap.vue | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/modules/map/components/cesium/CesiumMap.vue b/src/modules/map/components/cesium/CesiumMap.vue index b9f9867d2..352e29b1e 100644 --- a/src/modules/map/components/cesium/CesiumMap.vue +++ b/src/modules/map/components/cesium/CesiumMap.vue @@ -72,7 +72,7 @@ @@ -644,18 +644,16 @@ export default { right: unset; } -.cesium-toolbox { +.cesium-compass { bottom: calc($footer-height + $screen-padding-for-ui-elements); z-index: $zindex-map + 1; $compass-size: 95px; - &-compass { - position: relative; - width: $compass-size; - height: $compass-size; - --cesium-compass-stroke-color: rgba(0, 0, 0, 0.6); - --cesium-compass-fill-color: rgb(224, 225, 226); - } + position: relative; + width: $compass-size; + height: $compass-size; + --cesium-compass-stroke-color: rgba(0, 0, 0, 0.6); + --cesium-compass-fill-color: rgb(224, 225, 226); } From b2a8461a42d879d9eb727a12068da6bbbfa79fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BCnzi?= Date: Thu, 30 May 2024 17:32:28 +0200 Subject: [PATCH 7/7] PB-490: small css adaptation lintint --- src/modules/map/components/cesium/CesiumMap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/map/components/cesium/CesiumMap.vue b/src/modules/map/components/cesium/CesiumMap.vue index 352e29b1e..42c8eaefd 100644 --- a/src/modules/map/components/cesium/CesiumMap.vue +++ b/src/modules/map/components/cesium/CesiumMap.vue @@ -68,7 +68,7 @@ - +