From 542fc622b636ecd686cc214c61b445b65a32393c Mon Sep 17 00:00:00 2001 From: danzel Date: Fri, 1 Mar 2013 14:03:40 +1300 Subject: [PATCH] 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. --- dist/MarkerCluster.css | 8 ++++---- src/MarkerCluster.Spiderfier.js | 4 ++-- src/MarkerClusterGroup.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dist/MarkerCluster.css b/dist/MarkerCluster.css index a915c1a4b..dbfab7d0f 100644 --- a/dist/MarkerCluster.css +++ b/dist/MarkerCluster.css @@ -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; } diff --git a/src/MarkerCluster.Spiderfier.js b/src/MarkerCluster.Spiderfier.js index 83f118b71..268bdd4a2 100644 --- a/src/MarkerCluster.Spiderfier.js +++ b/src/MarkerCluster.Spiderfier.js @@ -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); } }); diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index c6d6247ad..b7c3d969a 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -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();