[Pkg-javascript-commits] [leaflet-markercluster] 30/219: Fix getBounds when removeOutsideVisibleBounds: false is set. fixes #321
    Jonas Smedegaard 
    dr at jones.dk
       
    Sat May  7 09:39:08 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 34eb38f1a7ed6ef1b8b71bffeceabb574e324f0c
Author: danzel <danzel at localhost.geek.nz>
Date:   Mon Mar 3 11:47:53 2014 +1300
    Fix getBounds when removeOutsideVisibleBounds: false is set. fixes #321
---
 src/MarkerClusterGroup.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index bde4a8b..4b77fbf 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -324,12 +324,13 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 	//Override FeatureGroup.getBounds as it doesn't work
 	getBounds: function () {
 		var bounds = new L.LatLngBounds();
+
 		if (this._topClusterLevel) {
 			bounds.extend(this._topClusterLevel._bounds);
-		} else {
-			for (var i = this._needsClustering.length - 1; i >= 0; i--) {
-				bounds.extend(this._needsClustering[i].getLatLng());
-			}
+		}
+
+		for (var i = this._needsClustering.length - 1; i >= 0; i--) {
+			bounds.extend(this._needsClustering[i].getLatLng());
 		}
 
 		bounds.extend(this._nonPointGroup.getBounds());
-- 
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