mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
Fix markers not being added on a big zoom animation. Fixes #216
If we zoomed down such that a cluster would be out of our visible bounds then any of its children would be added at its location for the animation. In this case those markers would immediately be removed as they are out of our visible bounds. Instead we now don't animate adding markers after a zoom if they are coming from outside of our visible bounds.
This commit is contained in:
@@ -840,6 +840,10 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
||||
markers = c._markers,
|
||||
m;
|
||||
|
||||
if (!bounds.contains(startPos)) {
|
||||
startPos = null;
|
||||
}
|
||||
|
||||
if (c._isSingleParent() && previousZoomLevel + 1 === newZoomLevel) { //Immediately add the new child and remove us
|
||||
fg.removeLayer(c);
|
||||
c._recursivelyAddChildrenToMap(null, newZoomLevel, bounds);
|
||||
|
||||
Reference in New Issue
Block a user