From a351705cf16bb62a127e155e6784b1853627fb6b Mon Sep 17 00:00:00 2001 From: Louis-Maxime Piton Date: Fri, 23 Feb 2024 15:31:56 +0100 Subject: [PATCH] First draft --- src/iotMapManager/css/markers.css | 4 ++++ src/iotMapManager/css/shadows.css | 6 ++++++ src/iotMapManager/src/iot-map-common-svg.ts | 8 ++++---- src/iotMapManager/src/iot-map-icons.ts | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/iotMapManager/css/markers.css b/src/iotMapManager/css/markers.css index 8b1f27d7..bedc453d 100644 --- a/src/iotMapManager/css/markers.css +++ b/src/iotMapManager/css/markers.css @@ -15,11 +15,15 @@ /* markers.css */ .iotmap-markericon{ + --marker-border-color: white; position: relative; width: 0px; height: 0px; box-sizing: border-box; } +.iotmap-markericon:hover { + --marker-border-color: black; +} .iotmap-markericon .iotmap-svgMarker { position: absolute; top:0px; diff --git a/src/iotMapManager/css/shadows.css b/src/iotMapManager/css/shadows.css index 54a2fe61..43166019 100644 --- a/src/iotMapManager/css/shadows.css +++ b/src/iotMapManager/css/shadows.css @@ -21,6 +21,7 @@ width:70px; height: 26px; z-index: 5; + pointer-events: none; } .iotmap-markericon .iotmap-selected-square-shadow { @@ -30,6 +31,7 @@ width:70px; height: 24px; z-index: 5; + pointer-events: none; } .iotmap-markericon .iotmap-circle-shadow { @@ -39,6 +41,7 @@ width: 66px; height: 66px; z-index: 5; + pointer-events: none; } .iotmap-markericon .iotmap-circle-pin-shadow { @@ -48,6 +51,7 @@ width:70px; height: 24px; z-index: 5; + pointer-events: none; } .iotmap-markericon .iotmap-square-shadow { @@ -57,6 +61,7 @@ width:70px; height: 70px; z-index: 5; + pointer-events: none; } .iotmap-markericon .iotmap-square-pin-shadow { @@ -66,4 +71,5 @@ width:70px; height: 26px; z-index: 5; + pointer-events: none; } diff --git a/src/iotMapManager/src/iot-map-common-svg.ts b/src/iotMapManager/src/iot-map-common-svg.ts index 0971c0ac..91f89f69 100644 --- a/src/iotMapManager/src/iot-map-common-svg.ts +++ b/src/iotMapManager/src/iot-map-common-svg.ts @@ -38,8 +38,8 @@ export const circle = { selFunColour: `fill='white' r='19' cx='50' cy='50'/>`, - border: ``, + pinBorder: ` `, + border: ``, // backgrounds funBg: ``, @@ -71,8 +71,8 @@ export const square = { selFunColour: `fill-rule='evenodd' d='M74,18H26a8.192,8.192,0,0,0-8,8V74a8.192,8.192,0,0,0,8,8H41a6.682,6.682,0,0,1,4.707,2.037L50,90l4.3-5.963A6.661,6.661,0,0,1,59,82H74a7.947,7.947,0,0,0,8.025-7.691L82,26A8.192,8.192,0,0,0,74,18ZM71.875,75H28.125A3.125,3.125,0,0,1,25,71.875V28.125A3.125,3.125,0,0,1,28.125,25h43.75A3.125,3.125,0,0,1,75,28.125v43.75A3.125,3.125,0,0,1,71.875,75Z'`, // borders - pinBorder: ``, - border: ``, + pinBorder: ``, + border: ``, // backgrounds funBg: ``, diff --git a/src/iotMapManager/src/iot-map-icons.ts b/src/iotMapManager/src/iot-map-icons.ts index 6cac063c..ab94c850 100644 --- a/src/iotMapManager/src/iot-map-icons.ts +++ b/src/iotMapManager/src/iot-map-icons.ts @@ -463,7 +463,7 @@ function getMarkerDivIcon (marker: IotMarker, config: IotMapConfig, selected: bo const arrowConf = config.markers.size.directionArrow const shift = (selected) ? 0 : 3 * arrowConf.height / 4 const arrowColor = (marker.shape.percent) ? marker.shape.color : funColor - const strokeColor = (selected) ? funColor : 'white' + const strokeColor = (selected) ? funColor : 'var(--marker-border-color, white)' svgDirection = `