mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-22 23:08:49 +00:00
feat(features/context-pad): focus elements after append
This commit is contained in:
parent
1947a9c4de
commit
f02b741c85
@ -20,21 +20,23 @@ var images = {
|
||||
*
|
||||
* @param {ContextPad} contextPad
|
||||
*/
|
||||
function ContextPadProvider(contextPad, directEditing, bpmnModeling) {
|
||||
function ContextPadProvider(contextPad, directEditing, bpmnModeling, selection) {
|
||||
|
||||
contextPad.registerProvider(this);
|
||||
|
||||
this._selection = selection;
|
||||
this._directEditing = directEditing;
|
||||
this._bpmnModeling = bpmnModeling;
|
||||
}
|
||||
|
||||
ContextPadProvider.$inject = [ 'contextPad', 'directEditing', 'bpmnModeling' ];
|
||||
ContextPadProvider.$inject = [ 'contextPad', 'directEditing', 'bpmnModeling', 'selection' ];
|
||||
|
||||
|
||||
ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||
|
||||
var directEditing = this._directEditing,
|
||||
bpmnModeling = this._bpmnModeling;
|
||||
bpmnModeling = this._bpmnModeling,
|
||||
selection = this._selection;
|
||||
|
||||
var actions = {};
|
||||
|
||||
@ -46,6 +48,8 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||
|
||||
function append(element, type) {
|
||||
var target = bpmnModeling.appendFlowNode(element, null, type);
|
||||
|
||||
selection.select(target);
|
||||
directEditing.activate(target);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
module.exports = {
|
||||
__depends__: [
|
||||
require('diagram-js/lib/features/context-pad'),
|
||||
require('diagram-js/lib/features/selection'),
|
||||
require('diagram-js-direct-editing'),
|
||||
require('../bpmn-modeling')
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user