mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-02-22 13:48:16 +00:00
fix(draw): only apply fillOpacity on actual fill
This corrects some SVG to image issues. Addresses camunda/camunda-modeler#764
This commit is contained in:
parent
e159b002cd
commit
a77d44455f
@ -265,6 +265,10 @@ export default function BpmnRenderer(
|
||||
fill: 'white'
|
||||
});
|
||||
|
||||
if (attrs.fill === 'none') {
|
||||
delete attrs.fillOpacity;
|
||||
}
|
||||
|
||||
var cx = width / 2,
|
||||
cy = height / 2;
|
||||
|
||||
@ -1532,8 +1536,7 @@ export default function BpmnRenderer(
|
||||
var attrs = {
|
||||
strokeWidth: 1,
|
||||
fill: getFillColor(element),
|
||||
stroke: getStrokeColor(element),
|
||||
fillOpacity: 1
|
||||
stroke: getStrokeColor(element)
|
||||
};
|
||||
|
||||
if (!cancel) {
|
||||
@ -1541,8 +1544,19 @@ export default function BpmnRenderer(
|
||||
attrs.strokeLinecap = 'round';
|
||||
}
|
||||
|
||||
var outer = renderer('bpmn:Event')(parentGfx, element, attrs);
|
||||
/* inner path */ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, assign(attrs, { fill: 'none' }));
|
||||
// apply fillOpacity
|
||||
var outerAttrs = assign({}, attrs, {
|
||||
fillOpacity: 1
|
||||
});
|
||||
|
||||
// apply no-fill
|
||||
var innerAttrs = assign({}, attrs, {
|
||||
fill: 'none'
|
||||
});
|
||||
|
||||
var outer = renderer('bpmn:Event')(parentGfx, element, outerAttrs);
|
||||
|
||||
/* inner path */ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
|
||||
|
||||
renderEventContent(element, parentGfx);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user