diff --git a/js/id/id.js b/js/id/id.js index 2bd2fde6f..b3eddc110 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -264,6 +264,8 @@ window.iD = function () { context.pan = map.pan; context.zoomIn = map.zoomIn; context.zoomOut = map.zoomOut; + context.zoomInFurther = map.zoomInFurther; + context.zoomOutFurther = map.zoomOutFurther; context.surfaceRect = function() { // Work around a bug in Firefox. diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index ed6dd2841..a242dbf27 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -327,8 +327,19 @@ iD.Map = function(context) { return redraw(); }; - map.zoomIn = function() { interpolateZoom(~~map.zoom() + 1); }; - map.zoomOut = function() { interpolateZoom(~~map.zoom() - 1); }; + function zoomIn(integer) { + interpolateZoom(~~map.zoom() + integer); + } + + function zoomOut(integer) { + interpolateZoom(~~map.zoom() - integer); + } + + map.zoomIn = function() { zoomIn(1); }; + map.zoomInFurther = function() { zoomIn(4); }; + + map.zoomOut = function() { zoomOut(1); }; + map.zoomOutFurther = function() { zoomOut(4); }; map.center = function(loc) { if (!arguments.length) { diff --git a/js/id/ui/zoom.js b/js/id/ui/zoom.js index f608e1d2a..ca03cc26a 100644 --- a/js/id/ui/zoom.js +++ b/js/id/ui/zoom.js @@ -33,10 +33,15 @@ iD.ui.Zoom = function(context) { _.each(['=','ffequals','plus','ffplus'], function(key) { keybinding.on(key, function() { context.zoomIn(); }); keybinding.on('⇧' + key, function() { context.zoomIn(); }); + keybinding.on('ctrl+' + key, function() { context.zoomInFurther(); }); + keybinding.on('ctrl+⇧' + key, function() { context.zoomInFurther(); }); }); + _.each(['-','ffminus','_','dash'], function(key) { keybinding.on(key, function() { context.zoomOut(); }); keybinding.on('⇧' + key, function() { context.zoomOut(); }); + keybinding.on('ctrl+' + key, function() { context.zoomOutFurther(); }); + keybinding.on('ctrl+⇧' + key, function() { context.zoomOutFurther(); }); }); d3.select(document)