Skip to content

Commit

Permalink
Fix ratio from parent & stroke width of signal icon
Browse files Browse the repository at this point in the history
  • Loading branch information
csouchet committed Jul 22, 2020
1 parent 5f2ca00 commit 398e088
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/component/mxgraph/shape/event-shapes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract class EventShape extends mxEllipse {
[ShapeBpmnEventKind.MESSAGE, (paintParameter: PaintParameter) => this.iconPainter.paintEnvelopeIcon({ ...paintParameter, ratioFromParent: 0.5 })],
[ShapeBpmnEventKind.TERMINATE, (paintParameter: PaintParameter) => this.iconPainter.paintCircleIcon({ ...paintParameter, ratioFromParent: 0.6 })],
[ShapeBpmnEventKind.TIMER, (paintParameter: PaintParameter) => this.iconPainter.paintClockIcon(paintParameter)],
[ShapeBpmnEventKind.SIGNAL, (paintParameter: PaintParameter) => this.iconPainter.paintTriangleIcon({ ...paintParameter, ratioFromParent: 0.5 })],
[ShapeBpmnEventKind.SIGNAL, (paintParameter: PaintParameter) => this.iconPainter.paintTriangleIcon({ ...paintParameter, ratioFromParent: 0.55, icon: { ...paintParameter.icon, strokeWidth: StyleDefault.STROKE_WIDTH_THIN.valueOf() } })],
]);

protected withFilledIcon = false;
Expand Down
1 change: 0 additions & 1 deletion src/component/mxgraph/shape/render/IconPainter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ export default class IconPainter {
style: icon,
},
});
c.setStrokeWidth(StyleDefault.STROKE_WIDTH_THIN); // TODO should be done via icon style, but in that case, the strokeWidth change the ratio from shape
canvas.setIconOriginPosition(4);

canvas.begin();
Expand Down

0 comments on commit 398e088

Please sign in to comment.