mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Be more careful tidying up _projCenter otherwise it is still set later and we fail at clustering randomly
This commit is contained in:
@@ -232,6 +232,8 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
if (this._sqDist(markerPos, mPos) <= clusterDiameterSqrd) {
|
||||
//Create a new cluster with these 2
|
||||
var newCluster = new L.MarkerCluster(this, m, newMarker);
|
||||
delete m._projCenter;
|
||||
delete newMarker._projCenter;
|
||||
|
||||
unclusteredMarkers.splice(i, 1);
|
||||
return newCluster;
|
||||
@@ -263,6 +265,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
c = clusters[j];
|
||||
if (this._sqDist(point._projCenter, c._projCenter) <= clusterRadiusSqrd) {
|
||||
c._addChild(point);
|
||||
delete point._projCenter;
|
||||
c._projCenter = this._map.project(c.getLatLng(), zoom);
|
||||
|
||||
used = true;
|
||||
|
||||
Reference in New Issue
Block a user