mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
Cludging towards add support. I think this does it.
This commit is contained in:
@@ -49,7 +49,6 @@ L.MarkerCluster = L.Marker.extend({
|
|||||||
this._expandBounds(new1);
|
this._expandBounds(new1);
|
||||||
},
|
},
|
||||||
|
|
||||||
//TODO: Replace with L.LatLngBounds
|
|
||||||
_expandBounds: function (marker) {
|
_expandBounds: function (marker) {
|
||||||
|
|
||||||
if (marker instanceof L.MarkerCluster) {
|
if (marker instanceof L.MarkerCluster) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|||||||
c += 'large';
|
c += 'large';
|
||||||
}
|
}
|
||||||
|
|
||||||
return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', elementType: 'span', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });
|
return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -198,6 +198,12 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
me._animationStart();
|
me._animationStart();
|
||||||
|
for (var j = 0; j < newClusters.clusters.length; j++) {
|
||||||
|
var v = newClusters.clusters[j];
|
||||||
|
if (v._icon) {
|
||||||
|
v.setLatLng(v._latlng);
|
||||||
|
}
|
||||||
|
}
|
||||||
me._animationZoomOut(newClusters.clusters, 1);
|
me._animationZoomOut(newClusters.clusters, 1);
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user