Reduce all animation timers to 200ms instead of 250ms so that they happen within the space of a leaflet zoom. Fixes #140 more details on there.

This commit is contained in:
danzel
2013-03-01 14:15:34 +13:00
parent c23f1ee429
commit 542fc622b6
3 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
-webkit-transition: -webkit-transform 0.25s ease-out, opacity 0.25s ease-in;
-moz-transition: -moz-transform 0.25s ease-out, opacity 0.25s ease-in;
-o-transition: -o-transform 0.25s ease-out, opacity 0.25s ease-in;
transition: transform 0.25s ease-out, opacity 0.25s ease-in;
-webkit-transition: -webkit-transform 0.2s ease-out, opacity 0.2s ease-in;
-moz-transition: -moz-transform 0.2s ease-out, opacity 0.2s ease-in;
-o-transition: -o-transform 0.2s ease-out, opacity 0.2s ease-in;
transition: transform 0.2s ease-out, opacity 0.2s ease-in;
}
+2 -2
View File
@@ -231,7 +231,7 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
setTimeout(function () {
group._animationEnd();
group.fire('spiderfied');
}, 250);
}, 200);
},
_animationUnspiderfy: function (zoomDetails) {
@@ -309,7 +309,7 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
delete m._spiderLeg;
}
group._animationEnd();
}, 250);
}, 200);
}
});
+3 -3
View File
@@ -809,7 +809,7 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
});
me._animationEnd();
}, 250);
}, 200);
},
_animationZoomOut: function (previousZoomLevel, newZoomLevel) {
@@ -850,7 +850,7 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1);
});
me._animationEnd();
}, 250);
}, 200);
},
_animationAddLayer: function (layer, newCluster) {
var me = this;
@@ -871,7 +871,7 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
layer.setOpacity(1);
me._animationEnd();
}, 250);
}, 200);
} else { //Just became a cluster
this._forceLayout();