fix(bpmnrenderer): fixed incorrect rendering of event based gateways
close #42
This commit is contained in:
parent
ab73e2ea22
commit
4a26c14448
|
@ -738,24 +738,25 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
|
|||
'bpmn:EventBasedGateway': function(p, data) {
|
||||
var diamond = drawDiamond(p, data.width, data.height);
|
||||
|
||||
var outerCircle = drawCircle(p, data.width, data.height, data.height * 0.21);
|
||||
var outerCircle = drawCircle(p, data.width, data.height, data.height * 0.20);
|
||||
outerCircle.attr({
|
||||
'stroke-width': 1,
|
||||
'fill': 'None'
|
||||
});
|
||||
|
||||
var type = bpmnRegistry.getSemantic(data.id).eventGatewayType;
|
||||
var instantiate = !!bpmnRegistry.getSemantic(data.id).instantiate;
|
||||
|
||||
function drawEvent() {
|
||||
|
||||
var pathData = pathMap.getScaledPath('GATEWAY_EVENT_BASED', {
|
||||
xScaleFactor: 0.20,
|
||||
yScaleFactor: 0.20,
|
||||
xScaleFactor: 0.18,
|
||||
yScaleFactor: 0.18,
|
||||
containerWidth: data.width,
|
||||
containerHeight: data.height,
|
||||
position: {
|
||||
mx: 0.34,
|
||||
my: 0.43
|
||||
mx: 0.36,
|
||||
my: 0.44
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -784,12 +785,12 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
|
|||
'stroke-width': 1,
|
||||
'fill': 'None'
|
||||
});
|
||||
} else if(type === 'Exclusive') {
|
||||
} else if((type === 'Exclusive') && instantiate) {
|
||||
|
||||
drawEvent();
|
||||
} else {
|
||||
} else if((type === 'Exclusive') && !instantiate) {
|
||||
|
||||
var innerCircle = drawCircle(p, data.width, data.height, data.height * 0.24);
|
||||
var innerCircle = drawCircle(p, data.width, data.height, data.height * 0.26);
|
||||
innerCircle.attr({
|
||||
'stroke-width': 1,
|
||||
'fill': 'None'
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
<bpmn:inclusiveGateway id="InclusiveGateway_1"/>
|
||||
<bpmn:exclusiveGateway id="ExclusiveGateway_1"/>
|
||||
<bpmn:parallelGateway id="ParallelGateway_1"/>
|
||||
<bpmn:eventBasedGateway id="EventBasedGateway_1"/>
|
||||
<bpmn:eventBasedGateway id="EventBasedGateway_1" eventGatewayType="Exclusive" instantiate="false"/>
|
||||
<bpmn:complexGateway id="ComplexGateway_1"/>
|
||||
<bpmn:eventBasedGateway id="EventBasedGateway_2" eventGatewayType="Parallel"/>
|
||||
<bpmn:eventBasedGateway id="EventBasedGateway_3" eventGatewayType="Exclusive"/>
|
||||
<bpmn:eventBasedGateway id="EventBasedGateway_2" eventGatewayType="Parallel" instantiate="true"/>
|
||||
<bpmn:eventBasedGateway id="EventBasedGateway_3" eventGatewayType="Exclusive" instantiate="true"/>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
||||
|
|
Loading…
Reference in New Issue