chore(modeling): add non-interrupting start events to ElementFactory

This commit is contained in:
pedesen 2015-08-17 16:40:14 +02:00
parent 3cb1721c89
commit e1876fa3e8
1 changed files with 23 additions and 19 deletions

View File

@ -65,30 +65,34 @@ ElementFactory.prototype.create = function(elementType, attrs) {
} }
} }
if (!!attrs.isExpanded) { if (!!attrs.isExpanded) {
businessObject.di.isExpanded = attrs.isExpanded; businessObject.di.isExpanded = attrs.isExpanded;
} }
if (businessObject.$instanceOf('bpmn:ExclusiveGateway')) { if (businessObject.$instanceOf('bpmn:ExclusiveGateway')) {
businessObject.di.isMarkerVisible = true; businessObject.di.isMarkerVisible = true;
} }
if (attrs._eventDefinitionType) { if (attrs.isInterrupting === false) {
var eventDefinitions = businessObject.get('eventDefinitions') || [], businessObject.isInterrupting = false;
newEventDefinition = this._moddle.create(attrs._eventDefinitionType); }
eventDefinitions.push(newEventDefinition); if (attrs._eventDefinitionType) {
businessObject.eventDefinitions = eventDefinitions; var eventDefinitions = businessObject.get('eventDefinitions') || [],
} newEventDefinition = this._moddle.create(attrs._eventDefinitionType);
size = this._getDefaultSize(businessObject); eventDefinitions.push(newEventDefinition);
businessObject.eventDefinitions = eventDefinitions;
}
attrs = assign({ size = this._getDefaultSize(businessObject);
businessObject: businessObject,
id: businessObject.id
}, size, attrs);
return this.baseCreate(elementType, attrs); attrs = assign({
businessObject: businessObject,
id: businessObject.id
}, size, attrs);
return this.baseCreate(elementType, attrs);
}; };