[Pkg-javascript-commits] [leaflet] 14/301: fix infinite loop in getBounds and setMaxBounds, close #1895, close #1866

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:38 UTC 2014


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

js pushed a commit to branch master
in repository leaflet.

commit 42a78fd86714d66ce20c2fdacdf2ed442902b555
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date:   Thu Jul 25 12:42:09 2013 +0300

    fix infinite loop in getBounds and setMaxBounds, close #1895, close #1866
---
 src/map/Map.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/map/Map.js b/src/map/Map.js
index 0df345c..62f16ef 100644
--- a/src/map/Map.js
+++ b/src/map/Map.js
@@ -345,8 +345,8 @@ L.Map = L.Class.extend({
 	},
 
 	getMinZoom: function () {
-		var z1 = this._layersMinZoom === undefined ? -Infinity : this._layersMinZoom,
-		    z2 = this._boundsMinZoom === undefined ? -Infinity : this._boundsMinZoom;
+		var z1 = this._layersMinZoom === undefined ? 0 : this._layersMinZoom,
+		    z2 = this._boundsMinZoom === undefined ? 0 : this._boundsMinZoom;
 		return this.options.minZoom === undefined ? Math.max(z1, z2) : this.options.minZoom;
 	},
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list