mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 22:24:49 +02:00
Use space key to toggle radial menu (closes #2706)
This commit is contained in:
+11
-3
@@ -62,6 +62,14 @@ iD.modes.Select = function(context, selectedIDs) {
|
||||
}
|
||||
}
|
||||
|
||||
function toggleMenu() {
|
||||
if (d3.select('.radial-menu').empty()) {
|
||||
showMenu();
|
||||
} else {
|
||||
closeMenu();
|
||||
}
|
||||
}
|
||||
|
||||
mode.selectedIDs = function() {
|
||||
return selectedIDs;
|
||||
};
|
||||
@@ -148,9 +156,9 @@ iD.modes.Select = function(context, selectedIDs) {
|
||||
|
||||
operations.unshift(iD.operations.Delete(selectedIDs, context));
|
||||
|
||||
keybinding.on('⎋', function() {
|
||||
context.enter(iD.modes.Browse(context));
|
||||
}, true);
|
||||
keybinding
|
||||
.on('⎋', function() { context.enter(iD.modes.Browse(context)); }, true)
|
||||
.on('space', toggleMenu);
|
||||
|
||||
operations.forEach(function(operation) {
|
||||
operation.keys.forEach(function(key) {
|
||||
|
||||
Reference in New Issue
Block a user