Build update and JSHint fixes.

This commit is contained in:
danzel
2012-09-14 10:43:17 +12:00
parent 4b12ba6274
commit c0871d7cb7
3 changed files with 13 additions and 2 deletions
+11
View File
@@ -115,6 +115,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (layer._icon) {
L.FeatureGroup.prototype.removeLayer.call(this, layer);
layer.setOpacity(1);
}
return this;
},
@@ -653,6 +654,16 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
//When the animations are done, tidy up
setTimeout(function () {
//This cluster stopped being a cluster before the timeout fired
if (cluster._childCount === 1) {
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);
return;
}
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
+1 -1
View File
@@ -648,7 +648,7 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
setTimeout(function () {
//This cluster stopped being a cluster before the timeout fired
if (cluster._childCount == 1) {
if (cluster._childCount === 1) {
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());