Fix not firing animationEnd when we have only one marker in the markerClusterGroup. Fixes #146

This commit is contained in:
danzel
2013-04-10 09:05:19 +12:00
parent 2750822516
commit 828bb3e2d6
+4 -6
View File
@@ -842,13 +842,11 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
//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);
return;
} else {
cluster._recursively(bounds, newZoomLevel, 0, function(c) {
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
});
}
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
});
me._animationEnd();
}, 200);
},