From f6dca4c51ba2d0484eeb56d0b31468cb732991c9 Mon Sep 17 00:00:00 2001 From: Danny Koppenhagen Date: Wed, 7 Jun 2023 10:33:14 +0200 Subject: [PATCH] refactor: make heatmapLayer and vectorLayer not a ref BREAKING CHANGE: potentially exposed `layer`, `heatmapLayer` and `vectorLayer` are not refs anymore. They can now be used without the need of `.value` --- src/components/layers/OlAnimatedClusterLayer.vue | 4 ++-- src/components/layers/OlVectorLayer.vue | 10 +++++----- src/components/map/OlFeature.vue | 2 +- src/components/mapControls/OlAttributionControl.vue | 2 +- src/components/sources/OlSourceVector.vue | 10 +++++----- src/composables/usePropsAsObjectProperties.ts | 2 +- src/demos/ImageWMSDemo.vue | 2 +- src/demos/SnapModifyDemo.vue | 1 - 8 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/components/layers/OlAnimatedClusterLayer.vue b/src/components/layers/OlAnimatedClusterLayer.vue index 32a8a05a..b8072fe3 100644 --- a/src/components/layers/OlAnimatedClusterLayer.vue +++ b/src/components/layers/OlAnimatedClusterLayer.vue @@ -61,13 +61,13 @@ watch(properties, () => { }); onMounted(() => { - map.addLayer(vectorLayer.value); + map.addLayer(vectorLayer); vectorLayer.value.changed(); map.changed(); }); onUnmounted(() => { - map.removeLayer(vectorLayer.value); + map.removeLayer(vectorLayer); }); provide("vectorLayer", source); diff --git a/src/components/layers/OlVectorLayer.vue b/src/components/layers/OlVectorLayer.vue index 971e6c7d..dba6539a 100644 --- a/src/components/layers/OlVectorLayer.vue +++ b/src/components/layers/OlVectorLayer.vue @@ -5,7 +5,7 @@