update draw-resonators to remove dependancy on portalsLayers

This commit is contained in:
Jon Atkins 2013-09-07 08:15:02 +01:00
parent 9b1743bf6d
commit 695804524e

View File

@ -169,15 +169,16 @@ window.plugin.drawResonators.Render.prototype.handleResonatorEntitiesAfterZoom =
var render = this;
// loop through level of portals, only redraw if the level is shown on map
for(var level in window.portalsLayers) {
var portalsLayer = window.portalsLayers[level];
if(!map.hasLayer(portalsLayer)) continue;
portalsLayer.eachLayer(function(portal) {
// loop through level of portals, only draw if the portal is shown on map
for (var guid in window.portals) {
var portal = window.portals[guid];
// FIXME: need to find a proper way to check if a portal is added to the map without depending on leaflet internals
// (and without depending on portalsLayers either - that's IITC internal)
if (portal._map) {
render.createResonatorEntities(portal);
});
}
}
}
}