From ed0cedfc81f4c8b503f420b9300c52e9c370dc7a Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 20 Jul 2015 09:34:03 +0100 Subject: [PATCH] placeholder portals - default style is thinner and dashed outline, to distinguish them from other low level portals handy when panning around when portals are visible, as placeholders will still exist for links before data loading is complete --- code/portal_marker.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/portal_marker.js b/code/portal_marker.js index c88f78f0..b9bfb764 100644 --- a/code/portal_marker.js +++ b/code/portal_marker.js @@ -52,6 +52,13 @@ window.getMarkerStyleOptions = function(details) { var lvlWeight = LEVEL_TO_WEIGHT[level] * Math.sqrt(scale); var lvlRadius = LEVEL_TO_RADIUS[level] * scale; + var dashArray = null; + // thinner and dashed outline for placeholder portals + if (details.team != TEAM_NONE && level==0) { + lvlWeight = 1; + dashArray = [1,2]; + } + var options = { radius: lvlRadius, stroke: true, @@ -61,7 +68,7 @@ window.getMarkerStyleOptions = function(details) { fill: true, fillColor: COLORS[details.team], fillOpacity: 0.5, - dashArray: null + dashArray: dashArray }; return options;