impr(bpmnrenderer): event type inspection

This commit is contained in:
jdotzki 2014-05-21 16:14:17 +02:00
parent 50ef72e0c8
commit 57a9f49e52
1 changed files with 3 additions and 5 deletions

View File

@ -259,14 +259,12 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
}
if (isTypedEvent(event, 'bpmn:CancelEventDefinition') &&
isTypedEvent(event, 'bpmn:TerminateEventDefinition') &&
!bpmnRegistry.getSemantic(data.id).parallelMultiple) {
isTypedEvent(event, 'bpmn:TerminateEventDefinition', { parallelMultiple: false })) {
return renderer('bpmn:MultipleEventDefinition')(p, data, isThrowing);
}
if (isTypedEvent(event, 'bpmn:CancelEventDefinition') &&
isTypedEvent(event, 'bpmn:TerminateEventDefinition') &&
!!bpmnRegistry.getSemantic(data.id).parallelMultiple) {
isTypedEvent(event, 'bpmn:TerminateEventDefinition', { parallelMultiple: true })) {
return renderer('bpmn:ParallelMultipleEventDefinition')(p, data, isThrowing);
}
@ -1518,7 +1516,7 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
}
return _.any(event.eventDefinitions, function(definition) {
return definition.$type === eventDefinitionType && matches(definition, filter);
return definition.$type === eventDefinitionType && matches(event, filter);
});
}