[Pkg-javascript-commits] [leaflet] 48/78: fixed check for maxZoom option to honor maxZoom 0
Jonas Smedegaard
dr at jones.dk
Sat May 7 08:58:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit 162190c5fa6ebff751e34fd41b37f353cbbc05ef
Author: simsibimsiwimsi <simon.hartmann at gmail.com>
Date: Sun Nov 8 22:35:49 2015 +0100
fixed check for maxZoom option to honor maxZoom 0
Checking if maxZoom is a number will work fine for {maxZoom: 0} where
options.maxZoom evaluates to false.
---
src/map/Map.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/map/Map.js b/src/map/Map.js
index 2aa2418..18db347 100644
--- a/src/map/Map.js
+++ b/src/map/Map.js
@@ -98,7 +98,7 @@ L.Map = L.Class.extend({
zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));
- zoom = (options.maxZoom) ? Math.min(options.maxZoom, zoom) : zoom;
+ zoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom;
var paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),
--
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