mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
When adding layers, don't add them to the map unless they are in the visible bounds. Fixes #69
This commit is contained in:
@@ -88,10 +88,12 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
}
|
||||
}
|
||||
|
||||
if (this.options.animateAddingMarkers) {
|
||||
this._animationAddLayer(layer, visibleLayer);
|
||||
} else {
|
||||
this._animationAddLayerNonAnimated(layer, visibleLayer);
|
||||
if (this._currentShownBounds.contains(visibleLayer.getLatLng())) {
|
||||
if (this.options.animateAddingMarkers) {
|
||||
this._animationAddLayer(layer, visibleLayer);
|
||||
} else {
|
||||
this._animationAddLayerNonAnimated(layer, visibleLayer);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user