Fix zoom out with a single circle marker. fixes #300

This commit is contained in:
danzel
2014-01-08 10:25:33 +13:00
parent a7b91369b6
commit 683bf4c341
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -986,7 +986,9 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
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
m.setLatLng(m.getLatLng());
m.setOpacity(1);
if (m.setOpacity) {
m.setOpacity(1);
}
} else {
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -1
View File
@@ -981,7 +981,9 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
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
m.setLatLng(m.getLatLng());
m.setOpacity(1);
if (m.setOpacity) {
m.setOpacity(1);
}
} else {
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);