Skip to content
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] use fixed size Activity Marker #539

Merged
merged 9 commits into from
Aug 20, 2020
3 changes: 2 additions & 1 deletion src/component/mxgraph/shape/activity-shapes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export abstract class BaseActivityShape extends mxRectangleShape {

public paintForeground(c: mxAbstractCanvas2D, x: number, y: number, w: number, h: number): void {
super.paintForeground(c, x, y, w, h);
this.paintMarkerIcons(buildPaintParameter(c, x, y, w, h, this, 0.17, false, 1.5));
// 0 is used for ratioParent as if we pass undefined to builder function the default 0.25 value will be used instead
this.paintMarkerIcons(buildPaintParameter(c, x, y, w, h, this, 0, false, 1.5));
aibcmars marked this conversation as resolved.
Show resolved Hide resolved
}

protected paintMarkerIcons(paintParameter: PaintParameter): void {
Expand Down
8 changes: 4 additions & 4 deletions src/component/mxgraph/shape/render/IconPainter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,14 @@ export default class IconPainter {
// Loop
canvas.begin();
canvas.moveTo(5.5, 19.08);
canvas.arcTo(10, 10, 0, 1, 1, 10.5, 21.08);
canvas.arcTo(8, 8, 0, 1, 1, 10.5, 21.08);
canvas.stroke();

// Arrow
canvas.begin();
canvas.moveTo(5.5, 14.08);
canvas.lineTo(5.5, 19.08);
canvas.lineTo(0, 17.58);
canvas.moveTo(7.5, 14.08);
canvas.lineTo(5.75, 19.08);
canvas.lineTo(0, 17.08);
Comment on lines +543 to +545
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ this seems to have an impact on the rendering that is not nice when zooming (for instance, zoom on the image provided in #539 (comment)).
Anyway, the loop marker may be reworked as part of #475

canvas.close();
canvas.fillAndStroke();
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_1uz6fwe" targetNamespace="http://bpmn.io/schema/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="7.3.0">
<bpmn:process id="Process_083f5uf" isExecutable="false">
<bpmn:task id="instantiating_receive_task_id">
<bpmn:standardLoopCharacteristics />
</bpmn:task>
<bpmn:task id="Activity_07wzx6d">
<bpmn:standardLoopCharacteristics />
</bpmn:task>
<bpmn:task id="Activity_09flk9n">
<bpmn:standardLoopCharacteristics />
</bpmn:task>
<bpmn:subProcess id="Activity_0f0kc37">
<bpmn:multiInstanceLoopCharacteristics isSequential="true" />
</bpmn:subProcess>
<bpmn:subProcess id="Activity_1275x3v">
<bpmn:multiInstanceLoopCharacteristics />
</bpmn:subProcess>
<bpmn:subProcess id="Activity_08mcvdt">
<bpmn:standardLoopCharacteristics />
</bpmn:subProcess>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_083f5uf">
<bpmndi:BPMNShape id="Activity_192uxh5_di" bpmnElement="Activity_07wzx6d">
<dc:Bounds x="210" y="170" width="150" height="120" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1ye8e2h_di" bpmnElement="instantiating_receive_task_id">
<dc:Bounds x="260" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0p4s5xz_di" bpmnElement="Activity_09flk9n">
<dc:Bounds x="160" y="300" width="200" height="160" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0adlpws_di" bpmnElement="Activity_08mcvdt">
<dc:Bounds x="380" y="300" width="200" height="160" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1ewsaw7_di" bpmnElement="Activity_1275x3v">
<dc:Bounds x="380" y="170" width="150" height="120" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0yf9pai_di" bpmnElement="Activity_0f0kc37">
<dc:Bounds x="380" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>