mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
For animated zoomouts sometimes we'll zoom so that the previously visible bounds aren't fully contained within the new bounds, in those cases we need to remove the markers that were in the previous bounds but not the new bounds from the map as the normal animation won't take care of them. Fixes #63
This commit is contained in:
@@ -636,6 +636,8 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
||||
|
||||
//Need to add markers for those that weren't on the map before but are now
|
||||
this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds());
|
||||
//Remove markers that were on the map before but won't be now
|
||||
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel, this._getExpandedVisibleBounds());
|
||||
},
|
||||
_animationZoomOutSingle: function (cluster, previousZoomLevel, newZoomLevel) {
|
||||
var bounds = this._getExpandedVisibleBounds();
|
||||
|
||||
Reference in New Issue
Block a user