mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 08:01:38 +02:00
Fix zoom out with a single circle marker. fixes #300
This commit is contained in:
Vendored
+2
@@ -986,7 +986,9 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
|||||||
var m = cluster._markers[0];
|
var m = cluster._markers[0];
|
||||||
//If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it
|
//If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it
|
||||||
m.setLatLng(m.getLatLng());
|
m.setLatLng(m.getLatLng());
|
||||||
|
if (m.setOpacity) {
|
||||||
m.setOpacity(1);
|
m.setOpacity(1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
|
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
|
||||||
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
|
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -981,7 +981,9 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
|||||||
var m = cluster._markers[0];
|
var m = cluster._markers[0];
|
||||||
//If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it
|
//If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it
|
||||||
m.setLatLng(m.getLatLng());
|
m.setLatLng(m.getLatLng());
|
||||||
|
if (m.setOpacity) {
|
||||||
m.setOpacity(1);
|
m.setOpacity(1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
|
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
|
||||||
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
|
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user