parent
d54ee97aa1
commit
bacd2b4322
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
|
||||
function BpmnKeyBindings(keyboard, spaceTool, lassoTool) {
|
||||
function BpmnKeyBindings(keyboard, spaceTool, lassoTool, directEditing, selection) {
|
||||
|
||||
keyboard.addListener(function(key, modifiers) {
|
||||
|
||||
|
@ -22,9 +22,20 @@ function BpmnKeyBindings(keyboard, spaceTool, lassoTool) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
var currentSelection = selection.get();
|
||||
|
||||
// E -> activate direct editing
|
||||
if (key === 69) {
|
||||
if (currentSelection.length) {
|
||||
directEditing.activate(currentSelection[0]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
BpmnKeyBindings.$inject = [ 'keyboard', 'spaceTool', 'lassoTool' ];
|
||||
BpmnKeyBindings.$inject = [ 'keyboard', 'spaceTool', 'lassoTool', 'directEditing', 'selection' ];
|
||||
|
||||
module.exports = BpmnKeyBindings;
|
Loading…
Reference in New Issue