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) {
businessObject.di.isExpanded = attrs.isExpanded;
}
if (!!attrs.isExpanded) {
businessObject.di.isExpanded = attrs.isExpanded;
}
if (businessObject.$instanceOf('bpmn:ExclusiveGateway')) {
businessObject.di.isMarkerVisible = true;
}
if (businessObject.$instanceOf('bpmn:ExclusiveGateway')) {
businessObject.di.isMarkerVisible = true;
}
if (attrs._eventDefinitionType) {
var eventDefinitions = businessObject.get('eventDefinitions') || [],
newEventDefinition = this._moddle.create(attrs._eventDefinitionType);
if (attrs.isInterrupting === false) {
businessObject.isInterrupting = false;
}
eventDefinitions.push(newEventDefinition);
businessObject.eventDefinitions = eventDefinitions;
}
if (attrs._eventDefinitionType) {
var eventDefinitions = businessObject.get('eventDefinitions') || [],
newEventDefinition = this._moddle.create(attrs._eventDefinitionType);
size = this._getDefaultSize(businessObject);
eventDefinitions.push(newEventDefinition);
businessObject.eventDefinitions = eventDefinitions;
}
attrs = assign({
businessObject: businessObject,
id: businessObject.id
}, size, attrs);
size = this._getDefaultSize(businessObject);
return this.baseCreate(elementType, attrs);
attrs = assign({
businessObject: businessObject,
id: businessObject.id
}, size, attrs);
return this.baseCreate(elementType, attrs);
};
@ -133,4 +137,4 @@ ElementFactory.prototype.createParticipantShape = function(collapsed) {
}
return participantShape;
};
};