28 lines
690 B
JavaScript
28 lines
690 B
JavaScript
'use strict';
|
|
|
|
var BaseAppendShapeHandler = require('diagram-js/lib/features/modeling/cmd/AppendShapeHandler');
|
|
|
|
/**
|
|
* A bpmn-aware append shape handler
|
|
*
|
|
* @param {canvas} Canvas
|
|
* @param {elementFactory} ElementFactory
|
|
* @param {modeling} Modeling
|
|
*/
|
|
function AppendShapeHandler(modeling) {
|
|
this._modeling = modeling;
|
|
}
|
|
|
|
AppendShapeHandler.prototype = Object.create(BaseAppendShapeHandler.prototype);
|
|
|
|
module.exports = AppendShapeHandler;
|
|
|
|
AppendShapeHandler.$inject = [ 'modeling' ];
|
|
|
|
|
|
|
|
AppendShapeHandler.prototype.postExecute = function(context) {
|
|
this._modeling.createConnection(context.source, context.shape, {
|
|
type: 'bpmn:SequenceFlow',
|
|
}, context.source.parent);
|
|
}; |