From 28de7c540308e80ebbedd9b1b096cb3504e85777 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Wed, 25 May 2016 22:52:29 +0200 Subject: [PATCH] [TASK] Adjust marker style - focus on online nodes --- lib/map.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/map.js b/lib/map.js index 890492b..7269023 100644 --- a/lib/map.js +++ b/lib/map.js @@ -179,7 +179,7 @@ define(["map/clientlayer", "map/labelslayer", var iconLost = { color: "#D43E2A", fillColor: "#D43E2A", - radius: 6, + radius: 4, fillOpacity: 0.8, opacity: 0.8, weight: 1, @@ -188,11 +188,11 @@ define(["map/clientlayer", "map/labelslayer", var iconAlert = { color: "#D43E2A", fillColor: "#D43E2A", - radius: 6, + radius: 5, fillOpacity: 0.8, opacity: 0.8, weight: 2, - className: "stroke-first node-alert" + className: "stroke-first" }; var iconNew = {color: "#1566A9", fillColor: "#93E929", radius: 6, fillOpacity: 1.0, opacity: 0.5, weight: 2}; @@ -443,7 +443,7 @@ define(["map/clientlayer", "map/labelslayer", m = linkDict[highlight.o.id]; if (m) { - m.setStyle({weight: 7, opacity: 1, dashArray: "10, 10"}); + m.setStyle({weight: 4, opacity: 1, dashArray: "5, 10"}); } } } @@ -560,12 +560,14 @@ define(["map/clientlayer", "map/labelslayer", return iconAlert; } - return iconLost; + if (d.lastseen.isAfter(moment(data.now).subtract(14, "days"))) { + return iconLost; + } }, router)); groupOffline = L.featureGroup(markersOffline).addTo(map); - groupOnline = L.featureGroup(markersOnline).addTo(map); groupLost = L.featureGroup(markersLost).addTo(map); + groupOnline = L.featureGroup(markersOnline).addTo(map); groupNew = L.featureGroup(markersNew).addTo(map); var rtreeOnlineAll = rbush(9);