[Pkg-javascript-commits] [leaflet-markercluster] 397/479: Don't try extend bounds by an invalid bounds, doesn't work on leaflet versions earlier than Leaflet/Leafet at ef17f99708537e1fd8dfd525ea741e80202187d5, to be removed when 0.6 is released.

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:01:01 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 80e2496045e0aff445777801e6f57d6f3d378ea4
Author: danzel <danzel at localhost.geek.nz>
Date:   Tue Jun 25 09:03:53 2013 +1200

    Don't try extend bounds by an invalid bounds, doesn't work on leaflet versions earlier than Leaflet/Leafet at ef17f99708537e1fd8dfd525ea741e80202187d5, to be removed when 0.6 is released.
---
 src/MarkerClusterGroup.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 17b24ad..80b0652 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -278,7 +278,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 			}
 		}
 
-		bounds.extend(this._nonPointGroup.getBounds());
+		//TODO: Can remove this isValid test when leaflet 0.6 is released
+		var nonPointBounds = this._nonPointGroup.getBounds();
+		if (nonPointBounds.isValid()) {
+			bounds.extend(nonPointBounds);
+		}
 
 		return bounds;
 	},

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