fix(BpmnRenderer): minor drawing improvements

This fix contributes these improvements

* reset strokeWidth back to 1px for boundary + intermediate events
* unify strokeDasharray for initiating start + cancelActivity boundary
events
* set dataObject fill to white
This commit is contained in:
Nico Rehwaldt 2014-05-28 23:19:41 +02:00
parent 281de42998
commit 0a619a53fd
1 changed files with 27 additions and 25 deletions

View File

@ -340,7 +340,10 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
var semantic = getSemantic(data);
if (!semantic.isInterrupting) {
attrs = { strokeDasharray: '5,2' };
attrs = {
strokeDasharray: '6',
strokeLinecap: 'round'
};
}
var circle = renderer('bpmn:Event')(p, data, attrs);
@ -575,8 +578,8 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
return circle;
},
'bpmn:IntermediateEvent': function(p, data) {
var outer = renderer('bpmn:Event')(p, data);
var inner = drawCircle(p, data.width, data.height, INNER_OUTER_DIST);
var outer = renderer('bpmn:Event')(p, data, { strokeWidth: 1 });
var inner = drawCircle(p, data.width, data.height, INNER_OUTER_DIST, { strokeWidth: 1 });
renderEventContent(data, p);
@ -727,8 +730,8 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
var task = renderer('bpmn:Task')(p, data);
var pathData;
if (!!semantic.instantiate) {
drawCircle(p, 28, 28, 20 * 0.22);
if (semantic.instantiate) {
drawCircle(p, 28, 28, 20 * 0.22, { strokeWidth: 1 });
pathData = pathMap.getScaledPath('TASK_TYPE_INSTANTIATING_SEND', {
abspos: {
@ -1006,16 +1009,16 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
strokeWidth: 1,
fill: 'none'
});
} else if((type === 'Exclusive') && instantiate) {
drawEvent();
} else if((type === 'Exclusive') && !instantiate) {
} else if (type === 'Exclusive') {
if (!instantiate) {
var innerCircle = drawCircle(p, data.width, data.height, data.height * 0.26);
innerCircle.attr({
strokeWidth: 1,
fill: 'none'
});
}
drawEvent();
}
@ -1023,10 +1026,7 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
return diamond;
},
'bpmn:Gateway': function(p, data) {
var diamond = drawDiamond(p, data.width, data.height);
return diamond;
return drawDiamond(p, data.width, data.height);
},
'bpmn:SequenceFlow': function(p, data) {
var pathData = createPathFromWaypoints(data.waypoints);
@ -1123,7 +1123,7 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
}
});
var dataObject = drawPath(p, pathData);
var dataObject = drawPath(p, pathData, { fill: 'white' });
var semantic = getSemantic(data);
@ -1184,15 +1184,17 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) {
var semantic = getSemantic(data),
cancel = semantic.cancelActivity;
var outer = renderer('bpmn:Event')(p, data, cancel ? null : {
var attrs = {
strokeLinecap: 'round',
strokeDasharray: '7,6'
});
strokeWidth: 1
};
var inner = drawCircle(p, data.width, data.height, INNER_OUTER_DIST, cancel ? null : {
strokeLinecap: 'round',
strokeDasharray: '7,6'
});
if (!cancel) {
attrs.strokeDasharray = '6';
}
var outer = renderer('bpmn:Event')(p, data, attrs);
var inner = drawCircle(p, data.width, data.height, INNER_OUTER_DIST, attrs);
renderEventContent(data, p);