probably fix #90
This commit is contained in:
@ -123,7 +123,11 @@ window.handleDataResponse = function(data, textStatus, jqXHR) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$.each(ppp, function(ind, portal) { renderPortal(portal); });
|
$.each(ppp, function(ind, portal) { renderPortal(portal); });
|
||||||
if(portals[selectedPortal]) portals[selectedPortal].bringToFront();
|
if(portals[selectedPortal]) {
|
||||||
|
try {
|
||||||
|
portals[selectedPortal].bringToFront();
|
||||||
|
} catch(e) { /* portal is now visible, catch Leaflet error */ }
|
||||||
|
}
|
||||||
|
|
||||||
if(portalInUrlAvailable) {
|
if(portalInUrlAvailable) {
|
||||||
renderPortalDetails(urlPortal);
|
renderPortalDetails(urlPortal);
|
||||||
@ -359,8 +363,11 @@ window.renderLink = function(ent) {
|
|||||||
if(!getPaddedBounds().intersects(poly.getBounds())) return;
|
if(!getPaddedBounds().intersects(poly.getBounds())) return;
|
||||||
|
|
||||||
poly.on('remove', function() { delete window.links[this.options.guid]; });
|
poly.on('remove', function() { delete window.links[this.options.guid]; });
|
||||||
poly.on('add', function() { window.links[this.options.guid] = this; });
|
poly.on('add', function() {
|
||||||
poly.addTo(linksLayer).bringToBack();
|
window.links[this.options.guid] = this;
|
||||||
|
this.bringToBack();
|
||||||
|
});
|
||||||
|
poly.addTo(linksLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// renders a field on the map from a given entity
|
// renders a field on the map from a given entity
|
||||||
@ -387,6 +394,9 @@ window.renderField = function(ent) {
|
|||||||
if(!getPaddedBounds().intersects(poly.getBounds())) return;
|
if(!getPaddedBounds().intersects(poly.getBounds())) return;
|
||||||
|
|
||||||
poly.on('remove', function() { delete window.fields[this.options.guid]; });
|
poly.on('remove', function() { delete window.fields[this.options.guid]; });
|
||||||
poly.on('add', function() { window.fields[this.options.guid] = this; });
|
poly.on('add', function() {
|
||||||
poly.addTo(fieldsLayer).bringToBack();
|
window.fields[this.options.guid] = this;
|
||||||
|
this.bringToBack();
|
||||||
|
});
|
||||||
|
poly.addTo(fieldsLayer);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user