mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-11 17:44:12 +00:00
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…
x
Reference in New Issue
Block a user