From dd3d4d3a2d1dae3fd64f703c4a305c6549ad26fa Mon Sep 17 00:00:00 2001 From: Pascal Barth Date: Fri, 5 Jul 2024 11:50:23 +0200 Subject: [PATCH] PB-775 : show compared layer name when slider is hovered/used --- src/modules/map/components/CompareSlider.vue | 32 +++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/src/modules/map/components/CompareSlider.vue b/src/modules/map/components/CompareSlider.vue index 5d0f143e4..dd0ce16d8 100644 --- a/src/modules/map/components/CompareSlider.vue +++ b/src/modules/map/components/CompareSlider.vue @@ -14,6 +14,7 @@ const olMap = inject('olMap') const preRenderKey = ref(null) const postRenderKey = ref(null) const compareSliderOffset = ref(0) +const showLayerName = ref(false) const compareRatio = ref(-0.5) const store = useStore() @@ -138,22 +139,28 @@ function releaseSlider() { :style="compareSliderPosition" @touchstart.passive="grabSlider" @mousedown.passive="grabSlider" + @mouseenter="showLayerName = true" + @mouseleave="showLayerName = false" >
- +
+ + {{ visibleLayerOnTop.name }} +