-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Render all Cancel Events #789
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -311,15 +311,32 @@ export default class IconPainter { | |
canvas.fillAndStroke(); | ||
} | ||
|
||
private static drawCrossIcon(canvas: BpmnCanvas): void { | ||
canvas.begin(); | ||
canvas.moveTo(0.38, 0); | ||
canvas.lineTo(0.62, 0); | ||
canvas.lineTo(0.62, 0.38); | ||
canvas.lineTo(1, 0.38); | ||
canvas.lineTo(1, 0.62); | ||
canvas.lineTo(0.62, 0.62); | ||
canvas.lineTo(0.62, 1); | ||
canvas.lineTo(0.38, 1); | ||
canvas.lineTo(0.38, 0.62); | ||
canvas.lineTo(0, 0.62); | ||
canvas.lineTo(0, 0.38); | ||
canvas.lineTo(0.38, 0.38); | ||
canvas.close(); | ||
} | ||
|
||
/** | ||
* This icon is used by `exclusive gateway`. | ||
*/ | ||
public paintXCrossIcon({ c, ratioFromParent, setIconOrigin, shape, icon }: PaintParameter): void { | ||
const canvas = this.newBpmnCanvas({ c, ratioFromParent, setIconOrigin, shape, icon: { ...icon, isFilled: true } }, { height: 0.5, width: 0.5 }); | ||
public paintXCrossIcon(paintParameter: PaintParameter): void { | ||
const canvas = this.newBpmnCanvas(paintParameter, { height: 0.5, width: 0.5 }); | ||
|
||
IconPainter.drawCrossIcon(canvas); | ||
const rotationCenterX = shape.w / 4; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If someone change the ratioFromParent (the size of the icon from the size of the shape), we always want to rotate the icon with the same value. Can you revert this change, please ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forget my previous comment. Thank you very much for having integrate my comments 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the calculation of coordinates of rotation center. |
||
const rotationCenterY = shape.h / 4; | ||
const rotationCenterX = paintParameter.shape.w * paintParameter.ratioFromParent; | ||
const rotationCenterY = paintParameter.shape.h * paintParameter.ratioFromParent; | ||
canvas.rotate(45, false, false, rotationCenterX, rotationCenterY); | ||
canvas.fillAndStroke(); | ||
} | ||
|
@@ -334,23 +351,6 @@ export default class IconPainter { | |
canvas.fillAndStroke(); | ||
} | ||
|
||
private static drawCrossIcon(canvas: BpmnCanvas): void { | ||
canvas.begin(); | ||
canvas.moveTo(0.38, 0); | ||
canvas.lineTo(0.62, 0); | ||
canvas.lineTo(0.62, 0.38); | ||
canvas.lineTo(1, 0.38); | ||
canvas.lineTo(1, 0.62); | ||
canvas.lineTo(0.62, 0.62); | ||
canvas.lineTo(0.62, 1); | ||
canvas.lineTo(0.38, 1); | ||
canvas.lineTo(0.38, 0.62); | ||
canvas.lineTo(0, 0.62); | ||
canvas.lineTo(0, 0.38); | ||
canvas.lineTo(0.38, 0.38); | ||
canvas.close(); | ||
} | ||
|
||
/** | ||
* This icon is used by `user task`. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍