[Pkg-javascript-commits] [leaflet] 109/301: Do not scale above minzoom and maxzoom in touch zoom action
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:45 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 7541d64a717284fe6428f14440bf6bae042365e5
Author: Trevor Powell <trevor.w.powell at gmail.com>
Date: Sun Oct 6 01:20:45 2013 -0500
Do not scale above minzoom and maxzoom in touch zoom action
---
src/map/handler/Map.TouchZoom.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/map/handler/Map.TouchZoom.js b/src/map/handler/Map.TouchZoom.js
index 3dfb241..12b0478 100644
--- a/src/map/handler/Map.TouchZoom.js
+++ b/src/map/handler/Map.TouchZoom.js
@@ -54,7 +54,7 @@ L.Map.TouchZoom = L.Handler.extend({
this._scale = p1.distanceTo(p2) / this._startDist;
this._delta = p1._add(p2)._divideBy(2)._subtract(this._startCenter);
- if (this._scale === 1) { return; }
+ if (this._scale === 1 || (map.getZoom() === map.getMinZoom() && this._scale < 1) || (map.getZoom() === map.getMaxZoom() && this._scale > 1)) { return; }
if (!this._moved) {
L.DomUtil.addClass(map._mapPane, 'leaflet-touching');
--
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