[Pkg-javascript-commits] [leaflet-markercluster] 425/479: Fix #260 - Zooming in on an area that wasn't inside what we are looking at would cause the newly visible markers not to appear.

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:01:04 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 23cc34156a6e13752d08d0821543df2e1a8ca8a4
Author: danzel <danzel at localhost.geek.nz>
Date:   Mon Oct 14 10:10:14 2013 +1300

    Fix #260 - Zooming in on an area that wasn't inside what we are looking at would cause the newly visible markers not to appear.
---
 src/MarkerClusterGroup.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 8a58a6e..4f33f0c 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -756,7 +756,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 
 	//Merge and split any existing clusters that are too big or small
 	_mergeSplitClusters: function () {
-		if (this._zoom < this._map._zoom) { //Zoom in, split
+		if (this._zoom < this._map._zoom && this._currentShownBounds.contains(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