mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Fixups for singleMarkerMode with new cluster icon bits
This commit is contained in:
@@ -52,10 +52,6 @@ L.MarkerCluster = L.Marker.extend({
|
||||
this._childClusters.push(new1);
|
||||
this._childCount += new1._childCount;
|
||||
} else {
|
||||
if (this._group.options.singleMarkerMode === true) {
|
||||
new1.options.icon = this._group.options.iconCreateFunction(1);
|
||||
}
|
||||
|
||||
this._markers.push(new1);
|
||||
this._childCount++;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,17 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
return this;
|
||||
}
|
||||
|
||||
if (this.options.singleMarkerMode) {
|
||||
layer.options.icon = this.options.iconCreateFunction({
|
||||
getChildCount: function () {
|
||||
return 1;
|
||||
},
|
||||
getAllChildMarkers: function () {
|
||||
return [layer];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!this._map) {
|
||||
this._needsClustering.push(layer);
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user