mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-07 11:51:35 +00:00
Support zooming with keyboard. Fixes #695
This commit is contained in:
@@ -251,7 +251,11 @@ iD.ui = function(context) {
|
||||
.on('←', pan([pa, 0]))
|
||||
.on('↑', pan([0, pa]))
|
||||
.on('→', pan([-pa, 0]))
|
||||
.on('↓', pan([0, -pa]));
|
||||
.on('↓', pan([0, -pa]))
|
||||
.on('⇧+=', function() { map.zoomIn(); })
|
||||
.on('+', function() { map.zoomIn(); })
|
||||
.on('-', function() { map.zoomOut(); })
|
||||
.on('dash', function() { map.zoomOut(); });
|
||||
|
||||
modes.forEach(function(m) {
|
||||
keybinding.on(m.key, function() { if (map.editable()) context.enter(m); });
|
||||
|
||||
@@ -151,7 +151,7 @@ d3.keybinding = function(namespace) {
|
||||
'=': 187, 'equals': 187,
|
||||
// Comma, or ,
|
||||
',': 188, comma: 188,
|
||||
//'-': 189, //???
|
||||
'dash': 189, //???
|
||||
// Period, or ., or full-stop
|
||||
'.': 190, period: 190, 'full-stop': 190,
|
||||
// Slash, or /, or forward-slash
|
||||
|
||||
Reference in New Issue
Block a user