[Pkg-javascript-commits] [leaflet-markercluster] 37/219: Do an intersects test rather than a contains when testing for a zoom in. Fixes #344

Jonas Smedegaard dr at jones.dk
Sat May 7 09:39:09 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit 254198ad47d73ddb7177c6aefde78561046d8c0c
Author: danzel <danzel at localhost.geek.nz>
Date:   Wed Apr 23 10:15:46 2014 +1200

    Do an intersects test rather than a contains when testing for a zoom in. Fixes #344
---
 example/old-bugs/click-cluster-at-screen-edge.html | 2 +-
 src/MarkerClusterGroup.js                          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/example/old-bugs/click-cluster-at-screen-edge.html b/example/old-bugs/click-cluster-at-screen-edge.html
index 6700552..5d1ad33 100644
--- a/example/old-bugs/click-cluster-at-screen-edge.html
+++ b/example/old-bugs/click-cluster-at-screen-edge.html
@@ -19,7 +19,7 @@
 <body>
 
 	<div id="map"></div>
-	<span>Bug <a href="https://github.com/danzel/Leaflet.markercluster/issues/344">#344</a>. Click the cluster at the screen edge. Map will zoom to it and its markers will appear, but it will not disappear.</span><br/>
+	<span>Bug <a href="https://github.com/leaflet/Leaflet.markercluster/issues/344">#344</a>. Click the cluster at the screen edge. Map will zoom to it and its markers will appear, but it will not disappear.</span><br/>
 	<span id="time"></span>
 	<script type="text/javascript">
 
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index da15105..ac5add8 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -852,7 +852,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 		//Incase we are starting to split before the animation finished
 		this._processQueue();
 
-		if (this._zoom < this._map._zoom && this._currentShownBounds.contains(this._getExpandedVisibleBounds())) { //Zoom in, split
+		if (this._zoom < this._map._zoom && this._currentShownBounds.intersects(this._getExpandedVisibleBounds())) { //Zoom in, split
 			this._animationStart();
 			//Remove clusters now off screen
 			this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom, this._getExpandedVisibleBounds());

-- 
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