mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Added shortcut to select parent way
This commit is contained in:
@@ -2258,6 +2258,7 @@ en:
|
||||
next: "Jump to next node"
|
||||
first: "Jump to first node"
|
||||
last: "Jump to last node"
|
||||
parent: "Select parent way"
|
||||
change_parent: "Switch parent way"
|
||||
editing:
|
||||
title: "Editing"
|
||||
|
||||
@@ -158,6 +158,10 @@
|
||||
"shortcuts": ["}", "⇟"],
|
||||
"text": "shortcuts.browsing.vertex_selected.last"
|
||||
},
|
||||
{
|
||||
"shortcuts": [">"],
|
||||
"text": "shortcuts.browsing.vertex_selected.parent"
|
||||
},
|
||||
{
|
||||
"shortcuts": ["\\", "shortcuts.key.pause"],
|
||||
"text": "shortcuts.browsing.vertex_selected.change_parent"
|
||||
|
||||
@@ -245,6 +245,7 @@ export function modeSelect(context, selectedIDs) {
|
||||
.on(utilKeybinding.minusKeys.map((key) => uiCmd('⇧' + key)), scaleSelection(1/1.05))
|
||||
.on(utilKeybinding.minusKeys.map((key) => uiCmd('⇧⌥' + key)), scaleSelection(1/Math.pow(1.05, 5)))
|
||||
.on(['\\', 'pause'], nextParent)
|
||||
.on('>', selectParent)
|
||||
.on('⎋', esc, true);
|
||||
|
||||
d3_select(document)
|
||||
@@ -561,6 +562,15 @@ export function modeSelect(context, selectedIDs) {
|
||||
.classed('related', true);
|
||||
}
|
||||
}
|
||||
|
||||
function selectParent(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
if (_relatedParent) {
|
||||
context.enter(
|
||||
modeSelect(context, [_relatedParent])
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user