[Pkg-javascript-commits] [leaflet-markercluster] 227/479: Work around browsers without zoomAnimation not firing zoomstart. Makes spiderfied packs disappear on zoomout
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:33 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit a0df0e3db3e1cc9f0de2972d1b96f0db2e57ee87
Author: danzel <danzel at localhost.geek.nz>
Date: Wed Sep 12 11:17:03 2012 +1200
Work around browsers without zoomAnimation not firing zoomstart. Makes spiderfied packs disappear on zoomout
---
src/MarkerCluster.Spiderfier.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/MarkerCluster.Spiderfier.js b/src/MarkerCluster.Spiderfier.js
index 28b1f05..f1b87c5 100644
--- a/src/MarkerCluster.Spiderfier.js
+++ b/src/MarkerCluster.Spiderfier.js
@@ -309,7 +309,13 @@ L.MarkerClusterGroup.include({
_spiderfierOnAdd: function () {
this._map.on('click', this._unspiderfyWrapper, this);
- this._map.on('zoomstart', this._unspiderfyZoomStart, this);
+
+ if (map.options.zoomAnimation) {
+ this._map.on('zoomstart', this._unspiderfyZoomStart, this);
+ } else {
+ //Browsers without zoomAnimation don't fire zoomstart
+ this._map.on('zoomend', this._unspiderfyWrapper, this);
+ }
if (L.Browser.svg && !L.Browser.touch) {
this._map._initPathRoot();
--
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