mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 08:03:30 +02:00
Fix up spiderfier breaking animation counting
This commit is contained in:
@@ -261,6 +261,7 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
|
|||||||
map.removeLayer(m._spiderLeg);
|
map.removeLayer(m._spiderLeg);
|
||||||
delete m._spiderLeg;
|
delete m._spiderLeg;
|
||||||
}
|
}
|
||||||
|
group._animationEnd();
|
||||||
}, 250);
|
}, 250);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_moveEnd: function () {
|
_moveEnd: function () {
|
||||||
if (this._inZoomAnimation > 0) {
|
if (this._inZoomAnimation) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,6 +343,7 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
|||||||
//Animated versions here
|
//Animated versions here
|
||||||
_animationStart: function () {
|
_animationStart: function () {
|
||||||
this._map._mapPane.className += ' leaflet-cluster-anim';
|
this._map._mapPane.className += ' leaflet-cluster-anim';
|
||||||
|
this._inZoomAnimation++;
|
||||||
},
|
},
|
||||||
_animationEnd: function () {
|
_animationEnd: function () {
|
||||||
this._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', '');
|
this._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', '');
|
||||||
@@ -402,8 +403,6 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
|||||||
c._recursivelyRestoreChildPositions(depthToDescend);
|
c._recursivelyRestoreChildPositions(depthToDescend);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._inZoomAnimation++;
|
|
||||||
|
|
||||||
//Remove the old clusters and close the zoom animation
|
//Remove the old clusters and close the zoom animation
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
@@ -431,8 +430,6 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
|||||||
//Animate all of the markers in the clusters to move to their cluster center point
|
//Animate all of the markers in the clusters to move to their cluster center point
|
||||||
marker._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, depthToStartAt, depthToAnimateIn);
|
marker._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, depthToStartAt, depthToAnimateIn);
|
||||||
|
|
||||||
this._inZoomAnimation++;
|
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
//Update the opacity (If we immediately set it they won't animate)
|
//Update the opacity (If we immediately set it they won't animate)
|
||||||
@@ -486,6 +483,5 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
|||||||
//Could loop all this._layers and do this for each _icon if it stops working
|
//Could loop all this._layers and do this for each _icon if it stops working
|
||||||
|
|
||||||
L.Util.falseFn(document.body.offsetWidth);
|
L.Util.falseFn(document.body.offsetWidth);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user