Skip to content

Commit

Permalink
Merge branch 'zoneMarkers'
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrinegateau committed Jun 18, 2021
2 parents 5a347ac + c9aee42 commit 86e694c
Showing 10 changed files with 83 additions and 20 deletions.
18 changes: 0 additions & 18 deletions src/iotMapManager/css/markers.css
Original file line number Diff line number Diff line change
@@ -86,24 +86,6 @@
line-height:50px;
}

.iotmap-markericon .iotmap-shadowSelected{
position: absolute;
top:0px;
left:-10px;
width:70px;
height: 70px;
z-index: 5;
}

.iotmap-markericon .iotmap-shadowUnselected{
position: absolute;
top:-20px;
left:-20px;
width:70px;
height: 70px;
z-index: 5;
}

/********************
CLUSTERS
********************/
69 changes: 69 additions & 0 deletions src/iotMapManager/css/shadows.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Software Name : IotMapManager
* Version: 2.5.1
* SPDX-FileCopyrightText: Copyright (c) 2020 Orange
* SPDX-License-Identifier: MIT
*
* This software is distributed under the MIT License,
* the text of which is available at https://github.com/Orange-OpenSource/IOT-Map-Component/blob/master/LICENSE
* or see the "license.txt" file for more details.
*
* Author: S. Gateau
* Software description: provide markers, tabs, clusters and paths dedicated to iot projects using mapping
*/

/* shadows.css */

.iotmap-markericon .iotmap-selected-circle-shadow {
position: absolute;
top: 42px;
left:-10px;
width:70px;
height: 26px;
z-index: 5;
}

.iotmap-markericon .iotmap-selected-square-shadow {
position: absolute;
top: 42px;
left:-10px;
width:70px;
height: 24px;
z-index: 5;
}

.iotmap-markericon .iotmap-circle-shadow {
position: absolute;
top:-18px;
left:-18px;
width: 66px;
height: 66px;
z-index: 5;
}

.iotmap-markericon .iotmap-circle-pin-shadow {
position: absolute;
top:24px;
left:-20px;
width:70px;
height: 24px;
z-index: 5;
}

.iotmap-markericon .iotmap-square-shadow {
position: absolute;
top:-20px;
left:-20px;
width:70px;
height: 70px;
z-index: 5;
}

.iotmap-markericon .iotmap-square-pin-shadow {
position: absolute;
top:24px;
left:-20px;
width:70px;
height: 26px;
z-index: 5;
}
Binary file modified src/iotMapManager/img/MOB_CIR_PIN_Shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/iotMapManager/img/MOB_CIR_SEL_Shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/iotMapManager/img/MOB_CIR_Shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/iotMapManager/img/POI_SQR_PIN_Shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/iotMapManager/img/POI_SQR_SEL_Shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/iotMapManager/img/POI_SQR_Shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/iotMapManager/iot-map-manager.css
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
@import './css/markers.css';
@import './css/popup.css';
@import './css/tabs.css';
@import './css/shadows.css';



15 changes: 13 additions & 2 deletions src/iotMapManager/src/iot-map-icons.ts
Original file line number Diff line number Diff line change
@@ -390,6 +390,7 @@ function getMarkerDivIcon (marker: IotMarker, config: IotMapConfig, selected: bo
let svgGauge = ``
let svgDirection = ``
let shadowFile = ''
let shadowClass = ''

const markerConfig = (selected)
? config.markers.size.selected
@@ -412,16 +413,24 @@ function getMarkerDivIcon (marker: IotMarker, config: IotMapConfig, selected: bo
svgShape = `<path ${svg.selFunColour} fill='${funColor}'/>`
svgBG = svg.selFunBg
}
shadowFile = (marker.shape.type === ShapeType.circle) ? mobCirSelShadow : poiSqrSelShadow
if (marker.shape.type === ShapeType.circle) {
shadowFile = mobCirSelShadow
shadowClass = 'iotmap-selected-circle-shadow'
} else {
shadowFile = poiSqrSelShadow
shadowClass = 'iotmap-selected-square-shadow'
}
} else if (marker.shape.type === ShapeType.circle) {
if (marker.shape.anchored) {
svgBorder = svg.pinBorder
svgShape = `<path ${svg.pinStdColour} fill='${funColor}'/>`
shadowFile = mobCirPinShadow
shadowClass = 'iotmap-circle-pin-shadow'
} else {
svgBorder = svg.border
svgShape = `<circle ${svg.stdColour} fill='${funColor}'/>`
shadowFile = mobCirShadow
shadowClass = 'iotmap-circle-shadow'
}
} else if (marker.shape.type === ShapeType.square) {
if (marker.shape.anchored) {
@@ -434,6 +443,7 @@ function getMarkerDivIcon (marker: IotMarker, config: IotMapConfig, selected: bo
svgBG = svg.pinFunBg
}
shadowFile = poiSqrPinShadow
shadowClass = 'iotmap-square-pin-shadow'
} else {
if (marker.shape.plain) {
svgBorder = svg.border
@@ -444,6 +454,7 @@ function getMarkerDivIcon (marker: IotMarker, config: IotMapConfig, selected: bo
svgBG = svg.funBg
}
shadowFile = poiSqrShadow
shadowClass = 'iotmap-square-shadow'
}
}

@@ -497,7 +508,7 @@ function getMarkerDivIcon (marker: IotMarker, config: IotMapConfig, selected: bo
}

// shadow
const imgShadow = `<img class='${((selected) ? 'iotmap-shadowSelected' : 'iotmap-shadowUnselected')}' src='${shadowFile}'/>`
const imgShadow = `<img class=${shadowClass} src='${shadowFile}'/>`

// tabs
let tab = ``

0 comments on commit 86e694c

Please sign in to comment.