mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-31 01:09:22 +02:00
Use alt/option instead of ctrl/cmd as the modifier for zooming or panning by a lot (close #7976)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
"separator": ","
|
||||
},
|
||||
{
|
||||
"modifiers": ["⌘"],
|
||||
"modifiers": ["⌥"],
|
||||
"shortcuts": ["↓", "↑", "←", "→"],
|
||||
"text": "shortcuts.browsing.navigation.pan_more",
|
||||
"separator": ","
|
||||
@@ -26,7 +26,7 @@
|
||||
"separator": ","
|
||||
},
|
||||
{
|
||||
"modifiers": ["⌘"],
|
||||
"modifiers": ["⌥"],
|
||||
"shortcuts": ["+", "-"],
|
||||
"text": "shortcuts.browsing.navigation.zoom_more",
|
||||
"separator": ","
|
||||
@@ -276,7 +276,7 @@
|
||||
"separator": ","
|
||||
},
|
||||
{
|
||||
"modifiers": ["⌘", "⇧"],
|
||||
"modifiers": ["⌥", "⇧"],
|
||||
"shortcuts": ["↓", "↑", "←", "→"],
|
||||
"text": "shortcuts.editing.operations.nudge_more",
|
||||
"separator": ","
|
||||
|
||||
@@ -239,10 +239,10 @@ export function modeSelect(context, selectedIDs) {
|
||||
.on(uiCmd('⇧↑'), nudgeSelection([0, -10]))
|
||||
.on(uiCmd('⇧→'), nudgeSelection([10, 0]))
|
||||
.on(uiCmd('⇧↓'), nudgeSelection([0, 10]))
|
||||
.on(uiCmd('⇧⌘←'), nudgeSelection([-100, 0]))
|
||||
.on(uiCmd('⇧⌘↑'), nudgeSelection([0, -100]))
|
||||
.on(uiCmd('⇧⌘→'), nudgeSelection([100, 0]))
|
||||
.on(uiCmd('⇧⌘↓'), nudgeSelection([0, 100]))
|
||||
.on(uiCmd('⇧⌥←'), nudgeSelection([-100, 0]))
|
||||
.on(uiCmd('⇧⌥↑'), nudgeSelection([0, -100]))
|
||||
.on(uiCmd('⇧⌥→'), nudgeSelection([100, 0]))
|
||||
.on(uiCmd('⇧⌥↓'), nudgeSelection([0, 100]))
|
||||
.on(['\\', 'pause'], nextParent)
|
||||
.on('⎋', esc, true);
|
||||
|
||||
|
||||
@@ -356,10 +356,10 @@ export function uiInit(context) {
|
||||
.on('↑', pan([0, panPixels]))
|
||||
.on('→', pan([-panPixels, 0]))
|
||||
.on('↓', pan([0, -panPixels]))
|
||||
.on(uiCmd('⌘←'), pan([map.dimensions()[0], 0]))
|
||||
.on(uiCmd('⌘↑'), pan([0, map.dimensions()[1]]))
|
||||
.on(uiCmd('⌘→'), pan([-map.dimensions()[0], 0]))
|
||||
.on(uiCmd('⌘↓'), pan([0, -map.dimensions()[1]]))
|
||||
.on(uiCmd('⌥←'), pan([map.dimensions()[0], 0]))
|
||||
.on(uiCmd('⌥↑'), pan([0, map.dimensions()[1]]))
|
||||
.on(uiCmd('⌥→'), pan([-map.dimensions()[0], 0]))
|
||||
.on(uiCmd('⌥↓'), pan([0, -map.dimensions()[1]]))
|
||||
.on(uiCmd('⌘' + t('background.key')), function quickSwitch() {
|
||||
if (d3_event) {
|
||||
d3_event.stopImmediatePropagation();
|
||||
|
||||
@@ -97,12 +97,12 @@ export function uiZoom(context) {
|
||||
|
||||
['plus', 'ffplus', '=', 'ffequals'].forEach(function(key) {
|
||||
context.keybinding().on([key], zoomIn);
|
||||
context.keybinding().on([uiCmd('⌘' + key)], zoomInFurther);
|
||||
context.keybinding().on([uiCmd('⌥' + key)], zoomInFurther);
|
||||
});
|
||||
|
||||
['_', '-', 'ffminus', 'dash'].forEach(function(key) {
|
||||
context.keybinding().on([key], zoomOut);
|
||||
context.keybinding().on([uiCmd('⌘' + key)], zoomOutFurther);
|
||||
context.keybinding().on([uiCmd('⌥' + key)], zoomOutFurther);
|
||||
});
|
||||
|
||||
function updateButtonStates() {
|
||||
|
||||
Reference in New Issue
Block a user