update draw-resonators to remove dependancy on portalsLayers
This commit is contained in:
parent
9b1743bf6d
commit
695804524e
@ -169,15 +169,16 @@ window.plugin.drawResonators.Render.prototype.handleResonatorEntitiesAfterZoom =
|
|||||||
|
|
||||||
var render = this;
|
var render = this;
|
||||||
|
|
||||||
// loop through level of portals, only redraw if the level is shown on map
|
// loop through level of portals, only draw if the portal is shown on map
|
||||||
for(var level in window.portalsLayers) {
|
for (var guid in window.portals) {
|
||||||
var portalsLayer = window.portalsLayers[level];
|
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
|
||||||
if(!map.hasLayer(portalsLayer)) continue;
|
// (and without depending on portalsLayers either - that's IITC internal)
|
||||||
portalsLayer.eachLayer(function(portal) {
|
if (portal._map) {
|
||||||
render.createResonatorEntities(portal);
|
render.createResonatorEntities(portal);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user