mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
Fade out old clusters on zoom in
This commit is contained in:
@@ -430,9 +430,8 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
||||
c = startingClusters[i];
|
||||
startPos = c.getLatLng();
|
||||
|
||||
//Remove old cluster
|
||||
L.FeatureGroup.prototype.removeLayer.call(this, c); //TODO Animate
|
||||
|
||||
//Fade out old cluster
|
||||
c.setOpacity(0);
|
||||
c._recursivelyAddChildrenToMap(startPos, depth, bounds);
|
||||
}
|
||||
|
||||
@@ -465,6 +464,9 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
for (i = 0; i < startingClusters.length; i++) {
|
||||
L.FeatureGroup.prototype.removeLayer.call(me, startingClusters[i]);
|
||||
}
|
||||
map._mapPane.className = map._mapPane.className.replace(' leaflet-cluster-anim', '');
|
||||
me._inZoomAnimation--;
|
||||
}, 250);
|
||||
|
||||
Reference in New Issue
Block a user