From 7ef9136f7453a80df3ff243e030a147934fd15dd Mon Sep 17 00:00:00 2001 From: Pascal Barth Date: Fri, 13 Dec 2024 11:51:38 +0100 Subject: [PATCH] PB-1204 : split CesiumMap component into multiple sub-parts with the same logic/approach that we had with the OpenLayers counterpart, leaving only the responsibility to create and share the Cesium instance to the main component, and giving all others (interactions, layer management, feature highlighting) to sub-components. --- .../constants.js => config/cesium.config.js} | 0 .../map/components/cesium/CesiumCamera.vue | 180 +++++ .../cesium/CesiumHighlightedFeatures.vue | 119 +++ .../components/cesium/CesiumInteractions.vue | 131 ++++ .../map/components/cesium/CesiumMap.vue | 715 ++++-------------- .../components/cesium/CesiumMouseTracker.vue | 3 +- .../utils/addPrimitiveFromOLLayer.mixins.js | 2 +- tests/cypress/tests-e2e/3d/navigation.cy.js | 5 +- 8 files changed, 570 insertions(+), 585 deletions(-) rename src/{modules/map/components/cesium/constants.js => config/cesium.config.js} (100%) create mode 100644 src/modules/map/components/cesium/CesiumCamera.vue create mode 100644 src/modules/map/components/cesium/CesiumHighlightedFeatures.vue create mode 100644 src/modules/map/components/cesium/CesiumInteractions.vue diff --git a/src/modules/map/components/cesium/constants.js b/src/config/cesium.config.js similarity index 100% rename from src/modules/map/components/cesium/constants.js rename to src/config/cesium.config.js diff --git a/src/modules/map/components/cesium/CesiumCamera.vue b/src/modules/map/components/cesium/CesiumCamera.vue new file mode 100644 index 000000000..d7d7a6643 --- /dev/null +++ b/src/modules/map/components/cesium/CesiumCamera.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/modules/map/components/cesium/CesiumHighlightedFeatures.vue b/src/modules/map/components/cesium/CesiumHighlightedFeatures.vue new file mode 100644 index 000000000..dda3c0f61 --- /dev/null +++ b/src/modules/map/components/cesium/CesiumHighlightedFeatures.vue @@ -0,0 +1,119 @@ + + + diff --git a/src/modules/map/components/cesium/CesiumInteractions.vue b/src/modules/map/components/cesium/CesiumInteractions.vue new file mode 100644 index 000000000..18cfeaf76 --- /dev/null +++ b/src/modules/map/components/cesium/CesiumInteractions.vue @@ -0,0 +1,131 @@ + diff --git a/src/modules/map/components/cesium/CesiumMap.vue b/src/modules/map/components/cesium/CesiumMap.vue index a75b88baf..073935def 100644 --- a/src/modules/map/components/cesium/CesiumMap.vue +++ b/src/modules/map/components/cesium/CesiumMap.vue @@ -1,613 +1,170 @@ - - + +