[Pkg-javascript-commits] [leaflet] 248/301: add shift-double-click to zoom out, close #2185

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:54 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 07e8198ef6076344b7d6625eefdd2fa863ba561f
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date:   Wed Nov 13 22:13:39 2013 +0200

    add shift-double-click to zoom out, close #2185
---
 src/map/handler/Map.DoubleClickZoom.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/map/handler/Map.DoubleClickZoom.js b/src/map/handler/Map.DoubleClickZoom.js
index 107e1b8..6399734 100644
--- a/src/map/handler/Map.DoubleClickZoom.js
+++ b/src/map/handler/Map.DoubleClickZoom.js
@@ -17,7 +17,7 @@ L.Map.DoubleClickZoom = L.Handler.extend({
 
 	_onDoubleClick: function (e) {
 		var map = this._map,
-		    zoom = map.getZoom() + 1;
+		    zoom = map.getZoom() + (e.originalEvent.shiftKey ? -1 : 1);
 
 		if (map.options.doubleClickZoom === 'center') {
 			map.setZoom(zoom);

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