From 7b838af6e360b00cd2465914b3e30466d375e9cd Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Fri, 30 Aug 2013 06:53:41 +0100 Subject: [PATCH] make selecting a portal robust against it not being displayed on the map (now entirely possible now portal data is independant of display status) --- code/portal_detail_display.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index 5ad52422..764fda7d 100644 --- a/code/portal_detail_display.js +++ b/code/portal_detail_display.js @@ -156,8 +156,12 @@ window.selectPortal = function(guid) { if(portals[guid]) { // resonatorsSetSelectStyle(guid); - portals[guid].bringToFront(); + setMarkerStyle(portals[guid], true); + + if (map.hasLayer(portals[guid])) { + portals[guid].bringToFront(); + } } return update;