[Pkg-javascript-commits] [leaflet-markercluster] 95/128: Remove zoomToShowLayer moveStart event check
Jonas Smedegaard
dr at jones.dk
Sun Apr 16 06:26:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit 8bb6278e7ca06a5f7f18a8212fa976640f9ea872
Author: z3ut <muraview.andrey at gmail.com>
Date: Mon Jan 9 00:39:04 2017 +0300
Remove zoomToShowLayer moveStart event check
---
src/MarkerClusterGroup.js | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index a81b3da..d56f0a2 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -505,7 +505,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Zoom down to show the given layer (spiderfying if necessary) then calls the callback
zoomToShowLayer: function (layer, callback) {
-
+
if (typeof callback !== 'function') {
callback = function () {};
}
@@ -532,23 +532,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._map.on('moveend', showMarker, this);
this._map.panTo(layer.getLatLng());
} else {
- var moveStart = function () {
- this._map.off('movestart', moveStart, this);
- moveStart = null;
- };
-
- this._map.on('movestart', moveStart, this);
this._map.on('moveend', showMarker, this);
this.on('animationend', showMarker, this);
layer.__parent.zoomToBounds();
-
- //Delay execution to handle events
- setTimeout(function () {
- if (moveStart) {
- //Never started moving, must already be there, probably need clustering however
- showMarker.call(this);
- }
- });
}
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git
More information about the Pkg-javascript-commits
mailing list