From e9760389142ec2c5e2569596d2ff40bc0ecca435 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 15:41:03 -0600 Subject: [PATCH 1/9] update --- .../c4-person-label/dagre/board.exp.json | 519 ++++++++++++++- .../c4-person-label/dagre/sketch.exp.svg | 584 +++++++++-------- .../txtar/c4-person-label/elk/board.exp.json | 421 +++++++++++- .../txtar/c4-person-label/elk/sketch.exp.svg | 584 +++++++++-------- .../c4-person-shape/dagre/board.exp.json | 58 +- .../c4-person-shape/dagre/sketch.exp.svg | 578 ++++++++--------- .../txtar/c4-person-shape/elk/board.exp.json | 42 +- .../txtar/c4-person-shape/elk/sketch.exp.svg | 578 ++++++++--------- .../txtar/c4-theme/dagre/board.exp.json | 172 ++--- .../txtar/c4-theme/dagre/sketch.exp.svg | 612 +++++++++--------- .../txtar/c4-theme/elk/board.exp.json | 86 +-- .../txtar/c4-theme/elk/sketch.exp.svg | 612 +++++++++--------- .../small-c4-person/dagre/board.exp.json | 2 +- .../small-c4-person/dagre/sketch.exp.svg | 156 ++--- .../txtar/small-c4-person/elk/board.exp.json | 2 +- .../txtar/small-c4-person/elk/sketch.exp.svg | 156 ++--- e2etests/txtar.txt | 44 ++ lib/shape/shape_c4_person.go | 76 +-- 18 files changed, 3135 insertions(+), 2147 deletions(-) diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json index d164ab8a8..f0edbecf7 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 0, - "y": 0 + "y": 8 }, "width": 410, - "height": 390, + "height": 284, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,10 +58,10 @@ "type": "c4-person", "pos": { "x": 470, - "y": 0 + "y": 8 }, "width": 410, - "height": 390, + "height": 284, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -100,10 +100,10 @@ "type": "c4-person", "pos": { "x": 940, - "y": 0 + "y": 8 }, "width": 410, - "height": 390, + "height": 284, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -136,9 +136,514 @@ "labelPosition": "INSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "customer1", + "type": "c4-person", + "pos": { + "x": 1410, + "y": 0 + }, + "width": 448, + "height": 299, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank ccountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 388, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer2", + "type": "c4-person", + "pos": { + "x": 1137, + "y": 399 + }, + "width": 457, + "height": 378, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customerk\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 199, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer3", + "type": "c4-person", + "pos": { + "x": 1147, + "y": 877 + }, + "width": 457, + "height": 304, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer4", + "type": "c4-person", + "pos": { + "x": 1426, + "y": 1281 + }, + "width": 457, + "height": 304, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(customer1 -> customer2)[0]", + "src": "customer1", + "srcArrow": "none", + "dst": "customer2", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1436, + "y": 297 + }, + { + "x": 1379.5999755859375, + "y": 338.6000061035156 + }, + { + "x": 1365.5999755859375, + "y": 359 + }, + { + "x": 1366, + "y": 399 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer2 -> customer3)[0]", + "src": "customer2", + "srcArrow": "none", + "dst": "customer3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1358, + "y": 777 + }, + { + "x": 1356, + "y": 817 + }, + { + "x": 1356.5999755859375, + "y": 837.2000122070312 + }, + { + "x": 1361, + "y": 878 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer3 -> customer4)[0]", + "src": "customer3", + "srcArrow": "none", + "dst": "customer4", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1375, + "y": 1181 + }, + { + "x": 1375.4000244140625, + "y": 1221 + }, + { + "x": 1415, + "y": 1259.5999755859375 + }, + { + "x": 1573, + "y": 1374 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer4 -> customer1)[0]", + "src": "customer4", + "srcArrow": "none", + "dst": "customer1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1654, + "y": 1281 + }, + { + "x": 1654, + "y": 1241 + }, + { + "x": 1654, + "y": 1190.5999755859375 + }, + { + "x": 1654, + "y": 1130 + }, + { + "x": 1654, + "y": 1069.4000244140625 + }, + { + "x": 1654, + "y": 988.5999755859375 + }, + { + "x": 1654, + "y": 928 + }, + { + "x": 1654, + "y": 867.4000244140625 + }, + { + "x": 1654, + "y": 779.2000122070312 + }, + { + "x": 1654, + "y": 707.5 + }, + { + "x": 1654, + "y": 635.7999877929688 + }, + { + "x": 1653, + "y": 339 + }, + { + "x": 1649, + "y": 299 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer1 -> customer3)[0]", + "src": "customer1", + "srcArrow": "none", + "dst": "customer3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1634, + "y": 299 + }, + { + "x": 1634, + "y": 339 + }, + { + "x": 1634, + "y": 396.79998779296875 + }, + { + "x": 1634, + "y": 468.5 + }, + { + "x": 1634, + "y": 540.2000122070312 + }, + { + "x": 1598.800048828125, + "y": 854.5999755859375 + }, + { + "x": 1458, + "y": 965 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer3 -> customer2)[0]", + "src": "customer3", + "srcArrow": "none", + "dst": "customer2", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1442, + "y": 911 + }, + { + "x": 1480.199951171875, + "y": 843.7999877929688 + }, + { + "x": 1484.5999755859375, + "y": 817 + }, + { + "x": 1464, + "y": 777 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 } ], - "connections": [], "root": { "id": "", "type": "", diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg index bab515547..7c7343d0c 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg @@ -1,14 +1,14 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-
- - - - +

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank ccountskks.

+

Personal Banking Customerk

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+

A customer of the bank, with pekkrsonal bank accountskks.

+

A customer of the bank, with pekkrsonal bank accountskks.

+

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+
+ + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json index 636de29e5..f55b84f10 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 12, - "y": 12 + "y": 19 }, "width": 410, - "height": 390, + "height": 284, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -57,11 +57,11 @@ "id": "c4mdperson2", "type": "c4-person", "pos": { - "x": 442, - "y": 12 + "x": 441, + "y": 19 }, "width": 410, - "height": 390, + "height": 284, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -99,11 +99,11 @@ "id": "c4mdperson3", "type": "c4-person", "pos": { - "x": 872, - "y": 12 + "x": 871, + "y": 19 }, "width": 410, - "height": 390, + "height": 284, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -136,9 +136,412 @@ "labelPosition": "INSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "customer1", + "type": "c4-person", + "pos": { + "x": 1301, + "y": 12 + }, + "width": 448, + "height": 299, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank ccountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 388, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer2", + "type": "c4-person", + "pos": { + "x": 1028, + "y": 391 + }, + "width": 457, + "height": 378, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customerk\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 199, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer3", + "type": "c4-person", + "pos": { + "x": 1123, + "y": 849 + }, + "width": 457, + "height": 304, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer4", + "type": "c4-person", + "pos": { + "x": 1313, + "y": 1233 + }, + "width": 457, + "height": 304, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(customer1 -> customer2)[0]", + "src": "customer1", + "srcArrow": "none", + "dst": "customer2", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1414, + "y": 311 + }, + { + "x": 1414, + "y": 540 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer2 -> customer3)[0]", + "src": "customer2", + "srcArrow": "none", + "dst": "customer3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1237, + "y": 769 + }, + { + "x": 1237, + "y": 997 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer3 -> customer4)[0]", + "src": "customer3", + "srcArrow": "none", + "dst": "customer4", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1465, + "y": 1153 + }, + { + "x": 1466, + "y": 1284 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer4 -> customer1)[0]", + "src": "customer4", + "srcArrow": "none", + "dst": "customer1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1620, + "y": 1290 + }, + { + "x": 1620, + "y": 311 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer1 -> customer3)[0]", + "src": "customer1", + "srcArrow": "none", + "dst": "customer3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1526, + "y": 311 + }, + { + "x": 1526, + "y": 997 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer3 -> customer2)[0]", + "src": "customer3", + "srcArrow": "none", + "dst": "customer2", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1334, + "y": 851 + }, + { + "x": 1334, + "y": 769 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 } ], - "connections": [], "root": { "id": "", "type": "", diff --git a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg index bfadee541..aafc758b9 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg @@ -1,14 +1,14 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-
- - - - +

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank ccountskks.

+

Personal Banking Customerk

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+

A customer of the bank, with pekkrsonal bank accountskks.

+

A customer of the bank, with pekkrsonal bank accountskks.

+

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+
+ + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json index 279169e81..196f6f710 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 0, - "y": 504 + "y": 469 }, "width": 336, - "height": 328, + "height": 286, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -61,7 +61,7 @@ "y": 0 }, "width": 139, - "height": 132, + "height": 107, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 101, - "y": 309 + "y": 279 }, "width": 134, "height": 89, @@ -142,10 +142,10 @@ "type": "rectangle", "pos": { "x": 386, - "y": 273 + "y": 248 }, "width": 210, - "height": 515, + "height": 484, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -184,10 +184,10 @@ "type": "c4-person", "pos": { "x": 449, - "y": 303 + "y": 278 }, "width": 84, - "height": 101, + "height": 91, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 416, - "y": 578 + "y": 522 }, "width": 150, "height": 180, @@ -292,19 +292,19 @@ "route": [ { "x": 168, - "y": 424 + "y": 394 }, { "x": 168, - "y": 448 + "y": 414 }, { "x": 168, - "y": 461 + "y": 429 }, { "x": 168, - "y": 489 + "y": 469 } ], "isCurve": true, @@ -339,20 +339,20 @@ "link": "", "route": [ { - "x": 262, - "y": 119 + "x": 263, + "y": 100 }, { - "x": 186.8000030517578, - "y": 177.8000030517578 + "x": 187, + "y": 154 }, { "x": 168, - "y": 264.20001220703125 + "y": 238.1999969482422 }, { "x": 168, - "y": 309 + "y": 279 } ], "isCurve": true, @@ -387,20 +387,20 @@ "link": "", "route": [ { - "x": 397, - "y": 119 + "x": 395, + "y": 100 }, { - "x": 472.20001220703125, - "y": 177.8000030517578 + "x": 471.79998779296875, + "y": 154 }, { "x": 491, - "y": 263 + "y": 238 }, { "x": 491, - "y": 303 + "y": 278 } ], "isCurve": true, @@ -436,19 +436,19 @@ "route": [ { "x": 491, - "y": 405 + "y": 369 }, { "x": 491, - "y": 444.20001220703125 + "y": 409 }, { "x": 491, - "y": 478.6000061035156 + "y": 439.6000061035156 }, { "x": 491, - "y": 577 + "y": 522 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg index 65e12a1b3..e3498e842 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json index 95cb99c31..7c1686a85 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 12, - "y": 935 + "y": 900 }, "width": 336, - "height": 328, + "height": 286, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -61,7 +61,7 @@ "y": 12 }, "width": 139, - "height": 132, + "height": 107, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 113, - "y": 750 + "y": 715 }, "width": 134, "height": 89, @@ -142,10 +142,10 @@ "type": "rectangle", "pos": { "x": 256, - "y": 229 + "y": 204 }, "width": 250, - "height": 451, + "height": 441, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -184,10 +184,10 @@ "type": "c4-person", "pos": { "x": 339, - "y": 279 + "y": 254 }, "width": 84, - "height": 101, + "height": 91, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 306, - "y": 450 + "y": 415 }, "width": 150, "height": 180, @@ -292,11 +292,11 @@ "route": [ { "x": 180, - "y": 865 + "y": 830 }, { "x": 180, - "y": 920 + "y": 900 } ], "animated": false, @@ -331,19 +331,19 @@ "route": [ { "x": 258, - "y": 144 + "y": 119 }, { "x": 257.5830078125, - "y": 184 + "y": 159 }, { "x": 180, - "y": 184 + "y": 159 }, { "x": 180, - "y": 750 + "y": 715 } ], "animated": false, @@ -378,19 +378,19 @@ "route": [ { "x": 304, - "y": 144 + "y": 119 }, { "x": 303.9159851074219, - "y": 184 + "y": 159 }, { "x": 381.5, - "y": 184 + "y": 159 }, { "x": 382, - "y": 279 + "y": 254 } ], "animated": false, @@ -425,11 +425,11 @@ "route": [ { "x": 381, - "y": 381 + "y": 345 }, { "x": 382, - "y": 449 + "y": 415 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg index d7fdb9e74..ec77604b2 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json index e462c9a73..9f035283b 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json @@ -19,7 +19,7 @@ "y": 0 }, "width": 415, - "height": 394, + "height": 285, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,7 +58,7 @@ "type": "rectangle", "pos": { "x": 147, - "y": 551 + "y": 442 }, "width": 2407, "height": 915, @@ -100,7 +100,7 @@ "type": "rectangle", "pos": { "x": 177, - "y": 581 + "y": 472 }, "width": 550, "height": 164, @@ -142,7 +142,7 @@ "type": "rectangle", "pos": { "x": 390, - "y": 866 + "y": 757 }, "width": 609, "height": 164, @@ -184,7 +184,7 @@ "type": "rectangle", "pos": { "x": 1123, - "y": 866 + "y": 757 }, "width": 707, "height": 164, @@ -226,7 +226,7 @@ "type": "rectangle", "pos": { "x": 1246, - "y": 1167 + "y": 1058 }, "width": 461, "height": 164, @@ -268,7 +268,7 @@ "type": "rectangle", "pos": { "x": 1890, - "y": 866 + "y": 757 }, "width": 634, "height": 164, @@ -310,7 +310,7 @@ "type": "rectangle", "pos": { "x": 2410, - "y": 1603 + "y": 1494 }, "width": 360, "height": 164, @@ -352,7 +352,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 1603 + "y": 1494 }, "width": 629, "height": 164, @@ -418,19 +418,19 @@ "route": [ { "x": 1089, - "y": 262 + "y": 194 }, { "x": 579.4000244140625, - "y": 422.3999938964844 + "y": 321.6000061035156 }, { "x": 452, - "y": 541 + "y": 432 }, { "x": 452, - "y": 581 + "y": 472 } ], "isCurve": true, @@ -466,19 +466,19 @@ "route": [ { "x": 452, - "y": 744.5 + "y": 635.5 }, { "x": 452, - "y": 793.2999877929688 + "y": 684.2999877929688 }, { "x": 472.3999938964844, - "y": 817.7000122070312 + "y": 708.7000122070312 }, { "x": 554, - "y": 866.5 + "y": 757.5 } ], "isCurve": true, @@ -513,44 +513,44 @@ "link": "", "route": [ { - "x": 1092, - "y": 348 + "x": 1093, + "y": 262 }, { - "x": 968, - "y": 439.6000061035156 + "x": 968.2000122070312, + "y": 335.20001220703125 }, { "x": 937, - "y": 476.20001220703125 + "y": 367.20001220703125 }, { "x": 937, - "y": 496.75 + "y": 387.75 }, { "x": 937, - "y": 517.2990112304688 + "y": 408.29998779296875 }, { "x": 937, - "y": 557.4000244140625 + "y": 448.3999938964844 }, { "x": 937, - "y": 597 + "y": 488 }, { "x": 937, - "y": 636.5999755859375 + "y": 527.5999755859375 }, { "x": 916.5999755859375, - "y": 817.7000122070312 + "y": 708.7000122070312 }, { "x": 835, - "y": 866.5 + "y": 757.5 } ], "isCurve": true, @@ -585,44 +585,44 @@ "link": "", "route": [ { - "x": 1430, - "y": 394 + "x": 1418, + "y": 285 }, { - "x": 1466.800048828125, - "y": 448.79998779296875 + "x": 1464.4000244140625, + "y": 339.79998779296875 }, { "x": 1476, - "y": 476.20001220703125 + "y": 367.20001220703125 }, { "x": 1476, - "y": 496.75 + "y": 387.75 }, { "x": 1476, - "y": 517.2990112304688 + "y": 408.29998779296875 }, { "x": 1476, - "y": 557.4000244140625 + "y": 448.3999938964844 }, { "x": 1476, - "y": 597 + "y": 488 }, { "x": 1476, - "y": 636.5999755859375 + "y": 527.5999755859375 }, { "x": 1476, - "y": 817.7000122070312 + "y": 708.7000122070312 }, { "x": 1476, - "y": 866.5 + "y": 757.5 } ], "isCurve": true, @@ -658,19 +658,19 @@ "route": [ { "x": 694.5, - "y": 1029.5 + "y": 920.5 }, { "x": 694.5, - "y": 1084.699951171875 + "y": 975.7000122070312 }, { "x": 804.7000122070312, - "y": 1119.7220458984375 + "y": 1010.7219848632812 }, { "x": 1245.5, - "y": 1204.6099853515625 + "y": 1095.6099853515625 } ], "isCurve": true, @@ -706,19 +706,19 @@ "route": [ { "x": 1476, - "y": 1029.5 + "y": 920.5 }, { "x": 1476, - "y": 1084.699951171875 + "y": 975.7000122070312 }, { "x": 1476, - "y": 1112.300048828125 + "y": 1003.2999877929688 }, { "x": 1476, - "y": 1167.5 + "y": 1058.5 } ], "isCurve": true, @@ -754,19 +754,19 @@ "route": [ { "x": 1245.5, - "y": 1275.1949462890625 + "y": 1166.1949462890625 }, { "x": 500.6990051269531, - "y": 1427.8389892578125 + "y": 1318.8389892578125 }, { "x": 314.5, - "y": 1548.300048828125 + "y": 1439.300048828125 }, { "x": 314.5, - "y": 1603.5 + "y": 1494.5 } ], "isCurve": true, @@ -802,103 +802,103 @@ "route": [ { "x": 1505, - "y": 238 + "y": 175 }, { "x": 2410.60009765625, - "y": 417.6000061035156 + "y": 317.79998779296875 }, { "x": 2637, - "y": 476.20001220703125 + "y": 367.20001220703125 }, { "x": 2637, - "y": 496.75 + "y": 387.75 }, { "x": 2637, - "y": 517.2990112304688 + "y": 408.29998779296875 }, { "x": 2637, - "y": 557.4000244140625 + "y": 448.3999938964844 }, { "x": 2637, - "y": 597 + "y": 488 }, { "x": 2637, - "y": 636.5999755859375 + "y": 527.5999755859375 }, { "x": 2637, - "y": 691.5 + "y": 582.5 }, { "x": 2637, - "y": 734.25 + "y": 625.25 }, { "x": 2637, - "y": 777 + "y": 668 }, { "x": 2637, - "y": 834 + "y": 725 }, { "x": 2637, - "y": 876.75 + "y": 767.75 }, { "x": 2637, - "y": 919.5 + "y": 810.5 }, { "x": 2637, - "y": 978.0999755859375 + "y": 869.0999755859375 }, { "x": 2637, - "y": 1023.25 + "y": 914.25 }, { "x": 2637, - "y": 1068.4000244140625 + "y": 959.4000244140625 }, { "x": 2637, - "y": 1128.5999755859375 + "y": 1019.5999755859375 }, { "x": 2637, - "y": 1173.75 + "y": 1064.75 }, { "x": 2637, - "y": 1218.9000244140625 + "y": 1109.9000244140625 }, { "x": 2637, - "y": 1292.4000244140625 + "y": 1183.4000244140625 }, { "x": 2637, - "y": 1357.5 + "y": 1248.5 }, { "x": 2637, - "y": 1422.5999755859375 + "y": 1313.5999755859375 }, { "x": 2632.800048828125, - "y": 1548.300048828125 + "y": 1439.300048828125 }, { "x": 2616, - "y": 1603.5 + "y": 1494.5 } ], "isCurve": true, @@ -934,19 +934,19 @@ "route": [ { "x": 1707.5, - "y": 1282.843994140625 + "y": 1173.843994140625 }, { "x": 2241.5, - "y": 1429.3680419921875 + "y": 1320.3680419921875 }, { "x": 2394.39990234375, - "y": 1548.300048828125 + "y": 1439.300048828125 }, { "x": 2472, - "y": 1603.5 + "y": 1494.5 } ], "isCurve": true, @@ -982,19 +982,19 @@ "route": [ { "x": 2206.5, - "y": 1029.5 + "y": 920.5 }, { "x": 2206.5, - "y": 1084.699951171875 + "y": 975.7000122070312 }, { "x": 2106.5, - "y": 1119.0999755859375 + "y": 1010.0999755859375 }, { "x": 1706.5, - "y": 1201.5 + "y": 1092.5 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg index 2613fb8b3..4e4ff9f84 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

-

Internet Banking System

+

Internet Banking System

[Software System]

-

E-mail System

+

E-mail System

[Software System]

The internal Microsoft Exchange e-mail system.

-

Mainframe Banking System

+

Mainframe Banking System

[Software System]

Stores all of the core banking information about customers, accounts, transactions, etc.

-

Web Application

+

Web Application

[Container: Java and Spring MVC]

Delivers the static content and the Internet banking single page application.

-

Single-Page Application

+

Single-Page Application

[Container: JavaScript and Angular]

Provides all of the Internet banking functionality to customers via their web browser.

-

Mobile App

+

Mobile App

[Container: Xamarin]

Provides a limited subset of the Internet banking functionality to customers via their mobile device.

-

API Application

+

API Application

[Container: Java and Spring MVC]

Provides Internet banking functionality via a JSON/HTTPS API.

-

Database

+

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - - - - - - - - - - - - - - - - - - - - +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/elk/board.exp.json b/e2etests/testdata/txtar/c4-theme/elk/board.exp.json index 4d6d3ccd8..3d9b2d3b7 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/elk/board.exp.json @@ -19,7 +19,7 @@ "y": 12 }, "width": 415, - "height": 394, + "height": 285, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,7 +58,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 658 + "y": 549 }, "width": 2218, "height": 1035, @@ -100,7 +100,7 @@ "type": "rectangle", "pos": { "x": 62, - "y": 708 + "y": 599 }, "width": 550, "height": 164, @@ -142,7 +142,7 @@ "type": "rectangle", "pos": { "x": 190, - "y": 1043 + "y": 934 }, "width": 609, "height": 164, @@ -184,7 +184,7 @@ "type": "rectangle", "pos": { "x": 819, - "y": 1043 + "y": 934 }, "width": 707, "height": 164, @@ -226,7 +226,7 @@ "type": "rectangle", "pos": { "x": 942, - "y": 1394 + "y": 1285 }, "width": 461, "height": 164, @@ -268,7 +268,7 @@ "type": "rectangle", "pos": { "x": 1546, - "y": 1043 + "y": 934 }, "width": 634, "height": 164, @@ -310,7 +310,7 @@ "type": "rectangle", "pos": { "x": 1746, - "y": 1895 + "y": 1786 }, "width": 360, "height": 164, @@ -352,7 +352,7 @@ "type": "rectangle", "pos": { "x": 781, - "y": 1895 + "y": 1786 }, "width": 629, "height": 164, @@ -418,19 +418,19 @@ "route": [ { "x": 788, - "y": 406 + "y": 297 }, { "x": 787.75, - "y": 446 + "y": 337 }, { "x": 359.25, - "y": 446 + "y": 337 }, { "x": 359.25, - "y": 708 + "y": 599 } ], "animated": false, @@ -465,11 +465,11 @@ "route": [ { "x": 393, - "y": 872 + "y": 763 }, { "x": 393, - "y": 1043 + "y": 934 } ], "animated": false, @@ -504,19 +504,19 @@ "route": [ { "x": 871, - "y": 406 + "y": 297 }, { "x": 870.75, - "y": 496 + "y": 387 }, { "x": 652, - "y": 496 + "y": 387 }, { "x": 652, - "y": 1043 + "y": 934 } ], "animated": false, @@ -551,11 +551,11 @@ "route": [ { "x": 954, - "y": 406 + "y": 297 }, { "x": 953.75, - "y": 1043 + "y": 934 } ], "animated": false, @@ -590,19 +590,19 @@ "route": [ { "x": 494.5, - "y": 1207 + "y": 1098 }, { "x": 494.5, - "y": 1354 + "y": 1245 }, { "x": 1057.25, - "y": 1354 + "y": 1245 }, { "x": 1057.25, - "y": 1394 + "y": 1285 } ], "animated": false, @@ -637,11 +637,11 @@ "route": [ { "x": 1172.5, - "y": 1207 + "y": 1098 }, { "x": 1172.5, - "y": 1394 + "y": 1285 } ], "animated": false, @@ -676,11 +676,11 @@ "route": [ { "x": 1095.666015625, - "y": 1558 + "y": 1449 }, { "x": 1095.666015625, - "y": 1895 + "y": 1786 } ], "animated": false, @@ -715,27 +715,27 @@ "route": [ { "x": 1037, - "y": 406 + "y": 297 }, { "x": 1036.75, - "y": 446 + "y": 337 }, { "x": 2303.5, - "y": 446 + "y": 337 }, { "x": 2303.5, - "y": 1855 + "y": 1746 }, { "x": 1986.8330078125, - "y": 1855 + "y": 1746 }, { "x": 1986.8330078125, - "y": 1895 + "y": 1786 } ], "animated": false, @@ -770,19 +770,19 @@ "route": [ { "x": 1249.3330078125, - "y": 1558 + "y": 1449 }, { "x": 1249.3330078125, - "y": 1855 + "y": 1746 }, { "x": 1866.8330078125, - "y": 1855 + "y": 1746 }, { "x": 1866.8330078125, - "y": 1895 + "y": 1786 } ], "animated": false, @@ -817,19 +817,19 @@ "route": [ { "x": 1863, - "y": 1207 + "y": 1098 }, { "x": 1863, - "y": 1354 + "y": 1245 }, { "x": 1287.75, - "y": 1354 + "y": 1245 }, { "x": 1287.75, - "y": 1394 + "y": 1285 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg index 31b06adcb..dc7185d81 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

-

Internet Banking System

+

Internet Banking System

[Software System]

-

E-mail System

+

E-mail System

[Software System]

The internal Microsoft Exchange e-mail system.

-

Mainframe Banking System

+

Mainframe Banking System

[Software System]

Stores all of the core banking information about customers, accounts, transactions, etc.

-

Web Application

+

Web Application

[Container: Java and Spring MVC]

Delivers the static content and the Internet banking single page application.

-

Single-Page Application

+

Single-Page Application

[Container: JavaScript and Angular]

Provides all of the Internet banking functionality to customers via their web browser.

-

Mobile App

+

Mobile App

[Container: Xamarin]

Provides a limited subset of the Internet banking functionality to customers via their mobile device.

-

API Application

+

API Application

[Container: Java and Spring MVC]

Provides Internet banking functionality via a JSON/HTTPS API.

-

Database

+

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - - - - - - - - - - - - - - - - - - - - +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json b/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json index e0d8c0959..3b7bdaf8e 100644 --- a/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json +++ b/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json @@ -19,7 +19,7 @@ "y": 0 }, "width": 180, - "height": 94, + "height": 85, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, diff --git a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg index 009c53f4e..6f92c0949 100644 --- a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg @@ -1,9 +1,9 @@ -c4-person - - + .d2-680955506 .fill-N1{fill:#0A0F25;} + .d2-680955506 .fill-N2{fill:#676C7E;} + .d2-680955506 .fill-N3{fill:#9499AB;} + .d2-680955506 .fill-N4{fill:#CFD2DD;} + .d2-680955506 .fill-N5{fill:#DEE1EB;} + .d2-680955506 .fill-N6{fill:#EEF1F8;} + .d2-680955506 .fill-N7{fill:#FFFFFF;} + .d2-680955506 .fill-B1{fill:#0D32B2;} + .d2-680955506 .fill-B2{fill:#0D32B2;} + .d2-680955506 .fill-B3{fill:#E3E9FD;} + .d2-680955506 .fill-B4{fill:#E3E9FD;} + .d2-680955506 .fill-B5{fill:#EDF0FD;} + .d2-680955506 .fill-B6{fill:#F7F8FE;} + .d2-680955506 .fill-AA2{fill:#4A6FF3;} + .d2-680955506 .fill-AA4{fill:#EDF0FD;} + .d2-680955506 .fill-AA5{fill:#F7F8FE;} + .d2-680955506 .fill-AB4{fill:#EDF0FD;} + .d2-680955506 .fill-AB5{fill:#F7F8FE;} + .d2-680955506 .stroke-N1{stroke:#0A0F25;} + .d2-680955506 .stroke-N2{stroke:#676C7E;} + .d2-680955506 .stroke-N3{stroke:#9499AB;} + .d2-680955506 .stroke-N4{stroke:#CFD2DD;} + .d2-680955506 .stroke-N5{stroke:#DEE1EB;} + .d2-680955506 .stroke-N6{stroke:#EEF1F8;} + .d2-680955506 .stroke-N7{stroke:#FFFFFF;} + .d2-680955506 .stroke-B1{stroke:#0D32B2;} + .d2-680955506 .stroke-B2{stroke:#0D32B2;} + .d2-680955506 .stroke-B3{stroke:#E3E9FD;} + .d2-680955506 .stroke-B4{stroke:#E3E9FD;} + .d2-680955506 .stroke-B5{stroke:#EDF0FD;} + .d2-680955506 .stroke-B6{stroke:#F7F8FE;} + .d2-680955506 .stroke-AA2{stroke:#4A6FF3;} + .d2-680955506 .stroke-AA4{stroke:#EDF0FD;} + .d2-680955506 .stroke-AA5{stroke:#F7F8FE;} + .d2-680955506 .stroke-AB4{stroke:#EDF0FD;} + .d2-680955506 .stroke-AB5{stroke:#F7F8FE;} + .d2-680955506 .background-color-N1{background-color:#0A0F25;} + .d2-680955506 .background-color-N2{background-color:#676C7E;} + .d2-680955506 .background-color-N3{background-color:#9499AB;} + .d2-680955506 .background-color-N4{background-color:#CFD2DD;} + .d2-680955506 .background-color-N5{background-color:#DEE1EB;} + .d2-680955506 .background-color-N6{background-color:#EEF1F8;} + .d2-680955506 .background-color-N7{background-color:#FFFFFF;} + .d2-680955506 .background-color-B1{background-color:#0D32B2;} + .d2-680955506 .background-color-B2{background-color:#0D32B2;} + .d2-680955506 .background-color-B3{background-color:#E3E9FD;} + .d2-680955506 .background-color-B4{background-color:#E3E9FD;} + .d2-680955506 .background-color-B5{background-color:#EDF0FD;} + .d2-680955506 .background-color-B6{background-color:#F7F8FE;} + .d2-680955506 .background-color-AA2{background-color:#4A6FF3;} + .d2-680955506 .background-color-AA4{background-color:#EDF0FD;} + .d2-680955506 .background-color-AA5{background-color:#F7F8FE;} + .d2-680955506 .background-color-AB4{background-color:#EDF0FD;} + .d2-680955506 .background-color-AB5{background-color:#F7F8FE;} + .d2-680955506 .color-N1{color:#0A0F25;} + .d2-680955506 .color-N2{color:#676C7E;} + .d2-680955506 .color-N3{color:#9499AB;} + .d2-680955506 .color-N4{color:#CFD2DD;} + .d2-680955506 .color-N5{color:#DEE1EB;} + .d2-680955506 .color-N6{color:#EEF1F8;} + .d2-680955506 .color-N7{color:#FFFFFF;} + .d2-680955506 .color-B1{color:#0D32B2;} + .d2-680955506 .color-B2{color:#0D32B2;} + .d2-680955506 .color-B3{color:#E3E9FD;} + .d2-680955506 .color-B4{color:#E3E9FD;} + .d2-680955506 .color-B5{color:#EDF0FD;} + .d2-680955506 .color-B6{color:#F7F8FE;} + .d2-680955506 .color-AA2{color:#4A6FF3;} + .d2-680955506 .color-AA4{color:#EDF0FD;} + .d2-680955506 .color-AA5{color:#F7F8FE;} + .d2-680955506 .color-AB4{color:#EDF0FD;} + .d2-680955506 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-680955506);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-680955506);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-680955506);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-680955506);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-680955506);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-680955506);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-680955506);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-680955506);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json b/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json index 56a15e872..342178f5f 100644 --- a/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json +++ b/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json @@ -19,7 +19,7 @@ "y": 12 }, "width": 180, - "height": 94, + "height": 85, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, diff --git a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg index 4de020608..d41c6027d 100644 --- a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -c4-person - - + .d2-2607365194 .fill-N1{fill:#0A0F25;} + .d2-2607365194 .fill-N2{fill:#676C7E;} + .d2-2607365194 .fill-N3{fill:#9499AB;} + .d2-2607365194 .fill-N4{fill:#CFD2DD;} + .d2-2607365194 .fill-N5{fill:#DEE1EB;} + .d2-2607365194 .fill-N6{fill:#EEF1F8;} + .d2-2607365194 .fill-N7{fill:#FFFFFF;} + .d2-2607365194 .fill-B1{fill:#0D32B2;} + .d2-2607365194 .fill-B2{fill:#0D32B2;} + .d2-2607365194 .fill-B3{fill:#E3E9FD;} + .d2-2607365194 .fill-B4{fill:#E3E9FD;} + .d2-2607365194 .fill-B5{fill:#EDF0FD;} + .d2-2607365194 .fill-B6{fill:#F7F8FE;} + .d2-2607365194 .fill-AA2{fill:#4A6FF3;} + .d2-2607365194 .fill-AA4{fill:#EDF0FD;} + .d2-2607365194 .fill-AA5{fill:#F7F8FE;} + .d2-2607365194 .fill-AB4{fill:#EDF0FD;} + .d2-2607365194 .fill-AB5{fill:#F7F8FE;} + .d2-2607365194 .stroke-N1{stroke:#0A0F25;} + .d2-2607365194 .stroke-N2{stroke:#676C7E;} + .d2-2607365194 .stroke-N3{stroke:#9499AB;} + .d2-2607365194 .stroke-N4{stroke:#CFD2DD;} + .d2-2607365194 .stroke-N5{stroke:#DEE1EB;} + .d2-2607365194 .stroke-N6{stroke:#EEF1F8;} + .d2-2607365194 .stroke-N7{stroke:#FFFFFF;} + .d2-2607365194 .stroke-B1{stroke:#0D32B2;} + .d2-2607365194 .stroke-B2{stroke:#0D32B2;} + .d2-2607365194 .stroke-B3{stroke:#E3E9FD;} + .d2-2607365194 .stroke-B4{stroke:#E3E9FD;} + .d2-2607365194 .stroke-B5{stroke:#EDF0FD;} + .d2-2607365194 .stroke-B6{stroke:#F7F8FE;} + .d2-2607365194 .stroke-AA2{stroke:#4A6FF3;} + .d2-2607365194 .stroke-AA4{stroke:#EDF0FD;} + .d2-2607365194 .stroke-AA5{stroke:#F7F8FE;} + .d2-2607365194 .stroke-AB4{stroke:#EDF0FD;} + .d2-2607365194 .stroke-AB5{stroke:#F7F8FE;} + .d2-2607365194 .background-color-N1{background-color:#0A0F25;} + .d2-2607365194 .background-color-N2{background-color:#676C7E;} + .d2-2607365194 .background-color-N3{background-color:#9499AB;} + .d2-2607365194 .background-color-N4{background-color:#CFD2DD;} + .d2-2607365194 .background-color-N5{background-color:#DEE1EB;} + .d2-2607365194 .background-color-N6{background-color:#EEF1F8;} + .d2-2607365194 .background-color-N7{background-color:#FFFFFF;} + .d2-2607365194 .background-color-B1{background-color:#0D32B2;} + .d2-2607365194 .background-color-B2{background-color:#0D32B2;} + .d2-2607365194 .background-color-B3{background-color:#E3E9FD;} + .d2-2607365194 .background-color-B4{background-color:#E3E9FD;} + .d2-2607365194 .background-color-B5{background-color:#EDF0FD;} + .d2-2607365194 .background-color-B6{background-color:#F7F8FE;} + .d2-2607365194 .background-color-AA2{background-color:#4A6FF3;} + .d2-2607365194 .background-color-AA4{background-color:#EDF0FD;} + .d2-2607365194 .background-color-AA5{background-color:#F7F8FE;} + .d2-2607365194 .background-color-AB4{background-color:#EDF0FD;} + .d2-2607365194 .background-color-AB5{background-color:#F7F8FE;} + .d2-2607365194 .color-N1{color:#0A0F25;} + .d2-2607365194 .color-N2{color:#676C7E;} + .d2-2607365194 .color-N3{color:#9499AB;} + .d2-2607365194 .color-N4{color:#CFD2DD;} + .d2-2607365194 .color-N5{color:#DEE1EB;} + .d2-2607365194 .color-N6{color:#EEF1F8;} + .d2-2607365194 .color-N7{color:#FFFFFF;} + .d2-2607365194 .color-B1{color:#0D32B2;} + .d2-2607365194 .color-B2{color:#0D32B2;} + .d2-2607365194 .color-B3{color:#E3E9FD;} + .d2-2607365194 .color-B4{color:#E3E9FD;} + .d2-2607365194 .color-B5{color:#EDF0FD;} + .d2-2607365194 .color-B6{color:#F7F8FE;} + .d2-2607365194 .color-AA2{color:#4A6FF3;} + .d2-2607365194 .color-AA4{color:#EDF0FD;} + .d2-2607365194 .color-AA5{color:#F7F8FE;} + .d2-2607365194 .color-AB4{color:#EDF0FD;} + .d2-2607365194 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-2607365194);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-2607365194);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-2607365194);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-2607365194);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-2607365194);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-2607365194);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-2607365194);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-2607365194);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + + \ No newline at end of file diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index 89d18ce17..1b7eaca96 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -1221,3 +1221,47 @@ A customer of the bank, with personal bank accounts shape: c4-person label.near: bottom-center } + + customer1: |md + ## Personal Banking Customer + [person] + + A customer of the bank, with pekkrsonal bank ccountskks. +| { + shape: c4-person +} + +customer2: |md + ## Personal Banking Customerk + [person] + + A customer of the bank, with pekkrsonal bank accountskks. + + A customer of the bank, with pekkrsonal bank accountskks. + + A customer of the bank, with pekkrsonal bank accountskks. +| { + shape: c4-person +} + +customer3: |md + ## Personal Banking Customer + [person] + + A customer of the bank, with pekkrsonal bank accountskks. +| { + shape: c4-person +} + +customer4: |md + ## Personal Banking Customer + [person] + + A customer of the bank, with pekkrsonal bank accountskks. +| { + shape: c4-person +} + +customer1 -> customer2 -> customer3 -> customer4 +customer4 -> customer1 -> customer3 -> customer2 + diff --git a/lib/shape/shape_c4_person.go b/lib/shape/shape_c4_person.go index 99d47b07d..a9b7b9560 100644 --- a/lib/shape/shape_c4_person.go +++ b/lib/shape/shape_c4_person.go @@ -32,26 +32,24 @@ const ( func (s shapeC4Person) GetInnerBox() *geo.Box { width := s.Box.Width - height := s.Box.Height - headRadius := width * 0.22 - headCenterY := height * 0.18 + // Reduce head radius from 22% to 18% of width + headRadius := width * 0.18 + headCenterY := headRadius bodyTop := headCenterY + headRadius*0.8 - // Use a small fixed percentage instead of the full corner radius - horizontalPadding := width * 0.05 // 5% padding + // Horizontal padding = 5% of width + horizontalPadding := width * 0.05 + + // Vertical padding = 3% of width (not height) + vertPadding := width * 0.03 tl := s.Box.TopLeft.Copy() tl.X += horizontalPadding + tl.Y += bodyTop + vertPadding - // Add vertical padding - tl.Y += bodyTop + height*0.03 - - // Width minus padding on both sides innerWidth := width - (horizontalPadding * 2) - - // Add bottom padding - innerHeight := height - (tl.Y - s.Box.TopLeft.Y) - (height * 0.03) + innerHeight := s.Box.Height - bodyTop - (vertPadding * 2) return geo.NewBox(tl, innerWidth, innerHeight) } @@ -62,8 +60,10 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - headRadius := width * 0.22 - headCenterY := height * 0.18 + // Reduce head radius from 22% to 18% of width + headRadius := width * 0.18 + // Adjust headCenterY to ensure head fits within box + headCenterY := headRadius bodyTop := headCenterY + headRadius*0.8 bodyWidth := width bodyHeight := height - bodyTop @@ -88,13 +88,13 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { func headPath(box *geo.Box) *svg.SvgPathContext { width := box.Width - height := box.Height - pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - headRadius := width * 0.22 + // Reduce head radius from 22% to 18% of width + headRadius := width * 0.18 headCenterX := width / 2 - headCenterY := height * 0.18 + // Adjust headCenterY to ensure head fits within box + headCenterY := headRadius pc.StartAt(pc.Absolute(headCenterX, headCenterY-headRadius)) @@ -123,13 +123,13 @@ func headPath(box *geo.Box) *svg.SvgPathContext { func (s shapeC4Person) Perimeter() []geo.Intersectable { width := s.Box.Width - height := s.Box.Height bodyPerimeter := bodyPath(s.Box).Path - headRadius := width * 0.22 + // Reduce head radius from 22% to 18% of width + headRadius := width * 0.18 headCenterX := s.Box.TopLeft.X + width/2 - headCenterY := s.Box.TopLeft.Y + height*0.18 + headCenterY := s.Box.TopLeft.Y + headRadius headCenter := geo.NewPoint(headCenterX, headCenterY) headEllipse := geo.NewEllipse(headCenter, headRadius, headRadius) @@ -145,28 +145,28 @@ func (s shapeC4Person) GetSVGPathData() []string { } func (s shapeC4Person) GetDimensionsToFit(width, height, paddingX, paddingY float64) (float64, float64) { - contentWidth := width + paddingX - contentHeight := height + paddingY + // Start with content dimensions + padding + totalWidth := width + paddingX + totalHeight := height + paddingY - // Account for 10% total horizontal padding (5% on each side) - totalWidth := contentWidth / 0.9 - headRadius := totalWidth * 0.22 - headCenterY := totalWidth * 0.18 - bodyTop := headCenterY + headRadius*0.8 + // Reduce head radius from 22% to 18% of width + headRadius := totalWidth * 0.18 - // Include vertical padding from GetInnerBox - verticalPadding := totalWidth * 0.06 // 3% top + 3% bottom - totalHeight := contentHeight + bodyTop + verticalPadding + // Head center is now at headRadius from the top + headCenterY := headRadius - // Calculate minimum height based on actual proportions - // Head height: 2 * headRadius = 0.44 * width - // Body should be at least half the width - minHeight := totalWidth * 0.95 // Reduced from 1.2 - if totalHeight < minHeight { - totalHeight = minHeight - } + // Body starts at headCenterY + headRadius*0.8 + bodyTopPosition := headCenterY + headRadius*0.8 + // Add space for body (head is now fully contained) + totalHeight += bodyTopPosition + + // Horizontal padding is handled in GetInnerBox (5% on each side) + totalWidth /= 0.9 + + // Prevent the shape's aspect ratio from becoming too extreme totalWidth, totalHeight = LimitAR(totalWidth, totalHeight, C4_PERSON_AR_LIMIT) + return math.Ceil(totalWidth), math.Ceil(totalHeight) } From 5b55e4d81826a7d830e7474d2aec1146ab6e8005 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 19:24:54 -0600 Subject: [PATCH 2/9] Revert "update" This reverts commit e9760389142ec2c5e2569596d2ff40bc0ecca435. --- .../c4-person-label/dagre/board.exp.json | 519 +-------------- .../c4-person-label/dagre/sketch.exp.svg | 584 ++++++++--------- .../txtar/c4-person-label/elk/board.exp.json | 421 +----------- .../txtar/c4-person-label/elk/sketch.exp.svg | 584 ++++++++--------- .../c4-person-shape/dagre/board.exp.json | 58 +- .../c4-person-shape/dagre/sketch.exp.svg | 578 ++++++++--------- .../txtar/c4-person-shape/elk/board.exp.json | 42 +- .../txtar/c4-person-shape/elk/sketch.exp.svg | 578 ++++++++--------- .../txtar/c4-theme/dagre/board.exp.json | 172 ++--- .../txtar/c4-theme/dagre/sketch.exp.svg | 612 +++++++++--------- .../txtar/c4-theme/elk/board.exp.json | 86 +-- .../txtar/c4-theme/elk/sketch.exp.svg | 612 +++++++++--------- .../small-c4-person/dagre/board.exp.json | 2 +- .../small-c4-person/dagre/sketch.exp.svg | 156 ++--- .../txtar/small-c4-person/elk/board.exp.json | 2 +- .../txtar/small-c4-person/elk/sketch.exp.svg | 156 ++--- e2etests/txtar.txt | 44 -- lib/shape/shape_c4_person.go | 76 +-- 18 files changed, 2147 insertions(+), 3135 deletions(-) diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json index f0edbecf7..d164ab8a8 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 0, - "y": 8 + "y": 0 }, "width": 410, - "height": 284, + "height": 390, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,10 +58,10 @@ "type": "c4-person", "pos": { "x": 470, - "y": 8 + "y": 0 }, "width": 410, - "height": 284, + "height": 390, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -100,10 +100,10 @@ "type": "c4-person", "pos": { "x": 940, - "y": 8 + "y": 0 }, "width": 410, - "height": 284, + "height": 390, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -136,514 +136,9 @@ "labelPosition": "INSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 - }, - { - "id": "customer1", - "type": "c4-person", - "pos": { - "x": 1410, - "y": 0 - }, - "width": 448, - "height": 299, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B3", - "stroke": "B1", - "animated": false, - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank ccountskks.", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "markdown", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 388, - "labelHeight": 119, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "customer2", - "type": "c4-person", - "pos": { - "x": 1137, - "y": 399 - }, - "width": 457, - "height": 378, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B3", - "stroke": "B1", - "animated": false, - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "## Personal Banking Customerk\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "markdown", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 396, - "labelHeight": 199, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "customer3", - "type": "c4-person", - "pos": { - "x": 1147, - "y": 877 - }, - "width": 457, - "height": 304, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B3", - "stroke": "B1", - "animated": false, - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "markdown", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 396, - "labelHeight": 119, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "customer4", - "type": "c4-person", - "pos": { - "x": 1426, - "y": 1281 - }, - "width": 457, - "height": 304, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B3", - "stroke": "B1", - "animated": false, - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "markdown", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 396, - "labelHeight": 119, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - } - ], - "connections": [ - { - "id": "(customer1 -> customer2)[0]", - "src": "customer1", - "srcArrow": "none", - "dst": "customer2", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1436, - "y": 297 - }, - { - "x": 1379.5999755859375, - "y": 338.6000061035156 - }, - { - "x": 1365.5999755859375, - "y": 359 - }, - { - "x": 1366, - "y": 399 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer2 -> customer3)[0]", - "src": "customer2", - "srcArrow": "none", - "dst": "customer3", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1358, - "y": 777 - }, - { - "x": 1356, - "y": 817 - }, - { - "x": 1356.5999755859375, - "y": 837.2000122070312 - }, - { - "x": 1361, - "y": 878 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer3 -> customer4)[0]", - "src": "customer3", - "srcArrow": "none", - "dst": "customer4", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1375, - "y": 1181 - }, - { - "x": 1375.4000244140625, - "y": 1221 - }, - { - "x": 1415, - "y": 1259.5999755859375 - }, - { - "x": 1573, - "y": 1374 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer4 -> customer1)[0]", - "src": "customer4", - "srcArrow": "none", - "dst": "customer1", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1654, - "y": 1281 - }, - { - "x": 1654, - "y": 1241 - }, - { - "x": 1654, - "y": 1190.5999755859375 - }, - { - "x": 1654, - "y": 1130 - }, - { - "x": 1654, - "y": 1069.4000244140625 - }, - { - "x": 1654, - "y": 988.5999755859375 - }, - { - "x": 1654, - "y": 928 - }, - { - "x": 1654, - "y": 867.4000244140625 - }, - { - "x": 1654, - "y": 779.2000122070312 - }, - { - "x": 1654, - "y": 707.5 - }, - { - "x": 1654, - "y": 635.7999877929688 - }, - { - "x": 1653, - "y": 339 - }, - { - "x": 1649, - "y": 299 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer1 -> customer3)[0]", - "src": "customer1", - "srcArrow": "none", - "dst": "customer3", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1634, - "y": 299 - }, - { - "x": 1634, - "y": 339 - }, - { - "x": 1634, - "y": 396.79998779296875 - }, - { - "x": 1634, - "y": 468.5 - }, - { - "x": 1634, - "y": 540.2000122070312 - }, - { - "x": 1598.800048828125, - "y": 854.5999755859375 - }, - { - "x": 1458, - "y": 965 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer3 -> customer2)[0]", - "src": "customer3", - "srcArrow": "none", - "dst": "customer2", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1442, - "y": 911 - }, - { - "x": 1480.199951171875, - "y": 843.7999877929688 - }, - { - "x": 1484.5999755859375, - "y": 817 - }, - { - "x": 1464, - "y": 777 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 } ], + "connections": [], "root": { "id": "", "type": "", diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg index 7c7343d0c..bab515547 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg @@ -1,14 +1,14 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

-

[person]

-

A customer of the bank, with pekkrsonal bank ccountskks.

-

Personal Banking Customerk

-

[person]

-

A customer of the bank, with pekkrsonal bank accountskks.

-

A customer of the bank, with pekkrsonal bank accountskks.

-

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

-

[person]

-

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

-

[person]

-

A customer of the bank, with pekkrsonal bank accountskks.

-
- - - - - - - - +
+ + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json index f55b84f10..636de29e5 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 12, - "y": 19 + "y": 12 }, "width": 410, - "height": 284, + "height": 390, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -57,11 +57,11 @@ "id": "c4mdperson2", "type": "c4-person", "pos": { - "x": 441, - "y": 19 + "x": 442, + "y": 12 }, "width": 410, - "height": 284, + "height": 390, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -99,11 +99,11 @@ "id": "c4mdperson3", "type": "c4-person", "pos": { - "x": 871, - "y": 19 + "x": 872, + "y": 12 }, "width": 410, - "height": 284, + "height": 390, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -136,412 +136,9 @@ "labelPosition": "INSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 - }, - { - "id": "customer1", - "type": "c4-person", - "pos": { - "x": 1301, - "y": 12 - }, - "width": 448, - "height": 299, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B3", - "stroke": "B1", - "animated": false, - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank ccountskks.", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "markdown", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 388, - "labelHeight": 119, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "customer2", - "type": "c4-person", - "pos": { - "x": 1028, - "y": 391 - }, - "width": 457, - "height": 378, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B3", - "stroke": "B1", - "animated": false, - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "## Personal Banking Customerk\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "markdown", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 396, - "labelHeight": 199, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "customer3", - "type": "c4-person", - "pos": { - "x": 1123, - "y": 849 - }, - "width": 457, - "height": 304, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B3", - "stroke": "B1", - "animated": false, - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "markdown", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 396, - "labelHeight": 119, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - }, - { - "id": "customer4", - "type": "c4-person", - "pos": { - "x": 1313, - "y": 1233 - }, - "width": 457, - "height": 304, - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "borderRadius": 0, - "fill": "B3", - "stroke": "B1", - "animated": false, - "shadow": false, - "3d": false, - "multiple": false, - "double-border": false, - "tooltip": "", - "link": "", - "icon": null, - "iconPosition": "", - "blend": false, - "fields": null, - "methods": null, - "columns": null, - "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "markdown", - "color": "N1", - "italic": false, - "bold": true, - "underline": false, - "labelWidth": 396, - "labelHeight": 119, - "labelPosition": "INSIDE_MIDDLE_CENTER", - "zIndex": 0, - "level": 1 - } - ], - "connections": [ - { - "id": "(customer1 -> customer2)[0]", - "src": "customer1", - "srcArrow": "none", - "dst": "customer2", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1414, - "y": 311 - }, - { - "x": 1414, - "y": 540 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer2 -> customer3)[0]", - "src": "customer2", - "srcArrow": "none", - "dst": "customer3", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1237, - "y": 769 - }, - { - "x": 1237, - "y": 997 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer3 -> customer4)[0]", - "src": "customer3", - "srcArrow": "none", - "dst": "customer4", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1465, - "y": 1153 - }, - { - "x": 1466, - "y": 1284 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer4 -> customer1)[0]", - "src": "customer4", - "srcArrow": "none", - "dst": "customer1", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1620, - "y": 1290 - }, - { - "x": 1620, - "y": 311 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer1 -> customer3)[0]", - "src": "customer1", - "srcArrow": "none", - "dst": "customer3", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1526, - "y": 311 - }, - { - "x": 1526, - "y": 997 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer3 -> customer2)[0]", - "src": "customer3", - "srcArrow": "none", - "dst": "customer2", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1334, - "y": 851 - }, - { - "x": 1334, - "y": 769 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 } ], + "connections": [], "root": { "id": "", "type": "", diff --git a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg index aafc758b9..bfadee541 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg @@ -1,14 +1,14 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

-

[person]

-

A customer of the bank, with pekkrsonal bank ccountskks.

-

Personal Banking Customerk

-

[person]

-

A customer of the bank, with pekkrsonal bank accountskks.

-

A customer of the bank, with pekkrsonal bank accountskks.

-

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

-

[person]

-

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

-

[person]

-

A customer of the bank, with pekkrsonal bank accountskks.

-
- - - - - - - - +
+ + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json index 196f6f710..279169e81 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 0, - "y": 469 + "y": 504 }, "width": 336, - "height": 286, + "height": 328, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -61,7 +61,7 @@ "y": 0 }, "width": 139, - "height": 107, + "height": 132, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 101, - "y": 279 + "y": 309 }, "width": 134, "height": 89, @@ -142,10 +142,10 @@ "type": "rectangle", "pos": { "x": 386, - "y": 248 + "y": 273 }, "width": 210, - "height": 484, + "height": 515, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -184,10 +184,10 @@ "type": "c4-person", "pos": { "x": 449, - "y": 278 + "y": 303 }, "width": 84, - "height": 91, + "height": 101, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 416, - "y": 522 + "y": 578 }, "width": 150, "height": 180, @@ -292,19 +292,19 @@ "route": [ { "x": 168, - "y": 394 + "y": 424 }, { "x": 168, - "y": 414 + "y": 448 }, { "x": 168, - "y": 429 + "y": 461 }, { "x": 168, - "y": 469 + "y": 489 } ], "isCurve": true, @@ -339,20 +339,20 @@ "link": "", "route": [ { - "x": 263, - "y": 100 + "x": 262, + "y": 119 }, { - "x": 187, - "y": 154 + "x": 186.8000030517578, + "y": 177.8000030517578 }, { "x": 168, - "y": 238.1999969482422 + "y": 264.20001220703125 }, { "x": 168, - "y": 279 + "y": 309 } ], "isCurve": true, @@ -387,20 +387,20 @@ "link": "", "route": [ { - "x": 395, - "y": 100 + "x": 397, + "y": 119 }, { - "x": 471.79998779296875, - "y": 154 + "x": 472.20001220703125, + "y": 177.8000030517578 }, { "x": 491, - "y": 238 + "y": 263 }, { "x": 491, - "y": 278 + "y": 303 } ], "isCurve": true, @@ -436,19 +436,19 @@ "route": [ { "x": 491, - "y": 369 + "y": 405 }, { "x": 491, - "y": 409 + "y": 444.20001220703125 }, { "x": 491, - "y": 439.6000061035156 + "y": 478.6000061035156 }, { "x": 491, - "y": 522 + "y": 577 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg index e3498e842..65e12a1b3 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json index 7c1686a85..95cb99c31 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 12, - "y": 900 + "y": 935 }, "width": 336, - "height": 286, + "height": 328, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -61,7 +61,7 @@ "y": 12 }, "width": 139, - "height": 107, + "height": 132, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 113, - "y": 715 + "y": 750 }, "width": 134, "height": 89, @@ -142,10 +142,10 @@ "type": "rectangle", "pos": { "x": 256, - "y": 204 + "y": 229 }, "width": 250, - "height": 441, + "height": 451, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -184,10 +184,10 @@ "type": "c4-person", "pos": { "x": 339, - "y": 254 + "y": 279 }, "width": 84, - "height": 91, + "height": 101, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 306, - "y": 415 + "y": 450 }, "width": 150, "height": 180, @@ -292,11 +292,11 @@ "route": [ { "x": 180, - "y": 830 + "y": 865 }, { "x": 180, - "y": 900 + "y": 920 } ], "animated": false, @@ -331,19 +331,19 @@ "route": [ { "x": 258, - "y": 119 + "y": 144 }, { "x": 257.5830078125, - "y": 159 + "y": 184 }, { "x": 180, - "y": 159 + "y": 184 }, { "x": 180, - "y": 715 + "y": 750 } ], "animated": false, @@ -378,19 +378,19 @@ "route": [ { "x": 304, - "y": 119 + "y": 144 }, { "x": 303.9159851074219, - "y": 159 + "y": 184 }, { "x": 381.5, - "y": 159 + "y": 184 }, { "x": 382, - "y": 254 + "y": 279 } ], "animated": false, @@ -425,11 +425,11 @@ "route": [ { "x": 381, - "y": 345 + "y": 381 }, { "x": 382, - "y": 415 + "y": 449 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg index ec77604b2..d7fdb9e74 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json index 9f035283b..e462c9a73 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json @@ -19,7 +19,7 @@ "y": 0 }, "width": 415, - "height": 285, + "height": 394, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,7 +58,7 @@ "type": "rectangle", "pos": { "x": 147, - "y": 442 + "y": 551 }, "width": 2407, "height": 915, @@ -100,7 +100,7 @@ "type": "rectangle", "pos": { "x": 177, - "y": 472 + "y": 581 }, "width": 550, "height": 164, @@ -142,7 +142,7 @@ "type": "rectangle", "pos": { "x": 390, - "y": 757 + "y": 866 }, "width": 609, "height": 164, @@ -184,7 +184,7 @@ "type": "rectangle", "pos": { "x": 1123, - "y": 757 + "y": 866 }, "width": 707, "height": 164, @@ -226,7 +226,7 @@ "type": "rectangle", "pos": { "x": 1246, - "y": 1058 + "y": 1167 }, "width": 461, "height": 164, @@ -268,7 +268,7 @@ "type": "rectangle", "pos": { "x": 1890, - "y": 757 + "y": 866 }, "width": 634, "height": 164, @@ -310,7 +310,7 @@ "type": "rectangle", "pos": { "x": 2410, - "y": 1494 + "y": 1603 }, "width": 360, "height": 164, @@ -352,7 +352,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 1494 + "y": 1603 }, "width": 629, "height": 164, @@ -418,19 +418,19 @@ "route": [ { "x": 1089, - "y": 194 + "y": 262 }, { "x": 579.4000244140625, - "y": 321.6000061035156 + "y": 422.3999938964844 }, { "x": 452, - "y": 432 + "y": 541 }, { "x": 452, - "y": 472 + "y": 581 } ], "isCurve": true, @@ -466,19 +466,19 @@ "route": [ { "x": 452, - "y": 635.5 + "y": 744.5 }, { "x": 452, - "y": 684.2999877929688 + "y": 793.2999877929688 }, { "x": 472.3999938964844, - "y": 708.7000122070312 + "y": 817.7000122070312 }, { "x": 554, - "y": 757.5 + "y": 866.5 } ], "isCurve": true, @@ -513,44 +513,44 @@ "link": "", "route": [ { - "x": 1093, - "y": 262 + "x": 1092, + "y": 348 }, { - "x": 968.2000122070312, - "y": 335.20001220703125 + "x": 968, + "y": 439.6000061035156 }, { "x": 937, - "y": 367.20001220703125 + "y": 476.20001220703125 }, { "x": 937, - "y": 387.75 + "y": 496.75 }, { "x": 937, - "y": 408.29998779296875 + "y": 517.2990112304688 }, { "x": 937, - "y": 448.3999938964844 + "y": 557.4000244140625 }, { "x": 937, - "y": 488 + "y": 597 }, { "x": 937, - "y": 527.5999755859375 + "y": 636.5999755859375 }, { "x": 916.5999755859375, - "y": 708.7000122070312 + "y": 817.7000122070312 }, { "x": 835, - "y": 757.5 + "y": 866.5 } ], "isCurve": true, @@ -585,44 +585,44 @@ "link": "", "route": [ { - "x": 1418, - "y": 285 + "x": 1430, + "y": 394 }, { - "x": 1464.4000244140625, - "y": 339.79998779296875 + "x": 1466.800048828125, + "y": 448.79998779296875 }, { "x": 1476, - "y": 367.20001220703125 + "y": 476.20001220703125 }, { "x": 1476, - "y": 387.75 + "y": 496.75 }, { "x": 1476, - "y": 408.29998779296875 + "y": 517.2990112304688 }, { "x": 1476, - "y": 448.3999938964844 + "y": 557.4000244140625 }, { "x": 1476, - "y": 488 + "y": 597 }, { "x": 1476, - "y": 527.5999755859375 + "y": 636.5999755859375 }, { "x": 1476, - "y": 708.7000122070312 + "y": 817.7000122070312 }, { "x": 1476, - "y": 757.5 + "y": 866.5 } ], "isCurve": true, @@ -658,19 +658,19 @@ "route": [ { "x": 694.5, - "y": 920.5 + "y": 1029.5 }, { "x": 694.5, - "y": 975.7000122070312 + "y": 1084.699951171875 }, { "x": 804.7000122070312, - "y": 1010.7219848632812 + "y": 1119.7220458984375 }, { "x": 1245.5, - "y": 1095.6099853515625 + "y": 1204.6099853515625 } ], "isCurve": true, @@ -706,19 +706,19 @@ "route": [ { "x": 1476, - "y": 920.5 + "y": 1029.5 }, { "x": 1476, - "y": 975.7000122070312 + "y": 1084.699951171875 }, { "x": 1476, - "y": 1003.2999877929688 + "y": 1112.300048828125 }, { "x": 1476, - "y": 1058.5 + "y": 1167.5 } ], "isCurve": true, @@ -754,19 +754,19 @@ "route": [ { "x": 1245.5, - "y": 1166.1949462890625 + "y": 1275.1949462890625 }, { "x": 500.6990051269531, - "y": 1318.8389892578125 + "y": 1427.8389892578125 }, { "x": 314.5, - "y": 1439.300048828125 + "y": 1548.300048828125 }, { "x": 314.5, - "y": 1494.5 + "y": 1603.5 } ], "isCurve": true, @@ -802,103 +802,103 @@ "route": [ { "x": 1505, - "y": 175 + "y": 238 }, { "x": 2410.60009765625, - "y": 317.79998779296875 + "y": 417.6000061035156 }, { "x": 2637, - "y": 367.20001220703125 + "y": 476.20001220703125 }, { "x": 2637, - "y": 387.75 + "y": 496.75 }, { "x": 2637, - "y": 408.29998779296875 + "y": 517.2990112304688 }, { "x": 2637, - "y": 448.3999938964844 + "y": 557.4000244140625 }, { "x": 2637, - "y": 488 + "y": 597 }, { "x": 2637, - "y": 527.5999755859375 + "y": 636.5999755859375 }, { "x": 2637, - "y": 582.5 + "y": 691.5 }, { "x": 2637, - "y": 625.25 + "y": 734.25 }, { "x": 2637, - "y": 668 + "y": 777 }, { "x": 2637, - "y": 725 + "y": 834 }, { "x": 2637, - "y": 767.75 + "y": 876.75 }, { "x": 2637, - "y": 810.5 + "y": 919.5 }, { "x": 2637, - "y": 869.0999755859375 + "y": 978.0999755859375 }, { "x": 2637, - "y": 914.25 + "y": 1023.25 }, { "x": 2637, - "y": 959.4000244140625 + "y": 1068.4000244140625 }, { "x": 2637, - "y": 1019.5999755859375 + "y": 1128.5999755859375 }, { "x": 2637, - "y": 1064.75 + "y": 1173.75 }, { "x": 2637, - "y": 1109.9000244140625 + "y": 1218.9000244140625 }, { "x": 2637, - "y": 1183.4000244140625 + "y": 1292.4000244140625 }, { "x": 2637, - "y": 1248.5 + "y": 1357.5 }, { "x": 2637, - "y": 1313.5999755859375 + "y": 1422.5999755859375 }, { "x": 2632.800048828125, - "y": 1439.300048828125 + "y": 1548.300048828125 }, { "x": 2616, - "y": 1494.5 + "y": 1603.5 } ], "isCurve": true, @@ -934,19 +934,19 @@ "route": [ { "x": 1707.5, - "y": 1173.843994140625 + "y": 1282.843994140625 }, { "x": 2241.5, - "y": 1320.3680419921875 + "y": 1429.3680419921875 }, { "x": 2394.39990234375, - "y": 1439.300048828125 + "y": 1548.300048828125 }, { "x": 2472, - "y": 1494.5 + "y": 1603.5 } ], "isCurve": true, @@ -982,19 +982,19 @@ "route": [ { "x": 2206.5, - "y": 920.5 + "y": 1029.5 }, { "x": 2206.5, - "y": 975.7000122070312 + "y": 1084.699951171875 }, { "x": 2106.5, - "y": 1010.0999755859375 + "y": 1119.0999755859375 }, { "x": 1706.5, - "y": 1092.5 + "y": 1201.5 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg index 4e4ff9f84..2613fb8b3 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

-

Internet Banking System

+

Internet Banking System

[Software System]

-

E-mail System

+

E-mail System

[Software System]

The internal Microsoft Exchange e-mail system.

-

Mainframe Banking System

+

Mainframe Banking System

[Software System]

Stores all of the core banking information about customers, accounts, transactions, etc.

-

Web Application

+

Web Application

[Container: Java and Spring MVC]

Delivers the static content and the Internet banking single page application.

-

Single-Page Application

+

Single-Page Application

[Container: JavaScript and Angular]

Provides all of the Internet banking functionality to customers via their web browser.

-

Mobile App

+

Mobile App

[Container: Xamarin]

Provides a limited subset of the Internet banking functionality to customers via their mobile device.

-

API Application

+

API Application

[Container: Java and Spring MVC]

Provides Internet banking functionality via a JSON/HTTPS API.

-

Database

+

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - - - - - - - - - - - - - - - - - - - - +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/elk/board.exp.json b/e2etests/testdata/txtar/c4-theme/elk/board.exp.json index 3d9b2d3b7..4d6d3ccd8 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/elk/board.exp.json @@ -19,7 +19,7 @@ "y": 12 }, "width": 415, - "height": 285, + "height": 394, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,7 +58,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 549 + "y": 658 }, "width": 2218, "height": 1035, @@ -100,7 +100,7 @@ "type": "rectangle", "pos": { "x": 62, - "y": 599 + "y": 708 }, "width": 550, "height": 164, @@ -142,7 +142,7 @@ "type": "rectangle", "pos": { "x": 190, - "y": 934 + "y": 1043 }, "width": 609, "height": 164, @@ -184,7 +184,7 @@ "type": "rectangle", "pos": { "x": 819, - "y": 934 + "y": 1043 }, "width": 707, "height": 164, @@ -226,7 +226,7 @@ "type": "rectangle", "pos": { "x": 942, - "y": 1285 + "y": 1394 }, "width": 461, "height": 164, @@ -268,7 +268,7 @@ "type": "rectangle", "pos": { "x": 1546, - "y": 934 + "y": 1043 }, "width": 634, "height": 164, @@ -310,7 +310,7 @@ "type": "rectangle", "pos": { "x": 1746, - "y": 1786 + "y": 1895 }, "width": 360, "height": 164, @@ -352,7 +352,7 @@ "type": "rectangle", "pos": { "x": 781, - "y": 1786 + "y": 1895 }, "width": 629, "height": 164, @@ -418,19 +418,19 @@ "route": [ { "x": 788, - "y": 297 + "y": 406 }, { "x": 787.75, - "y": 337 + "y": 446 }, { "x": 359.25, - "y": 337 + "y": 446 }, { "x": 359.25, - "y": 599 + "y": 708 } ], "animated": false, @@ -465,11 +465,11 @@ "route": [ { "x": 393, - "y": 763 + "y": 872 }, { "x": 393, - "y": 934 + "y": 1043 } ], "animated": false, @@ -504,19 +504,19 @@ "route": [ { "x": 871, - "y": 297 + "y": 406 }, { "x": 870.75, - "y": 387 + "y": 496 }, { "x": 652, - "y": 387 + "y": 496 }, { "x": 652, - "y": 934 + "y": 1043 } ], "animated": false, @@ -551,11 +551,11 @@ "route": [ { "x": 954, - "y": 297 + "y": 406 }, { "x": 953.75, - "y": 934 + "y": 1043 } ], "animated": false, @@ -590,19 +590,19 @@ "route": [ { "x": 494.5, - "y": 1098 + "y": 1207 }, { "x": 494.5, - "y": 1245 + "y": 1354 }, { "x": 1057.25, - "y": 1245 + "y": 1354 }, { "x": 1057.25, - "y": 1285 + "y": 1394 } ], "animated": false, @@ -637,11 +637,11 @@ "route": [ { "x": 1172.5, - "y": 1098 + "y": 1207 }, { "x": 1172.5, - "y": 1285 + "y": 1394 } ], "animated": false, @@ -676,11 +676,11 @@ "route": [ { "x": 1095.666015625, - "y": 1449 + "y": 1558 }, { "x": 1095.666015625, - "y": 1786 + "y": 1895 } ], "animated": false, @@ -715,27 +715,27 @@ "route": [ { "x": 1037, - "y": 297 + "y": 406 }, { "x": 1036.75, - "y": 337 + "y": 446 }, { "x": 2303.5, - "y": 337 + "y": 446 }, { "x": 2303.5, - "y": 1746 + "y": 1855 }, { "x": 1986.8330078125, - "y": 1746 + "y": 1855 }, { "x": 1986.8330078125, - "y": 1786 + "y": 1895 } ], "animated": false, @@ -770,19 +770,19 @@ "route": [ { "x": 1249.3330078125, - "y": 1449 + "y": 1558 }, { "x": 1249.3330078125, - "y": 1746 + "y": 1855 }, { "x": 1866.8330078125, - "y": 1746 + "y": 1855 }, { "x": 1866.8330078125, - "y": 1786 + "y": 1895 } ], "animated": false, @@ -817,19 +817,19 @@ "route": [ { "x": 1863, - "y": 1098 + "y": 1207 }, { "x": 1863, - "y": 1245 + "y": 1354 }, { "x": 1287.75, - "y": 1245 + "y": 1354 }, { "x": 1287.75, - "y": 1285 + "y": 1394 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg index dc7185d81..31b06adcb 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

-

Internet Banking System

+

Internet Banking System

[Software System]

-

E-mail System

+

E-mail System

[Software System]

The internal Microsoft Exchange e-mail system.

-

Mainframe Banking System

+

Mainframe Banking System

[Software System]

Stores all of the core banking information about customers, accounts, transactions, etc.

-

Web Application

+

Web Application

[Container: Java and Spring MVC]

Delivers the static content and the Internet banking single page application.

-

Single-Page Application

+

Single-Page Application

[Container: JavaScript and Angular]

Provides all of the Internet banking functionality to customers via their web browser.

-

Mobile App

+

Mobile App

[Container: Xamarin]

Provides a limited subset of the Internet banking functionality to customers via their mobile device.

-

API Application

+

API Application

[Container: Java and Spring MVC]

Provides Internet banking functionality via a JSON/HTTPS API.

-

Database

+

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - - - - - - - - - - - - - - - - - - - - +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json b/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json index 3b7bdaf8e..e0d8c0959 100644 --- a/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json +++ b/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json @@ -19,7 +19,7 @@ "y": 0 }, "width": 180, - "height": 85, + "height": 94, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, diff --git a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg index 6f92c0949..009c53f4e 100644 --- a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg @@ -1,9 +1,9 @@ -c4-person - - + .d2-4248901620 .fill-N1{fill:#0A0F25;} + .d2-4248901620 .fill-N2{fill:#676C7E;} + .d2-4248901620 .fill-N3{fill:#9499AB;} + .d2-4248901620 .fill-N4{fill:#CFD2DD;} + .d2-4248901620 .fill-N5{fill:#DEE1EB;} + .d2-4248901620 .fill-N6{fill:#EEF1F8;} + .d2-4248901620 .fill-N7{fill:#FFFFFF;} + .d2-4248901620 .fill-B1{fill:#0D32B2;} + .d2-4248901620 .fill-B2{fill:#0D32B2;} + .d2-4248901620 .fill-B3{fill:#E3E9FD;} + .d2-4248901620 .fill-B4{fill:#E3E9FD;} + .d2-4248901620 .fill-B5{fill:#EDF0FD;} + .d2-4248901620 .fill-B6{fill:#F7F8FE;} + .d2-4248901620 .fill-AA2{fill:#4A6FF3;} + .d2-4248901620 .fill-AA4{fill:#EDF0FD;} + .d2-4248901620 .fill-AA5{fill:#F7F8FE;} + .d2-4248901620 .fill-AB4{fill:#EDF0FD;} + .d2-4248901620 .fill-AB5{fill:#F7F8FE;} + .d2-4248901620 .stroke-N1{stroke:#0A0F25;} + .d2-4248901620 .stroke-N2{stroke:#676C7E;} + .d2-4248901620 .stroke-N3{stroke:#9499AB;} + .d2-4248901620 .stroke-N4{stroke:#CFD2DD;} + .d2-4248901620 .stroke-N5{stroke:#DEE1EB;} + .d2-4248901620 .stroke-N6{stroke:#EEF1F8;} + .d2-4248901620 .stroke-N7{stroke:#FFFFFF;} + .d2-4248901620 .stroke-B1{stroke:#0D32B2;} + .d2-4248901620 .stroke-B2{stroke:#0D32B2;} + .d2-4248901620 .stroke-B3{stroke:#E3E9FD;} + .d2-4248901620 .stroke-B4{stroke:#E3E9FD;} + .d2-4248901620 .stroke-B5{stroke:#EDF0FD;} + .d2-4248901620 .stroke-B6{stroke:#F7F8FE;} + .d2-4248901620 .stroke-AA2{stroke:#4A6FF3;} + .d2-4248901620 .stroke-AA4{stroke:#EDF0FD;} + .d2-4248901620 .stroke-AA5{stroke:#F7F8FE;} + .d2-4248901620 .stroke-AB4{stroke:#EDF0FD;} + .d2-4248901620 .stroke-AB5{stroke:#F7F8FE;} + .d2-4248901620 .background-color-N1{background-color:#0A0F25;} + .d2-4248901620 .background-color-N2{background-color:#676C7E;} + .d2-4248901620 .background-color-N3{background-color:#9499AB;} + .d2-4248901620 .background-color-N4{background-color:#CFD2DD;} + .d2-4248901620 .background-color-N5{background-color:#DEE1EB;} + .d2-4248901620 .background-color-N6{background-color:#EEF1F8;} + .d2-4248901620 .background-color-N7{background-color:#FFFFFF;} + .d2-4248901620 .background-color-B1{background-color:#0D32B2;} + .d2-4248901620 .background-color-B2{background-color:#0D32B2;} + .d2-4248901620 .background-color-B3{background-color:#E3E9FD;} + .d2-4248901620 .background-color-B4{background-color:#E3E9FD;} + .d2-4248901620 .background-color-B5{background-color:#EDF0FD;} + .d2-4248901620 .background-color-B6{background-color:#F7F8FE;} + .d2-4248901620 .background-color-AA2{background-color:#4A6FF3;} + .d2-4248901620 .background-color-AA4{background-color:#EDF0FD;} + .d2-4248901620 .background-color-AA5{background-color:#F7F8FE;} + .d2-4248901620 .background-color-AB4{background-color:#EDF0FD;} + .d2-4248901620 .background-color-AB5{background-color:#F7F8FE;} + .d2-4248901620 .color-N1{color:#0A0F25;} + .d2-4248901620 .color-N2{color:#676C7E;} + .d2-4248901620 .color-N3{color:#9499AB;} + .d2-4248901620 .color-N4{color:#CFD2DD;} + .d2-4248901620 .color-N5{color:#DEE1EB;} + .d2-4248901620 .color-N6{color:#EEF1F8;} + .d2-4248901620 .color-N7{color:#FFFFFF;} + .d2-4248901620 .color-B1{color:#0D32B2;} + .d2-4248901620 .color-B2{color:#0D32B2;} + .d2-4248901620 .color-B3{color:#E3E9FD;} + .d2-4248901620 .color-B4{color:#E3E9FD;} + .d2-4248901620 .color-B5{color:#EDF0FD;} + .d2-4248901620 .color-B6{color:#F7F8FE;} + .d2-4248901620 .color-AA2{color:#4A6FF3;} + .d2-4248901620 .color-AA4{color:#EDF0FD;} + .d2-4248901620 .color-AA5{color:#F7F8FE;} + .d2-4248901620 .color-AB4{color:#EDF0FD;} + .d2-4248901620 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-4248901620);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-4248901620);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-4248901620);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-4248901620);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-4248901620);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-4248901620);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-4248901620);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-4248901620);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json b/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json index 342178f5f..56a15e872 100644 --- a/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json +++ b/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json @@ -19,7 +19,7 @@ "y": 12 }, "width": 180, - "height": 85, + "height": 94, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, diff --git a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg index d41c6027d..4de020608 100644 --- a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -c4-person - - + .d2-108552620 .fill-N1{fill:#0A0F25;} + .d2-108552620 .fill-N2{fill:#676C7E;} + .d2-108552620 .fill-N3{fill:#9499AB;} + .d2-108552620 .fill-N4{fill:#CFD2DD;} + .d2-108552620 .fill-N5{fill:#DEE1EB;} + .d2-108552620 .fill-N6{fill:#EEF1F8;} + .d2-108552620 .fill-N7{fill:#FFFFFF;} + .d2-108552620 .fill-B1{fill:#0D32B2;} + .d2-108552620 .fill-B2{fill:#0D32B2;} + .d2-108552620 .fill-B3{fill:#E3E9FD;} + .d2-108552620 .fill-B4{fill:#E3E9FD;} + .d2-108552620 .fill-B5{fill:#EDF0FD;} + .d2-108552620 .fill-B6{fill:#F7F8FE;} + .d2-108552620 .fill-AA2{fill:#4A6FF3;} + .d2-108552620 .fill-AA4{fill:#EDF0FD;} + .d2-108552620 .fill-AA5{fill:#F7F8FE;} + .d2-108552620 .fill-AB4{fill:#EDF0FD;} + .d2-108552620 .fill-AB5{fill:#F7F8FE;} + .d2-108552620 .stroke-N1{stroke:#0A0F25;} + .d2-108552620 .stroke-N2{stroke:#676C7E;} + .d2-108552620 .stroke-N3{stroke:#9499AB;} + .d2-108552620 .stroke-N4{stroke:#CFD2DD;} + .d2-108552620 .stroke-N5{stroke:#DEE1EB;} + .d2-108552620 .stroke-N6{stroke:#EEF1F8;} + .d2-108552620 .stroke-N7{stroke:#FFFFFF;} + .d2-108552620 .stroke-B1{stroke:#0D32B2;} + .d2-108552620 .stroke-B2{stroke:#0D32B2;} + .d2-108552620 .stroke-B3{stroke:#E3E9FD;} + .d2-108552620 .stroke-B4{stroke:#E3E9FD;} + .d2-108552620 .stroke-B5{stroke:#EDF0FD;} + .d2-108552620 .stroke-B6{stroke:#F7F8FE;} + .d2-108552620 .stroke-AA2{stroke:#4A6FF3;} + .d2-108552620 .stroke-AA4{stroke:#EDF0FD;} + .d2-108552620 .stroke-AA5{stroke:#F7F8FE;} + .d2-108552620 .stroke-AB4{stroke:#EDF0FD;} + .d2-108552620 .stroke-AB5{stroke:#F7F8FE;} + .d2-108552620 .background-color-N1{background-color:#0A0F25;} + .d2-108552620 .background-color-N2{background-color:#676C7E;} + .d2-108552620 .background-color-N3{background-color:#9499AB;} + .d2-108552620 .background-color-N4{background-color:#CFD2DD;} + .d2-108552620 .background-color-N5{background-color:#DEE1EB;} + .d2-108552620 .background-color-N6{background-color:#EEF1F8;} + .d2-108552620 .background-color-N7{background-color:#FFFFFF;} + .d2-108552620 .background-color-B1{background-color:#0D32B2;} + .d2-108552620 .background-color-B2{background-color:#0D32B2;} + .d2-108552620 .background-color-B3{background-color:#E3E9FD;} + .d2-108552620 .background-color-B4{background-color:#E3E9FD;} + .d2-108552620 .background-color-B5{background-color:#EDF0FD;} + .d2-108552620 .background-color-B6{background-color:#F7F8FE;} + .d2-108552620 .background-color-AA2{background-color:#4A6FF3;} + .d2-108552620 .background-color-AA4{background-color:#EDF0FD;} + .d2-108552620 .background-color-AA5{background-color:#F7F8FE;} + .d2-108552620 .background-color-AB4{background-color:#EDF0FD;} + .d2-108552620 .background-color-AB5{background-color:#F7F8FE;} + .d2-108552620 .color-N1{color:#0A0F25;} + .d2-108552620 .color-N2{color:#676C7E;} + .d2-108552620 .color-N3{color:#9499AB;} + .d2-108552620 .color-N4{color:#CFD2DD;} + .d2-108552620 .color-N5{color:#DEE1EB;} + .d2-108552620 .color-N6{color:#EEF1F8;} + .d2-108552620 .color-N7{color:#FFFFFF;} + .d2-108552620 .color-B1{color:#0D32B2;} + .d2-108552620 .color-B2{color:#0D32B2;} + .d2-108552620 .color-B3{color:#E3E9FD;} + .d2-108552620 .color-B4{color:#E3E9FD;} + .d2-108552620 .color-B5{color:#EDF0FD;} + .d2-108552620 .color-B6{color:#F7F8FE;} + .d2-108552620 .color-AA2{color:#4A6FF3;} + .d2-108552620 .color-AA4{color:#EDF0FD;} + .d2-108552620 .color-AA5{color:#F7F8FE;} + .d2-108552620 .color-AB4{color:#EDF0FD;} + .d2-108552620 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-108552620);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-108552620);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-108552620);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-108552620);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-108552620);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-108552620);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-108552620);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-108552620);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + + \ No newline at end of file diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index 1b7eaca96..89d18ce17 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -1221,47 +1221,3 @@ A customer of the bank, with personal bank accounts shape: c4-person label.near: bottom-center } - - customer1: |md - ## Personal Banking Customer - [person] - - A customer of the bank, with pekkrsonal bank ccountskks. -| { - shape: c4-person -} - -customer2: |md - ## Personal Banking Customerk - [person] - - A customer of the bank, with pekkrsonal bank accountskks. - - A customer of the bank, with pekkrsonal bank accountskks. - - A customer of the bank, with pekkrsonal bank accountskks. -| { - shape: c4-person -} - -customer3: |md - ## Personal Banking Customer - [person] - - A customer of the bank, with pekkrsonal bank accountskks. -| { - shape: c4-person -} - -customer4: |md - ## Personal Banking Customer - [person] - - A customer of the bank, with pekkrsonal bank accountskks. -| { - shape: c4-person -} - -customer1 -> customer2 -> customer3 -> customer4 -customer4 -> customer1 -> customer3 -> customer2 - diff --git a/lib/shape/shape_c4_person.go b/lib/shape/shape_c4_person.go index a9b7b9560..99d47b07d 100644 --- a/lib/shape/shape_c4_person.go +++ b/lib/shape/shape_c4_person.go @@ -32,24 +32,26 @@ const ( func (s shapeC4Person) GetInnerBox() *geo.Box { width := s.Box.Width + height := s.Box.Height - // Reduce head radius from 22% to 18% of width - headRadius := width * 0.18 - headCenterY := headRadius + headRadius := width * 0.22 + headCenterY := height * 0.18 bodyTop := headCenterY + headRadius*0.8 - // Horizontal padding = 5% of width - horizontalPadding := width * 0.05 - - // Vertical padding = 3% of width (not height) - vertPadding := width * 0.03 + // Use a small fixed percentage instead of the full corner radius + horizontalPadding := width * 0.05 // 5% padding tl := s.Box.TopLeft.Copy() tl.X += horizontalPadding - tl.Y += bodyTop + vertPadding + // Add vertical padding + tl.Y += bodyTop + height*0.03 + + // Width minus padding on both sides innerWidth := width - (horizontalPadding * 2) - innerHeight := s.Box.Height - bodyTop - (vertPadding * 2) + + // Add bottom padding + innerHeight := height - (tl.Y - s.Box.TopLeft.Y) - (height * 0.03) return geo.NewBox(tl, innerWidth, innerHeight) } @@ -60,10 +62,8 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - // Reduce head radius from 22% to 18% of width - headRadius := width * 0.18 - // Adjust headCenterY to ensure head fits within box - headCenterY := headRadius + headRadius := width * 0.22 + headCenterY := height * 0.18 bodyTop := headCenterY + headRadius*0.8 bodyWidth := width bodyHeight := height - bodyTop @@ -88,13 +88,13 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { func headPath(box *geo.Box) *svg.SvgPathContext { width := box.Width + height := box.Height + pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - // Reduce head radius from 22% to 18% of width - headRadius := width * 0.18 + headRadius := width * 0.22 headCenterX := width / 2 - // Adjust headCenterY to ensure head fits within box - headCenterY := headRadius + headCenterY := height * 0.18 pc.StartAt(pc.Absolute(headCenterX, headCenterY-headRadius)) @@ -123,13 +123,13 @@ func headPath(box *geo.Box) *svg.SvgPathContext { func (s shapeC4Person) Perimeter() []geo.Intersectable { width := s.Box.Width + height := s.Box.Height bodyPerimeter := bodyPath(s.Box).Path - // Reduce head radius from 22% to 18% of width - headRadius := width * 0.18 + headRadius := width * 0.22 headCenterX := s.Box.TopLeft.X + width/2 - headCenterY := s.Box.TopLeft.Y + headRadius + headCenterY := s.Box.TopLeft.Y + height*0.18 headCenter := geo.NewPoint(headCenterX, headCenterY) headEllipse := geo.NewEllipse(headCenter, headRadius, headRadius) @@ -145,28 +145,28 @@ func (s shapeC4Person) GetSVGPathData() []string { } func (s shapeC4Person) GetDimensionsToFit(width, height, paddingX, paddingY float64) (float64, float64) { - // Start with content dimensions + padding - totalWidth := width + paddingX - totalHeight := height + paddingY + contentWidth := width + paddingX + contentHeight := height + paddingY - // Reduce head radius from 22% to 18% of width - headRadius := totalWidth * 0.18 + // Account for 10% total horizontal padding (5% on each side) + totalWidth := contentWidth / 0.9 + headRadius := totalWidth * 0.22 + headCenterY := totalWidth * 0.18 + bodyTop := headCenterY + headRadius*0.8 - // Head center is now at headRadius from the top - headCenterY := headRadius + // Include vertical padding from GetInnerBox + verticalPadding := totalWidth * 0.06 // 3% top + 3% bottom + totalHeight := contentHeight + bodyTop + verticalPadding - // Body starts at headCenterY + headRadius*0.8 - bodyTopPosition := headCenterY + headRadius*0.8 + // Calculate minimum height based on actual proportions + // Head height: 2 * headRadius = 0.44 * width + // Body should be at least half the width + minHeight := totalWidth * 0.95 // Reduced from 1.2 + if totalHeight < minHeight { + totalHeight = minHeight + } - // Add space for body (head is now fully contained) - totalHeight += bodyTopPosition - - // Horizontal padding is handled in GetInnerBox (5% on each side) - totalWidth /= 0.9 - - // Prevent the shape's aspect ratio from becoming too extreme totalWidth, totalHeight = LimitAR(totalWidth, totalHeight, C4_PERSON_AR_LIMIT) - return math.Ceil(totalWidth), math.Ceil(totalHeight) } From b26c036cc988db42f7b53da93b929740938de821 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 19:41:31 -0600 Subject: [PATCH 3/9] fix --- .../testdata/TestCLI_E2E/empty-base.exp.svg | 168 ++--- .../c4-person-label/dagre/board.exp.json | 513 ++++++++++++++- .../c4-person-label/dagre/sketch.exp.svg | 584 +++++++++--------- .../txtar/c4-person-label/elk/board.exp.json | 415 ++++++++++++- .../txtar/c4-person-label/elk/sketch.exp.svg | 584 +++++++++--------- .../c4-person-shape/dagre/board.exp.json | 32 +- .../c4-person-shape/dagre/sketch.exp.svg | 576 ++++++++--------- .../txtar/c4-person-shape/elk/board.exp.json | 26 +- .../txtar/c4-person-shape/elk/sketch.exp.svg | 576 ++++++++--------- .../txtar/c4-theme/dagre/board.exp.json | 12 +- .../txtar/c4-theme/dagre/sketch.exp.svg | 562 ++++++++--------- .../txtar/c4-theme/elk/sketch.exp.svg | 4 +- .../small-c4-person/dagre/board.exp.json | 2 +- .../small-c4-person/dagre/sketch.exp.svg | 156 ++--- .../txtar/small-c4-person/elk/board.exp.json | 2 +- .../txtar/small-c4-person/elk/sketch.exp.svg | 156 ++--- e2etests/txtar.txt | 43 ++ lib/shape/shape_c4_person.go | 71 ++- 18 files changed, 2734 insertions(+), 1748 deletions(-) diff --git a/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg b/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg index 5efe15eb8..99003267f 100644 --- a/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg +++ b/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg @@ -1,9 +1,9 @@ ab +}]]>ab -abdc +abdc -abdce - +abdce + - - - + + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json index d164ab8a8..def972f1f 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json @@ -16,7 +16,7 @@ "type": "c4-person", "pos": { "x": 0, - "y": 0 + "y": 18 }, "width": 410, "height": 390, @@ -58,7 +58,7 @@ "type": "c4-person", "pos": { "x": 470, - "y": 0 + "y": 18 }, "width": 410, "height": 390, @@ -100,7 +100,7 @@ "type": "c4-person", "pos": { "x": 940, - "y": 0 + "y": 18 }, "width": 410, "height": 390, @@ -136,9 +136,514 @@ "labelPosition": "INSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "customer1", + "type": "c4-person", + "pos": { + "x": 1410, + "y": 0 + }, + "width": 448, + "height": 426, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank ccountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 388, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer2", + "type": "c4-person", + "pos": { + "x": 1137, + "y": 526 + }, + "width": 457, + "height": 453, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customerk\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 199, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer3", + "type": "c4-person", + "pos": { + "x": 1147, + "y": 1079 + }, + "width": 457, + "height": 434, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer4", + "type": "c4-person", + "pos": { + "x": 1426, + "y": 1613 + }, + "width": 457, + "height": 434, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(customer1 -> customer2)[0]", + "src": "customer1", + "srcArrow": "none", + "dst": "customer2", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1433, + "y": 410 + }, + { + "x": 1379, + "y": 462.79998779296875 + }, + { + "x": 1365.5999755859375, + "y": 486 + }, + { + "x": 1366, + "y": 526 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer2 -> customer3)[0]", + "src": "customer2", + "srcArrow": "none", + "dst": "customer3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1358, + "y": 979 + }, + { + "x": 1356, + "y": 1019 + }, + { + "x": 1356.4000244140625, + "y": 1039.199951171875 + }, + { + "x": 1360, + "y": 1080 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer3 -> customer4)[0]", + "src": "customer3", + "srcArrow": "none", + "dst": "customer4", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1375, + "y": 1513 + }, + { + "x": 1375.4000244140625, + "y": 1553 + }, + { + "x": 1411.800048828125, + "y": 1597.800048828125 + }, + { + "x": 1557, + "y": 1737 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer4 -> customer1)[0]", + "src": "customer4", + "srcArrow": "none", + "dst": "customer1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1654, + "y": 1613 + }, + { + "x": 1654, + "y": 1573 + }, + { + "x": 1654, + "y": 1509.5999755859375 + }, + { + "x": 1654, + "y": 1429.5 + }, + { + "x": 1654, + "y": 1349.4000244140625 + }, + { + "x": 1654, + "y": 1242.5999755859375 + }, + { + "x": 1654, + "y": 1162.5 + }, + { + "x": 1654, + "y": 1082.4000244140625 + }, + { + "x": 1654, + "y": 973.7000122070312 + }, + { + "x": 1654, + "y": 890.75 + }, + { + "x": 1654, + "y": 807.7999877929688 + }, + { + "x": 1653.199951171875, + "y": 466 + }, + { + "x": 1650, + "y": 426 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer1 -> customer3)[0]", + "src": "customer1", + "srcArrow": "none", + "dst": "customer3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1634, + "y": 426 + }, + { + "x": 1634, + "y": 466 + }, + { + "x": 1634, + "y": 531.2999877929688 + }, + { + "x": 1634, + "y": 614.25 + }, + { + "x": 1634, + "y": 697.2000122070312 + }, + { + "x": 1602.199951171875, + "y": 1062.199951171875 + }, + { + "x": 1475, + "y": 1195 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer3 -> customer2)[0]", + "src": "customer3", + "srcArrow": "none", + "dst": "customer2", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1453, + "y": 1116 + }, + { + "x": 1482.4000244140625, + "y": 1046.4000244140625 + }, + { + "x": 1485.4000244140625, + "y": 1019 + }, + { + "x": 1468, + "y": 979 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 } ], - "connections": [], "root": { "id": "", "type": "", diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg index bab515547..25c78740e 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg @@ -1,14 +1,14 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-
- - - - +

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank ccountskks.

+

Personal Banking Customerk

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+

A customer of the bank, with pekkrsonal bank accountskks.

+

A customer of the bank, with pekkrsonal bank accountskks.

+

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+
+ + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json index 636de29e5..e46b21769 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json @@ -16,7 +16,7 @@ "type": "c4-person", "pos": { "x": 12, - "y": 12 + "y": 30 }, "width": 410, "height": 390, @@ -57,8 +57,8 @@ "id": "c4mdperson2", "type": "c4-person", "pos": { - "x": 442, - "y": 12 + "x": 441, + "y": 30 }, "width": 410, "height": 390, @@ -99,8 +99,8 @@ "id": "c4mdperson3", "type": "c4-person", "pos": { - "x": 872, - "y": 12 + "x": 871, + "y": 30 }, "width": 410, "height": 390, @@ -136,9 +136,412 @@ "labelPosition": "INSIDE_BOTTOM_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "customer1", + "type": "c4-person", + "pos": { + "x": 1301, + "y": 12 + }, + "width": 448, + "height": 426, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank ccountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 388, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer2", + "type": "c4-person", + "pos": { + "x": 1028, + "y": 518 + }, + "width": 457, + "height": 453, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customerk\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 199, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer3", + "type": "c4-person", + "pos": { + "x": 1123, + "y": 1051 + }, + "width": 457, + "height": 434, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "customer4", + "type": "c4-person", + "pos": { + "x": 1313, + "y": 1565 + }, + "width": 457, + "height": 434, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B3", + "stroke": "B1", + "animated": false, + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "## Personal Banking Customer\n[person]\n\nA customer of the bank, with pekkrsonal bank accountskks.", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "markdown", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 396, + "labelHeight": 119, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + } + ], + "connections": [ + { + "id": "(customer1 -> customer2)[0]", + "src": "customer1", + "srcArrow": "none", + "dst": "customer2", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1414, + "y": 438 + }, + { + "x": 1414, + "y": 699 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer2 -> customer3)[0]", + "src": "customer2", + "srcArrow": "none", + "dst": "customer3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1237, + "y": 971 + }, + { + "x": 1237, + "y": 1232 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer3 -> customer4)[0]", + "src": "customer3", + "srcArrow": "none", + "dst": "customer4", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1466, + "y": 1485 + }, + { + "x": 1466, + "y": 1600 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer4 -> customer1)[0]", + "src": "customer4", + "srcArrow": "none", + "dst": "customer1", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1620, + "y": 1603 + }, + { + "x": 1620, + "y": 438 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer1 -> customer3)[0]", + "src": "customer1", + "srcArrow": "none", + "dst": "customer3", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1526, + "y": 438 + }, + { + "x": 1526, + "y": 1233 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(customer3 -> customer2)[0]", + "src": "customer3", + "srcArrow": "none", + "dst": "customer2", + "dstArrow": "triangle", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "link": "", + "route": [ + { + "x": 1334, + "y": 1053 + }, + { + "x": 1334, + "y": 971 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 } ], - "connections": [], "root": { "id": "", "type": "", diff --git a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg index bfadee541..5a6e872f4 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg @@ -1,14 +1,14 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-
- - - - +

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank ccountskks.

+

Personal Banking Customerk

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+

A customer of the bank, with pekkrsonal bank accountskks.

+

A customer of the bank, with pekkrsonal bank accountskks.

+

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+

Personal Banking Customer

+

[person]

+

A customer of the bank, with pekkrsonal bank accountskks.

+
+ + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json index 279169e81..bd1bb8ae3 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 0, - "y": 504 + "y": 507 }, "width": 336, - "height": 328, + "height": 342, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 101, - "y": 309 + "y": 311 }, "width": 134, "height": 89, @@ -145,7 +145,7 @@ "y": 273 }, "width": 210, - "height": 515, + "height": 525, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -187,7 +187,7 @@ "y": 303 }, "width": 84, - "height": 101, + "height": 104, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 416, - "y": 578 + "y": 588 }, "width": 150, "height": 180, @@ -292,19 +292,19 @@ "route": [ { "x": 168, - "y": 424 + "y": 426 }, { "x": 168, - "y": 448 + "y": 450.79998779296875 }, { "x": 168, - "y": 461 + "y": 467 }, { "x": 168, - "y": 489 + "y": 507 } ], "isCurve": true, @@ -348,11 +348,11 @@ }, { "x": 168, - "y": 264.20001220703125 + "y": 264.6000061035156 }, { "x": 168, - "y": 309 + "y": 311 } ], "isCurve": true, @@ -436,19 +436,19 @@ "route": [ { "x": 491, - "y": 405 + "y": 407 }, { "x": 491, - "y": 444.20001220703125 + "y": 447 }, { "x": 491, - "y": 478.6000061035156 + "y": 483.20001220703125 }, { "x": 491, - "y": 577 + "y": 588 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg index 65e12a1b3..251910a6e 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + - - - + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json index 95cb99c31..52e292df6 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 12, - "y": 935 + "y": 938 }, "width": 336, - "height": 328, + "height": 342, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 113, - "y": 750 + "y": 753 }, "width": 134, "height": 89, @@ -145,7 +145,7 @@ "y": 229 }, "width": 250, - "height": 451, + "height": 454, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -187,7 +187,7 @@ "y": 279 }, "width": 84, - "height": 101, + "height": 104, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 306, - "y": 450 + "y": 453 }, "width": 150, "height": 180, @@ -292,11 +292,11 @@ "route": [ { "x": 180, - "y": 865 + "y": 868 }, { "x": 180, - "y": 920 + "y": 938 } ], "animated": false, @@ -331,7 +331,7 @@ "route": [ { "x": 258, - "y": 144 + "y": 143 }, { "x": 257.5830078125, @@ -343,7 +343,7 @@ }, { "x": 180, - "y": 750 + "y": 753 } ], "animated": false, @@ -378,7 +378,7 @@ "route": [ { "x": 304, - "y": 144 + "y": 143 }, { "x": 303.9159851074219, @@ -425,11 +425,11 @@ "route": [ { "x": 381, - "y": 381 + "y": 383 }, { "x": 382, - "y": 449 + "y": 453 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg index d7fdb9e74..6305b8c57 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + - - - + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json index e462c9a73..4b80ded31 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json @@ -513,12 +513,12 @@ "link": "", "route": [ { - "x": 1092, - "y": 348 + "x": 1091, + "y": 349 }, { - "x": 968, - "y": 439.6000061035156 + "x": 967.7999877929688, + "y": 439.79998779296875 }, { "x": 937, @@ -801,11 +801,11 @@ "link": "", "route": [ { - "x": 1505, + "x": 1503, "y": 238 }, { - "x": 2410.60009765625, + "x": 2410.199951171875, "y": 417.6000061035156 }, { diff --git a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg index 2613fb8b3..fb2279b45 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

Internet Banking System

@@ -862,9 +862,9 @@

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - + @@ -875,12 +875,12 @@ - + - +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg index 31b06adcb..46f088711 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg @@ -836,7 +836,7 @@ .d2-1295531492 .md .contains-task-list:dir(rtl) .task-list-item-checkbox { margin: 0 -1.6em 0.25em 0.2em; } -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

Internet Banking System

@@ -864,7 +864,7 @@

Stores user registration information, hashed authentication credentials, access logs, etc.

Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - + diff --git a/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json b/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json index e0d8c0959..999037997 100644 --- a/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json +++ b/e2etests/testdata/txtar/small-c4-person/dagre/board.exp.json @@ -19,7 +19,7 @@ "y": 0 }, "width": 180, - "height": 94, + "height": 97, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, diff --git a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg index 009c53f4e..a743498d0 100644 --- a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg @@ -1,9 +1,9 @@ -c4-person - - + .d2-1864249435 .fill-N1{fill:#0A0F25;} + .d2-1864249435 .fill-N2{fill:#676C7E;} + .d2-1864249435 .fill-N3{fill:#9499AB;} + .d2-1864249435 .fill-N4{fill:#CFD2DD;} + .d2-1864249435 .fill-N5{fill:#DEE1EB;} + .d2-1864249435 .fill-N6{fill:#EEF1F8;} + .d2-1864249435 .fill-N7{fill:#FFFFFF;} + .d2-1864249435 .fill-B1{fill:#0D32B2;} + .d2-1864249435 .fill-B2{fill:#0D32B2;} + .d2-1864249435 .fill-B3{fill:#E3E9FD;} + .d2-1864249435 .fill-B4{fill:#E3E9FD;} + .d2-1864249435 .fill-B5{fill:#EDF0FD;} + .d2-1864249435 .fill-B6{fill:#F7F8FE;} + .d2-1864249435 .fill-AA2{fill:#4A6FF3;} + .d2-1864249435 .fill-AA4{fill:#EDF0FD;} + .d2-1864249435 .fill-AA5{fill:#F7F8FE;} + .d2-1864249435 .fill-AB4{fill:#EDF0FD;} + .d2-1864249435 .fill-AB5{fill:#F7F8FE;} + .d2-1864249435 .stroke-N1{stroke:#0A0F25;} + .d2-1864249435 .stroke-N2{stroke:#676C7E;} + .d2-1864249435 .stroke-N3{stroke:#9499AB;} + .d2-1864249435 .stroke-N4{stroke:#CFD2DD;} + .d2-1864249435 .stroke-N5{stroke:#DEE1EB;} + .d2-1864249435 .stroke-N6{stroke:#EEF1F8;} + .d2-1864249435 .stroke-N7{stroke:#FFFFFF;} + .d2-1864249435 .stroke-B1{stroke:#0D32B2;} + .d2-1864249435 .stroke-B2{stroke:#0D32B2;} + .d2-1864249435 .stroke-B3{stroke:#E3E9FD;} + .d2-1864249435 .stroke-B4{stroke:#E3E9FD;} + .d2-1864249435 .stroke-B5{stroke:#EDF0FD;} + .d2-1864249435 .stroke-B6{stroke:#F7F8FE;} + .d2-1864249435 .stroke-AA2{stroke:#4A6FF3;} + .d2-1864249435 .stroke-AA4{stroke:#EDF0FD;} + .d2-1864249435 .stroke-AA5{stroke:#F7F8FE;} + .d2-1864249435 .stroke-AB4{stroke:#EDF0FD;} + .d2-1864249435 .stroke-AB5{stroke:#F7F8FE;} + .d2-1864249435 .background-color-N1{background-color:#0A0F25;} + .d2-1864249435 .background-color-N2{background-color:#676C7E;} + .d2-1864249435 .background-color-N3{background-color:#9499AB;} + .d2-1864249435 .background-color-N4{background-color:#CFD2DD;} + .d2-1864249435 .background-color-N5{background-color:#DEE1EB;} + .d2-1864249435 .background-color-N6{background-color:#EEF1F8;} + .d2-1864249435 .background-color-N7{background-color:#FFFFFF;} + .d2-1864249435 .background-color-B1{background-color:#0D32B2;} + .d2-1864249435 .background-color-B2{background-color:#0D32B2;} + .d2-1864249435 .background-color-B3{background-color:#E3E9FD;} + .d2-1864249435 .background-color-B4{background-color:#E3E9FD;} + .d2-1864249435 .background-color-B5{background-color:#EDF0FD;} + .d2-1864249435 .background-color-B6{background-color:#F7F8FE;} + .d2-1864249435 .background-color-AA2{background-color:#4A6FF3;} + .d2-1864249435 .background-color-AA4{background-color:#EDF0FD;} + .d2-1864249435 .background-color-AA5{background-color:#F7F8FE;} + .d2-1864249435 .background-color-AB4{background-color:#EDF0FD;} + .d2-1864249435 .background-color-AB5{background-color:#F7F8FE;} + .d2-1864249435 .color-N1{color:#0A0F25;} + .d2-1864249435 .color-N2{color:#676C7E;} + .d2-1864249435 .color-N3{color:#9499AB;} + .d2-1864249435 .color-N4{color:#CFD2DD;} + .d2-1864249435 .color-N5{color:#DEE1EB;} + .d2-1864249435 .color-N6{color:#EEF1F8;} + .d2-1864249435 .color-N7{color:#FFFFFF;} + .d2-1864249435 .color-B1{color:#0D32B2;} + .d2-1864249435 .color-B2{color:#0D32B2;} + .d2-1864249435 .color-B3{color:#E3E9FD;} + .d2-1864249435 .color-B4{color:#E3E9FD;} + .d2-1864249435 .color-B5{color:#EDF0FD;} + .d2-1864249435 .color-B6{color:#F7F8FE;} + .d2-1864249435 .color-AA2{color:#4A6FF3;} + .d2-1864249435 .color-AA4{color:#EDF0FD;} + .d2-1864249435 .color-AA5{color:#F7F8FE;} + .d2-1864249435 .color-AB4{color:#EDF0FD;} + .d2-1864249435 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + + \ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json b/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json index 56a15e872..a6f4b3250 100644 --- a/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json +++ b/e2etests/testdata/txtar/small-c4-person/elk/board.exp.json @@ -19,7 +19,7 @@ "y": 12 }, "width": 180, - "height": 94, + "height": 97, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, diff --git a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg index 4de020608..fa51d71b6 100644 --- a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -c4-person - - + .d2-1736778707 .fill-N1{fill:#0A0F25;} + .d2-1736778707 .fill-N2{fill:#676C7E;} + .d2-1736778707 .fill-N3{fill:#9499AB;} + .d2-1736778707 .fill-N4{fill:#CFD2DD;} + .d2-1736778707 .fill-N5{fill:#DEE1EB;} + .d2-1736778707 .fill-N6{fill:#EEF1F8;} + .d2-1736778707 .fill-N7{fill:#FFFFFF;} + .d2-1736778707 .fill-B1{fill:#0D32B2;} + .d2-1736778707 .fill-B2{fill:#0D32B2;} + .d2-1736778707 .fill-B3{fill:#E3E9FD;} + .d2-1736778707 .fill-B4{fill:#E3E9FD;} + .d2-1736778707 .fill-B5{fill:#EDF0FD;} + .d2-1736778707 .fill-B6{fill:#F7F8FE;} + .d2-1736778707 .fill-AA2{fill:#4A6FF3;} + .d2-1736778707 .fill-AA4{fill:#EDF0FD;} + .d2-1736778707 .fill-AA5{fill:#F7F8FE;} + .d2-1736778707 .fill-AB4{fill:#EDF0FD;} + .d2-1736778707 .fill-AB5{fill:#F7F8FE;} + .d2-1736778707 .stroke-N1{stroke:#0A0F25;} + .d2-1736778707 .stroke-N2{stroke:#676C7E;} + .d2-1736778707 .stroke-N3{stroke:#9499AB;} + .d2-1736778707 .stroke-N4{stroke:#CFD2DD;} + .d2-1736778707 .stroke-N5{stroke:#DEE1EB;} + .d2-1736778707 .stroke-N6{stroke:#EEF1F8;} + .d2-1736778707 .stroke-N7{stroke:#FFFFFF;} + .d2-1736778707 .stroke-B1{stroke:#0D32B2;} + .d2-1736778707 .stroke-B2{stroke:#0D32B2;} + .d2-1736778707 .stroke-B3{stroke:#E3E9FD;} + .d2-1736778707 .stroke-B4{stroke:#E3E9FD;} + .d2-1736778707 .stroke-B5{stroke:#EDF0FD;} + .d2-1736778707 .stroke-B6{stroke:#F7F8FE;} + .d2-1736778707 .stroke-AA2{stroke:#4A6FF3;} + .d2-1736778707 .stroke-AA4{stroke:#EDF0FD;} + .d2-1736778707 .stroke-AA5{stroke:#F7F8FE;} + .d2-1736778707 .stroke-AB4{stroke:#EDF0FD;} + .d2-1736778707 .stroke-AB5{stroke:#F7F8FE;} + .d2-1736778707 .background-color-N1{background-color:#0A0F25;} + .d2-1736778707 .background-color-N2{background-color:#676C7E;} + .d2-1736778707 .background-color-N3{background-color:#9499AB;} + .d2-1736778707 .background-color-N4{background-color:#CFD2DD;} + .d2-1736778707 .background-color-N5{background-color:#DEE1EB;} + .d2-1736778707 .background-color-N6{background-color:#EEF1F8;} + .d2-1736778707 .background-color-N7{background-color:#FFFFFF;} + .d2-1736778707 .background-color-B1{background-color:#0D32B2;} + .d2-1736778707 .background-color-B2{background-color:#0D32B2;} + .d2-1736778707 .background-color-B3{background-color:#E3E9FD;} + .d2-1736778707 .background-color-B4{background-color:#E3E9FD;} + .d2-1736778707 .background-color-B5{background-color:#EDF0FD;} + .d2-1736778707 .background-color-B6{background-color:#F7F8FE;} + .d2-1736778707 .background-color-AA2{background-color:#4A6FF3;} + .d2-1736778707 .background-color-AA4{background-color:#EDF0FD;} + .d2-1736778707 .background-color-AA5{background-color:#F7F8FE;} + .d2-1736778707 .background-color-AB4{background-color:#EDF0FD;} + .d2-1736778707 .background-color-AB5{background-color:#F7F8FE;} + .d2-1736778707 .color-N1{color:#0A0F25;} + .d2-1736778707 .color-N2{color:#676C7E;} + .d2-1736778707 .color-N3{color:#9499AB;} + .d2-1736778707 .color-N4{color:#CFD2DD;} + .d2-1736778707 .color-N5{color:#DEE1EB;} + .d2-1736778707 .color-N6{color:#EEF1F8;} + .d2-1736778707 .color-N7{color:#FFFFFF;} + .d2-1736778707 .color-B1{color:#0D32B2;} + .d2-1736778707 .color-B2{color:#0D32B2;} + .d2-1736778707 .color-B3{color:#E3E9FD;} + .d2-1736778707 .color-B4{color:#E3E9FD;} + .d2-1736778707 .color-B5{color:#EDF0FD;} + .d2-1736778707 .color-B6{color:#F7F8FE;} + .d2-1736778707 .color-AA2{color:#4A6FF3;} + .d2-1736778707 .color-AA4{color:#EDF0FD;} + .d2-1736778707 .color-AA5{color:#F7F8FE;} + .d2-1736778707 .color-AB4{color:#EDF0FD;} + .d2-1736778707 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + + \ No newline at end of file diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index 89d18ce17..62d82d7ef 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -1221,3 +1221,46 @@ A customer of the bank, with personal bank accounts shape: c4-person label.near: bottom-center } + +customer1: |md + ## Personal Banking Customer + [person] + + A customer of the bank, with pekkrsonal bank ccountskks. +| { + shape: c4-person +} + +customer2: |md + ## Personal Banking Customerk + [person] + + A customer of the bank, with pekkrsonal bank accountskks. + + A customer of the bank, with pekkrsonal bank accountskks. + + A customer of the bank, with pekkrsonal bank accountskks. +| { + shape: c4-person +} + +customer3: |md + ## Personal Banking Customer + [person] + + A customer of the bank, with pekkrsonal bank accountskks. +| { + shape: c4-person +} + +customer4: |md + ## Personal Banking Customer + [person] + + A customer of the bank, with pekkrsonal bank accountskks. +| { + shape: c4-person +} + +customer1 -> customer2 -> customer3 -> customer4 +customer4 -> customer1 -> customer3 -> customer2 diff --git a/lib/shape/shape_c4_person.go b/lib/shape/shape_c4_person.go index 99d47b07d..e08dc2810 100644 --- a/lib/shape/shape_c4_person.go +++ b/lib/shape/shape_c4_person.go @@ -11,6 +11,14 @@ import ( // Optimal value for circular arc approximation with cubic bezier curves const kCircleApprox = 0.5522847498307936 // 4*(math.Sqrt(2)-1)/3 +// Constants to match frontend implementation +const ( + C4_PERSON_AR_LIMIT = 1.5 + HEAD_RADIUS_FACTOR = 0.22 + BODY_TOP_FACTOR = 0.8 + CORNER_RADIUS_FACTOR = 0.175 +) + type shapeC4Person struct { *baseShape } @@ -26,32 +34,25 @@ func NewC4Person(box *geo.Box) Shape { return shape } -const ( - C4_PERSON_AR_LIMIT = 1.5 -) - func (s shapeC4Person) GetInnerBox() *geo.Box { width := s.Box.Width height := s.Box.Height - headRadius := width * 0.22 - headCenterY := height * 0.18 - bodyTop := headCenterY + headRadius*0.8 + headRadius := width * HEAD_RADIUS_FACTOR + headCenterY := headRadius + bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR - // Use a small fixed percentage instead of the full corner radius - horizontalPadding := width * 0.05 // 5% padding + // Horizontal padding = 5% of width + horizontalPadding := width * 0.05 + // Vertical padding = 3% of height + verticalPadding := height * 0.03 tl := s.Box.TopLeft.Copy() tl.X += horizontalPadding + tl.Y += bodyTop + verticalPadding - // Add vertical padding - tl.Y += bodyTop + height*0.03 - - // Width minus padding on both sides innerWidth := width - (horizontalPadding * 2) - - // Add bottom padding - innerHeight := height - (tl.Y - s.Box.TopLeft.Y) - (height * 0.03) + innerHeight := height - bodyTop - (verticalPadding * 2) return geo.NewBox(tl, innerWidth, innerHeight) } @@ -62,15 +63,15 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - headRadius := width * 0.22 - headCenterY := height * 0.18 - bodyTop := headCenterY + headRadius*0.8 + headRadius := width * HEAD_RADIUS_FACTOR + headCenterY := headRadius + bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR bodyWidth := width bodyHeight := height - bodyTop bodyLeft := 0 - // Ensure cornerRadius is constrained to a portion of the shortest dimension - // This prevents distorted corners when width is large compared to height - cornerRadius := math.Min(width*0.175, bodyHeight*0.25) + + // Use the same corner radius calculation as frontend + cornerRadius := math.Min(width*CORNER_RADIUS_FACTOR, bodyHeight*0.25) pc.StartAt(pc.Absolute(float64(bodyLeft), bodyTop+cornerRadius)) @@ -88,13 +89,12 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { func headPath(box *geo.Box) *svg.SvgPathContext { width := box.Width - height := box.Height pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - headRadius := width * 0.22 + headRadius := width * HEAD_RADIUS_FACTOR headCenterX := width / 2 - headCenterY := height * 0.18 + headCenterY := headRadius pc.StartAt(pc.Absolute(headCenterX, headCenterY-headRadius)) @@ -123,13 +123,12 @@ func headPath(box *geo.Box) *svg.SvgPathContext { func (s shapeC4Person) Perimeter() []geo.Intersectable { width := s.Box.Width - height := s.Box.Height bodyPerimeter := bodyPath(s.Box).Path - headRadius := width * 0.22 + headRadius := width * HEAD_RADIUS_FACTOR headCenterX := s.Box.TopLeft.X + width/2 - headCenterY := s.Box.TopLeft.Y + height*0.18 + headCenterY := s.Box.TopLeft.Y + headRadius headCenter := geo.NewPoint(headCenterX, headCenterY) headEllipse := geo.NewEllipse(headCenter, headRadius, headRadius) @@ -150,18 +149,18 @@ func (s shapeC4Person) GetDimensionsToFit(width, height, paddingX, paddingY floa // Account for 10% total horizontal padding (5% on each side) totalWidth := contentWidth / 0.9 - headRadius := totalWidth * 0.22 - headCenterY := totalWidth * 0.18 - bodyTop := headCenterY + headRadius*0.8 + headRadius := totalWidth * HEAD_RADIUS_FACTOR - // Include vertical padding from GetInnerBox + // Use positioning matching frontend + headCenterY := headRadius + bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR + + // Include vertical padding verticalPadding := totalWidth * 0.06 // 3% top + 3% bottom totalHeight := contentHeight + bodyTop + verticalPadding - // Calculate minimum height based on actual proportions - // Head height: 2 * headRadius = 0.44 * width - // Body should be at least half the width - minHeight := totalWidth * 0.95 // Reduced from 1.2 + // Calculate minimum height + minHeight := totalWidth * 0.95 if totalHeight < minHeight { totalHeight = minHeight } From 434dca025015cf144efc2de993b4387efa401158 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 19:54:31 -0600 Subject: [PATCH 4/9] revert test --- .../testdata/TestCLI_E2E/empty-base.exp.svg | 168 +++++++++--------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg b/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg index 99003267f..5efe15eb8 100644 --- a/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg +++ b/e2etests-cli/testdata/TestCLI_E2E/empty-base.exp.svg @@ -1,9 +1,9 @@ ab +}]]>ab -abdc +abdc -abdce - +abdce + - - - + + + \ No newline at end of file From c22a8e1ef2644cd45b92089501c9808bcc47a7ee Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 20:04:14 -0600 Subject: [PATCH 5/9] round --- .../c4-person-label/dagre/board.exp.json | 16 +- .../c4-person-label/dagre/sketch.exp.svg | 576 ++++++++--------- .../txtar/c4-person-label/elk/board.exp.json | 10 +- .../txtar/c4-person-label/elk/sketch.exp.svg | 576 ++++++++--------- .../c4-person-shape/dagre/board.exp.json | 44 +- .../c4-person-shape/dagre/sketch.exp.svg | 574 ++++++++-------- .../txtar/c4-person-shape/elk/board.exp.json | 30 +- .../txtar/c4-person-shape/elk/sketch.exp.svg | 574 ++++++++-------- .../txtar/c4-theme/dagre/board.exp.json | 168 ++--- .../txtar/c4-theme/dagre/sketch.exp.svg | 612 +++++++++--------- .../txtar/c4-theme/elk/board.exp.json | 100 +-- .../txtar/c4-theme/elk/sketch.exp.svg | 612 +++++++++--------- .../small-c4-person/dagre/sketch.exp.svg | 4 +- .../txtar/small-c4-person/elk/sketch.exp.svg | 4 +- lib/shape/shape_c4_person.go | 41 +- 15 files changed, 1970 insertions(+), 1971 deletions(-) diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json index def972f1f..46d5d7efb 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json @@ -581,12 +581,12 @@ "y": 697.2000122070312 }, { - "x": 1602.199951171875, - "y": 1062.199951171875 + "x": 1602.4000244140625, + "y": 1061.800048828125 }, { - "x": 1475, - "y": 1195 + "x": 1476, + "y": 1193 } ], "isCurve": true, @@ -621,12 +621,12 @@ "link": "", "route": [ { - "x": 1453, - "y": 1116 + "x": 1454, + "y": 1115 }, { - "x": 1482.4000244140625, - "y": 1046.4000244140625 + "x": 1482.5999755859375, + "y": 1046.199951171875 }, { "x": 1485.4000244140625, diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg index 25c78740e..50b84155b 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg @@ -1,13 +1,13 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank ccountskks.

-

Personal Banking Customerk

+

Personal Banking Customerk

[person]

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-
+
- - - - - - - + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json index e46b21769..475186c2e 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json @@ -338,7 +338,7 @@ }, { "x": 1414, - "y": 699 + "y": 700 } ], "animated": false, @@ -377,7 +377,7 @@ }, { "x": 1237, - "y": 1232 + "y": 1233 } ], "animated": false, @@ -411,7 +411,7 @@ "link": "", "route": [ { - "x": 1466, + "x": 1465, "y": 1485 }, { @@ -451,7 +451,7 @@ "route": [ { "x": 1620, - "y": 1603 + "y": 1602 }, { "x": 1620, @@ -494,7 +494,7 @@ }, { "x": 1526, - "y": 1233 + "y": 1234 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg index 5a6e872f4..c47068bb4 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg @@ -1,13 +1,13 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank ccountskks.

-

Personal Banking Customerk

+

Personal Banking Customerk

[person]

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-
+
- - - - - - - + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json index bd1bb8ae3..6927d0036 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 0, - "y": 507 + "y": 506 }, "width": 336, - "height": 342, + "height": 341, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 101, - "y": 311 + "y": 310 }, "width": 134, "height": 89, @@ -145,7 +145,7 @@ "y": 273 }, "width": 210, - "height": 525, + "height": 524, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -183,11 +183,11 @@ "id": "styling.c4styled", "type": "c4-person", "pos": { - "x": 449, + "x": 450, "y": 303 }, - "width": 84, - "height": 104, + "width": 83, + "height": 103, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 416, - "y": 588 + "y": 587 }, "width": 150, "height": 180, @@ -292,19 +292,19 @@ "route": [ { "x": 168, - "y": 426 + "y": 425 }, { "x": 168, - "y": 450.79998779296875 + "y": 449.79998779296875 }, { "x": 168, - "y": 467 + "y": 466 }, { "x": 168, - "y": 507 + "y": 506 } ], "isCurve": true, @@ -339,20 +339,20 @@ "link": "", "route": [ { - "x": 262, + "x": 261, "y": 119 }, { - "x": 186.8000030517578, + "x": 186.60000610351562, "y": 177.8000030517578 }, { "x": 168, - "y": 264.6000061035156 + "y": 264.3999938964844 }, { "x": 168, - "y": 311 + "y": 310 } ], "isCurve": true, @@ -387,11 +387,11 @@ "link": "", "route": [ { - "x": 397, + "x": 398, "y": 119 }, { - "x": 472.20001220703125, + "x": 472.3999938964844, "y": 177.8000030517578 }, { @@ -436,19 +436,19 @@ "route": [ { "x": 491, - "y": 407 + "y": 406 }, { "x": 491, - "y": 447 + "y": 446 }, { "x": 491, - "y": 483.20001220703125 + "y": 482.20001220703125 }, { "x": 491, - "y": 588 + "y": 587 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg index 251910a6e..09f65b478 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + - - + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json index 52e292df6..7e26d5c32 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 12, - "y": 938 + "y": 937 }, "width": 336, - "height": 342, + "height": 341, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 113, - "y": 753 + "y": 752 }, "width": 134, "height": 89, @@ -145,7 +145,7 @@ "y": 229 }, "width": 250, - "height": 454, + "height": 453, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -183,11 +183,11 @@ "id": "styling.c4styled", "type": "c4-person", "pos": { - "x": 339, + "x": 340, "y": 279 }, - "width": 84, - "height": 104, + "width": 83, + "height": 103, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 306, - "y": 453 + "y": 452 }, "width": 150, "height": 180, @@ -292,11 +292,11 @@ "route": [ { "x": 180, - "y": 868 + "y": 867 }, { "x": 180, - "y": 938 + "y": 937 } ], "animated": false, @@ -331,7 +331,7 @@ "route": [ { "x": 258, - "y": 143 + "y": 144 }, { "x": 257.5830078125, @@ -343,7 +343,7 @@ }, { "x": 180, - "y": 753 + "y": 752 } ], "animated": false, @@ -378,7 +378,7 @@ "route": [ { "x": 304, - "y": 143 + "y": 144 }, { "x": 303.9159851074219, @@ -425,11 +425,11 @@ "route": [ { "x": 381, - "y": 383 + "y": 382 }, { "x": 382, - "y": 453 + "y": 452 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg index 6305b8c57..f1cdfda47 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + - - + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json index 4b80ded31..bfeabddd5 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json @@ -18,8 +18,8 @@ "x": 1089, "y": 0 }, - "width": 415, - "height": 394, + "width": 414, + "height": 393, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,7 +58,7 @@ "type": "rectangle", "pos": { "x": 147, - "y": 551 + "y": 550 }, "width": 2407, "height": 915, @@ -100,7 +100,7 @@ "type": "rectangle", "pos": { "x": 177, - "y": 581 + "y": 580 }, "width": 550, "height": 164, @@ -142,7 +142,7 @@ "type": "rectangle", "pos": { "x": 390, - "y": 866 + "y": 865 }, "width": 609, "height": 164, @@ -184,7 +184,7 @@ "type": "rectangle", "pos": { "x": 1123, - "y": 866 + "y": 865 }, "width": 707, "height": 164, @@ -226,7 +226,7 @@ "type": "rectangle", "pos": { "x": 1246, - "y": 1167 + "y": 1166 }, "width": 461, "height": 164, @@ -268,7 +268,7 @@ "type": "rectangle", "pos": { "x": 1890, - "y": 866 + "y": 865 }, "width": 634, "height": 164, @@ -310,7 +310,7 @@ "type": "rectangle", "pos": { "x": 2410, - "y": 1603 + "y": 1602 }, "width": 360, "height": 164, @@ -352,7 +352,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 1603 + "y": 1602 }, "width": 629, "height": 164, @@ -418,19 +418,19 @@ "route": [ { "x": 1089, - "y": 262 + "y": 261 }, { "x": 579.4000244140625, - "y": 422.3999938964844 + "y": 421.3999938964844 }, { "x": 452, - "y": 541 + "y": 540 }, { "x": 452, - "y": 581 + "y": 580 } ], "isCurve": true, @@ -466,19 +466,19 @@ "route": [ { "x": 452, - "y": 744.5 + "y": 743.5 }, { "x": 452, - "y": 793.2999877929688 + "y": 792.2999877929688 }, { "x": 472.3999938964844, - "y": 817.7000122070312 + "y": 816.7000122070312 }, { "x": 554, - "y": 866.5 + "y": 865.5 } ], "isCurve": true, @@ -514,43 +514,43 @@ "route": [ { "x": 1091, - "y": 349 + "y": 348 }, { "x": 967.7999877929688, - "y": 439.79998779296875 + "y": 438.79998779296875 }, { "x": 937, - "y": 476.20001220703125 + "y": 475.20001220703125 }, { "x": 937, - "y": 496.75 + "y": 495.75 }, { "x": 937, - "y": 517.2990112304688 + "y": 516.2990112304688 }, { "x": 937, - "y": 557.4000244140625 + "y": 556.4000244140625 }, { "x": 937, - "y": 597 + "y": 596 }, { "x": 937, - "y": 636.5999755859375 + "y": 635.5999755859375 }, { "x": 916.5999755859375, - "y": 817.7000122070312 + "y": 816.7000122070312 }, { "x": 835, - "y": 866.5 + "y": 865.5 } ], "isCurve": true, @@ -585,44 +585,44 @@ "link": "", "route": [ { - "x": 1430, - "y": 394 + "x": 1429, + "y": 393 }, { - "x": 1466.800048828125, - "y": 448.79998779296875 + "x": 1466.5999755859375, + "y": 447.79998779296875 }, { "x": 1476, - "y": 476.20001220703125 + "y": 475.20001220703125 }, { "x": 1476, - "y": 496.75 + "y": 495.75 }, { "x": 1476, - "y": 517.2990112304688 + "y": 516.2990112304688 }, { "x": 1476, - "y": 557.4000244140625 + "y": 556.4000244140625 }, { "x": 1476, - "y": 597 + "y": 596 }, { "x": 1476, - "y": 636.5999755859375 + "y": 635.5999755859375 }, { "x": 1476, - "y": 817.7000122070312 + "y": 816.7000122070312 }, { "x": 1476, - "y": 866.5 + "y": 865.5 } ], "isCurve": true, @@ -658,19 +658,19 @@ "route": [ { "x": 694.5, - "y": 1029.5 + "y": 1028.5 }, { "x": 694.5, - "y": 1084.699951171875 + "y": 1083.699951171875 }, { "x": 804.7000122070312, - "y": 1119.7220458984375 + "y": 1118.7220458984375 }, { "x": 1245.5, - "y": 1204.6099853515625 + "y": 1203.6099853515625 } ], "isCurve": true, @@ -706,19 +706,19 @@ "route": [ { "x": 1476, - "y": 1029.5 + "y": 1028.5 }, { "x": 1476, - "y": 1084.699951171875 + "y": 1083.699951171875 }, { "x": 1476, - "y": 1112.300048828125 + "y": 1111.300048828125 }, { "x": 1476, - "y": 1167.5 + "y": 1166.5 } ], "isCurve": true, @@ -754,19 +754,19 @@ "route": [ { "x": 1245.5, - "y": 1275.1949462890625 + "y": 1274.1949462890625 }, { "x": 500.6990051269531, - "y": 1427.8389892578125 + "y": 1426.8389892578125 }, { "x": 314.5, - "y": 1548.300048828125 + "y": 1547.300048828125 }, { "x": 314.5, - "y": 1603.5 + "y": 1602.5 } ], "isCurve": true, @@ -806,99 +806,99 @@ }, { "x": 2410.199951171875, - "y": 417.6000061035156 + "y": 416.79998779296875 }, { "x": 2637, - "y": 476.20001220703125 + "y": 475.20001220703125 }, { "x": 2637, - "y": 496.75 + "y": 495.75 }, { "x": 2637, - "y": 517.2990112304688 + "y": 516.2990112304688 }, { "x": 2637, - "y": 557.4000244140625 + "y": 556.4000244140625 }, { "x": 2637, - "y": 597 + "y": 596 }, { "x": 2637, - "y": 636.5999755859375 + "y": 635.5999755859375 }, { "x": 2637, - "y": 691.5 + "y": 690.5 }, { "x": 2637, - "y": 734.25 + "y": 733.25 }, { "x": 2637, - "y": 777 + "y": 776 }, { "x": 2637, - "y": 834 + "y": 833 }, { "x": 2637, - "y": 876.75 + "y": 875.75 }, { "x": 2637, - "y": 919.5 + "y": 918.5 }, { "x": 2637, - "y": 978.0999755859375 + "y": 977.0999755859375 }, { "x": 2637, - "y": 1023.25 + "y": 1022.25 }, { "x": 2637, - "y": 1068.4000244140625 + "y": 1067.4000244140625 }, { "x": 2637, - "y": 1128.5999755859375 + "y": 1127.5999755859375 }, { "x": 2637, - "y": 1173.75 + "y": 1172.75 }, { "x": 2637, - "y": 1218.9000244140625 + "y": 1217.9000244140625 }, { "x": 2637, - "y": 1292.4000244140625 + "y": 1291.4000244140625 }, { "x": 2637, - "y": 1357.5 + "y": 1356.5 }, { "x": 2637, - "y": 1422.5999755859375 + "y": 1421.5999755859375 }, { "x": 2632.800048828125, - "y": 1548.300048828125 + "y": 1547.300048828125 }, { "x": 2616, - "y": 1603.5 + "y": 1602.5 } ], "isCurve": true, @@ -934,19 +934,19 @@ "route": [ { "x": 1707.5, - "y": 1282.843994140625 + "y": 1281.843994140625 }, { "x": 2241.5, - "y": 1429.3680419921875 + "y": 1428.3680419921875 }, { "x": 2394.39990234375, - "y": 1548.300048828125 + "y": 1547.300048828125 }, { "x": 2472, - "y": 1603.5 + "y": 1602.5 } ], "isCurve": true, @@ -982,19 +982,19 @@ "route": [ { "x": 2206.5, - "y": 1029.5 + "y": 1028.5 }, { "x": 2206.5, - "y": 1084.699951171875 + "y": 1083.699951171875 }, { "x": 2106.5, - "y": 1119.0999755859375 + "y": 1118.0999755859375 }, { "x": 1706.5, - "y": 1201.5 + "y": 1200.5 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg index fb2279b45..ba14d5df2 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

-

Internet Banking System

+

Internet Banking System

[Software System]

-

E-mail System

+

E-mail System

[Software System]

The internal Microsoft Exchange e-mail system.

-

Mainframe Banking System

+

Mainframe Banking System

[Software System]

Stores all of the core banking information about customers, accounts, transactions, etc.

-

Web Application

+

Web Application

[Container: Java and Spring MVC]

Delivers the static content and the Internet banking single page application.

-

Single-Page Application

+

Single-Page Application

[Container: JavaScript and Angular]

Provides all of the Internet banking functionality to customers via their web browser.

-

Mobile App

+

Mobile App

[Container: Xamarin]

Provides a limited subset of the Internet banking functionality to customers via their mobile device.

-

API Application

+

API Application

[Container: Java and Spring MVC]

Provides Internet banking functionality via a JSON/HTTPS API.

-

Database

+

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - - - - - - - - - - - - - - - - - - - - +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/elk/board.exp.json b/e2etests/testdata/txtar/c4-theme/elk/board.exp.json index 4d6d3ccd8..4f90b629b 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/elk/board.exp.json @@ -15,11 +15,11 @@ "id": "customer", "type": "c4-person", "pos": { - "x": 704, + "x": 705, "y": 12 }, - "width": 415, - "height": 394, + "width": 414, + "height": 393, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,7 +58,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 658 + "y": 657 }, "width": 2218, "height": 1035, @@ -100,7 +100,7 @@ "type": "rectangle", "pos": { "x": 62, - "y": 708 + "y": 707 }, "width": 550, "height": 164, @@ -142,7 +142,7 @@ "type": "rectangle", "pos": { "x": 190, - "y": 1043 + "y": 1042 }, "width": 609, "height": 164, @@ -184,7 +184,7 @@ "type": "rectangle", "pos": { "x": 819, - "y": 1043 + "y": 1042 }, "width": 707, "height": 164, @@ -226,7 +226,7 @@ "type": "rectangle", "pos": { "x": 942, - "y": 1394 + "y": 1393 }, "width": 461, "height": 164, @@ -268,7 +268,7 @@ "type": "rectangle", "pos": { "x": 1546, - "y": 1043 + "y": 1042 }, "width": 634, "height": 164, @@ -310,7 +310,7 @@ "type": "rectangle", "pos": { "x": 1746, - "y": 1895 + "y": 1894 }, "width": 360, "height": 164, @@ -352,7 +352,7 @@ "type": "rectangle", "pos": { "x": 781, - "y": 1895 + "y": 1894 }, "width": 629, "height": 164, @@ -418,19 +418,19 @@ "route": [ { "x": 788, - "y": 406 + "y": 405 }, { - "x": 787.75, - "y": 446 + "x": 788.0499877929688, + "y": 445 }, { "x": 359.25, - "y": 446 + "y": 445 }, { "x": 359.25, - "y": 708 + "y": 707 } ], "animated": false, @@ -465,11 +465,11 @@ "route": [ { "x": 393, - "y": 872 + "y": 871 }, { "x": 393, - "y": 1043 + "y": 1042 } ], "animated": false, @@ -504,19 +504,19 @@ "route": [ { "x": 871, - "y": 406 + "y": 405 }, { - "x": 870.75, - "y": 496 + "x": 870.8489990234375, + "y": 495 }, { "x": 652, - "y": 496 + "y": 495 }, { "x": 652, - "y": 1043 + "y": 1042 } ], "animated": false, @@ -551,11 +551,11 @@ "route": [ { "x": 954, - "y": 406 + "y": 405 }, { - "x": 953.75, - "y": 1043 + "x": 953.6489868164062, + "y": 1042 } ], "animated": false, @@ -590,19 +590,19 @@ "route": [ { "x": 494.5, - "y": 1207 + "y": 1206 }, { "x": 494.5, - "y": 1354 + "y": 1353 }, { "x": 1057.25, - "y": 1354 + "y": 1353 }, { "x": 1057.25, - "y": 1394 + "y": 1393 } ], "animated": false, @@ -637,11 +637,11 @@ "route": [ { "x": 1172.5, - "y": 1207 + "y": 1206 }, { "x": 1172.5, - "y": 1394 + "y": 1393 } ], "animated": false, @@ -676,11 +676,11 @@ "route": [ { "x": 1095.666015625, - "y": 1558 + "y": 1557 }, { "x": 1095.666015625, - "y": 1895 + "y": 1894 } ], "animated": false, @@ -714,28 +714,28 @@ "link": "", "route": [ { - "x": 1037, - "y": 406 + "x": 1036, + "y": 405 }, { - "x": 1036.75, - "y": 446 + "x": 1036.448974609375, + "y": 445 }, { "x": 2303.5, - "y": 446 + "y": 445 }, { "x": 2303.5, - "y": 1855 + "y": 1854 }, { "x": 1986.8330078125, - "y": 1855 + "y": 1854 }, { "x": 1986.8330078125, - "y": 1895 + "y": 1894 } ], "animated": false, @@ -770,19 +770,19 @@ "route": [ { "x": 1249.3330078125, - "y": 1558 + "y": 1557 }, { "x": 1249.3330078125, - "y": 1855 + "y": 1854 }, { "x": 1866.8330078125, - "y": 1855 + "y": 1854 }, { "x": 1866.8330078125, - "y": 1895 + "y": 1894 } ], "animated": false, @@ -817,19 +817,19 @@ "route": [ { "x": 1863, - "y": 1207 + "y": 1206 }, { "x": 1863, - "y": 1354 + "y": 1353 }, { "x": 1287.75, - "y": 1354 + "y": 1353 }, { "x": 1287.75, - "y": 1394 + "y": 1393 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg index 46f088711..19d96dd6b 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

-

Internet Banking System

+

Internet Banking System

[Software System]

-

E-mail System

+

E-mail System

[Software System]

The internal Microsoft Exchange e-mail system.

-

Mainframe Banking System

+

Mainframe Banking System

[Software System]

Stores all of the core banking information about customers, accounts, transactions, etc.

-

Web Application

+

Web Application

[Container: Java and Spring MVC]

Delivers the static content and the Internet banking single page application.

-

Single-Page Application

+

Single-Page Application

[Container: JavaScript and Angular]

Provides all of the Internet banking functionality to customers via their web browser.

-

Mobile App

+

Mobile App

[Container: Xamarin]

Provides a limited subset of the Internet banking functionality to customers via their mobile device.

-

API Application

+

API Application

[Container: Java and Spring MVC]

Provides Internet banking functionality via a JSON/HTTPS API.

-

Database

+

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - - - - - - - - - - - - - - - - - - - - +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg index a743498d0..eab5e1bdf 100644 --- a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg @@ -89,7 +89,7 @@ .d2-1864249435 .color-AA4{color:#EDF0FD;} .d2-1864249435 .color-AA5{color:#F7F8FE;} .d2-1864249435 .color-AB4{color:#EDF0FD;} - .d2-1864249435 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + .d2-1864249435 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person - + \ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg index fa51d71b6..8d06fbfb8 100644 --- a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg @@ -89,7 +89,7 @@ .d2-1736778707 .color-AA4{color:#EDF0FD;} .d2-1736778707 .color-AA5{color:#F7F8FE;} .d2-1736778707 .color-AB4{color:#EDF0FD;} - .d2-1736778707 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + .d2-1736778707 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person - + \ No newline at end of file diff --git a/lib/shape/shape_c4_person.go b/lib/shape/shape_c4_person.go index e08dc2810..b2a571d2b 100644 --- a/lib/shape/shape_c4_person.go +++ b/lib/shape/shape_c4_person.go @@ -38,21 +38,21 @@ func (s shapeC4Person) GetInnerBox() *geo.Box { width := s.Box.Width height := s.Box.Height - headRadius := width * HEAD_RADIUS_FACTOR + headRadius := math.Round(width * HEAD_RADIUS_FACTOR) headCenterY := headRadius - bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR + bodyTop := math.Round(headCenterY + headRadius*BODY_TOP_FACTOR) // Horizontal padding = 5% of width - horizontalPadding := width * 0.05 + horizontalPadding := math.Round(width * 0.05) // Vertical padding = 3% of height - verticalPadding := height * 0.03 + verticalPadding := math.Round(height * 0.03) tl := s.Box.TopLeft.Copy() tl.X += horizontalPadding tl.Y += bodyTop + verticalPadding - innerWidth := width - (horizontalPadding * 2) - innerHeight := height - bodyTop - (verticalPadding * 2) + innerWidth := math.Round(width - (horizontalPadding * 2)) + innerHeight := math.Round(height - bodyTop - (verticalPadding * 2)) return geo.NewBox(tl, innerWidth, innerHeight) } @@ -63,15 +63,14 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - headRadius := width * HEAD_RADIUS_FACTOR + headRadius := math.Round(width * HEAD_RADIUS_FACTOR) headCenterY := headRadius - bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR + bodyTop := math.Round(headCenterY + headRadius*BODY_TOP_FACTOR) bodyWidth := width - bodyHeight := height - bodyTop + bodyHeight := math.Round(height - bodyTop) bodyLeft := 0 - // Use the same corner radius calculation as frontend - cornerRadius := math.Min(width*CORNER_RADIUS_FACTOR, bodyHeight*0.25) + cornerRadius := math.Round(math.Min(width*CORNER_RADIUS_FACTOR, bodyHeight*0.25)) pc.StartAt(pc.Absolute(float64(bodyLeft), bodyTop+cornerRadius)) @@ -92,8 +91,8 @@ func headPath(box *geo.Box) *svg.SvgPathContext { pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - headRadius := width * HEAD_RADIUS_FACTOR - headCenterX := width / 2 + headRadius := math.Round(width * HEAD_RADIUS_FACTOR) + headCenterX := math.Round(width / 2) headCenterY := headRadius pc.StartAt(pc.Absolute(headCenterX, headCenterY-headRadius)) @@ -126,8 +125,8 @@ func (s shapeC4Person) Perimeter() []geo.Intersectable { bodyPerimeter := bodyPath(s.Box).Path - headRadius := width * HEAD_RADIUS_FACTOR - headCenterX := s.Box.TopLeft.X + width/2 + headRadius := math.Round(width * HEAD_RADIUS_FACTOR) + headCenterX := s.Box.TopLeft.X + math.Round(width/2) headCenterY := s.Box.TopLeft.Y + headRadius headCenter := geo.NewPoint(headCenterX, headCenterY) @@ -148,19 +147,19 @@ func (s shapeC4Person) GetDimensionsToFit(width, height, paddingX, paddingY floa contentHeight := height + paddingY // Account for 10% total horizontal padding (5% on each side) - totalWidth := contentWidth / 0.9 - headRadius := totalWidth * HEAD_RADIUS_FACTOR + totalWidth := math.Round(contentWidth / 0.9) + headRadius := math.Round(totalWidth * HEAD_RADIUS_FACTOR) // Use positioning matching frontend headCenterY := headRadius - bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR + bodyTop := math.Round(headCenterY + headRadius*BODY_TOP_FACTOR) // Include vertical padding - verticalPadding := totalWidth * 0.06 // 3% top + 3% bottom - totalHeight := contentHeight + bodyTop + verticalPadding + verticalPadding := math.Round(totalWidth * 0.06) // 3% top + 3% bottom + totalHeight := math.Round(contentHeight + bodyTop + verticalPadding) // Calculate minimum height - minHeight := totalWidth * 0.95 + minHeight := math.Round(totalWidth * 0.95) if totalHeight < minHeight { totalHeight = minHeight } From e9aee89a1236550dd469e5f858ea7aab83e53684 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 20:11:35 -0600 Subject: [PATCH 6/9] Revert "round" This reverts commit c22a8e1ef2644cd45b92089501c9808bcc47a7ee. --- .../c4-person-label/dagre/board.exp.json | 16 +- .../c4-person-label/dagre/sketch.exp.svg | 576 ++++++++--------- .../txtar/c4-person-label/elk/board.exp.json | 10 +- .../txtar/c4-person-label/elk/sketch.exp.svg | 576 ++++++++--------- .../c4-person-shape/dagre/board.exp.json | 44 +- .../c4-person-shape/dagre/sketch.exp.svg | 574 ++++++++-------- .../txtar/c4-person-shape/elk/board.exp.json | 30 +- .../txtar/c4-person-shape/elk/sketch.exp.svg | 574 ++++++++-------- .../txtar/c4-theme/dagre/board.exp.json | 168 ++--- .../txtar/c4-theme/dagre/sketch.exp.svg | 612 +++++++++--------- .../txtar/c4-theme/elk/board.exp.json | 100 +-- .../txtar/c4-theme/elk/sketch.exp.svg | 612 +++++++++--------- .../small-c4-person/dagre/sketch.exp.svg | 4 +- .../txtar/small-c4-person/elk/sketch.exp.svg | 4 +- lib/shape/shape_c4_person.go | 41 +- 15 files changed, 1971 insertions(+), 1970 deletions(-) diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json index 46d5d7efb..def972f1f 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json @@ -581,12 +581,12 @@ "y": 697.2000122070312 }, { - "x": 1602.4000244140625, - "y": 1061.800048828125 + "x": 1602.199951171875, + "y": 1062.199951171875 }, { - "x": 1476, - "y": 1193 + "x": 1475, + "y": 1195 } ], "isCurve": true, @@ -621,12 +621,12 @@ "link": "", "route": [ { - "x": 1454, - "y": 1115 + "x": 1453, + "y": 1116 }, { - "x": 1482.5999755859375, - "y": 1046.199951171875 + "x": 1482.4000244140625, + "y": 1046.4000244140625 }, { "x": 1485.4000244140625, diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg index 50b84155b..25c78740e 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg @@ -1,13 +1,13 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank ccountskks.

-

Personal Banking Customerk

+

Personal Banking Customerk

[person]

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-
+
- - - - - - - + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json index 475186c2e..e46b21769 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json @@ -338,7 +338,7 @@ }, { "x": 1414, - "y": 700 + "y": 699 } ], "animated": false, @@ -377,7 +377,7 @@ }, { "x": 1237, - "y": 1233 + "y": 1232 } ], "animated": false, @@ -411,7 +411,7 @@ "link": "", "route": [ { - "x": 1465, + "x": 1466, "y": 1485 }, { @@ -451,7 +451,7 @@ "route": [ { "x": 1620, - "y": 1602 + "y": 1603 }, { "x": 1620, @@ -494,7 +494,7 @@ }, { "x": 1526, - "y": 1234 + "y": 1233 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg index c47068bb4..5a6e872f4 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg @@ -1,13 +1,13 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank ccountskks.

-

Personal Banking Customerk

+

Personal Banking Customerk

[person]

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-
+
- - - - - - - + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json index 6927d0036..bd1bb8ae3 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 0, - "y": 506 + "y": 507 }, "width": 336, - "height": 341, + "height": 342, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 101, - "y": 310 + "y": 311 }, "width": 134, "height": 89, @@ -145,7 +145,7 @@ "y": 273 }, "width": 210, - "height": 524, + "height": 525, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -183,11 +183,11 @@ "id": "styling.c4styled", "type": "c4-person", "pos": { - "x": 450, + "x": 449, "y": 303 }, - "width": 83, - "height": 103, + "width": 84, + "height": 104, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 416, - "y": 587 + "y": 588 }, "width": 150, "height": 180, @@ -292,19 +292,19 @@ "route": [ { "x": 168, - "y": 425 + "y": 426 }, { "x": 168, - "y": 449.79998779296875 + "y": 450.79998779296875 }, { "x": 168, - "y": 466 + "y": 467 }, { "x": 168, - "y": 506 + "y": 507 } ], "isCurve": true, @@ -339,20 +339,20 @@ "link": "", "route": [ { - "x": 261, + "x": 262, "y": 119 }, { - "x": 186.60000610351562, + "x": 186.8000030517578, "y": 177.8000030517578 }, { "x": 168, - "y": 264.3999938964844 + "y": 264.6000061035156 }, { "x": 168, - "y": 310 + "y": 311 } ], "isCurve": true, @@ -387,11 +387,11 @@ "link": "", "route": [ { - "x": 398, + "x": 397, "y": 119 }, { - "x": 472.3999938964844, + "x": 472.20001220703125, "y": 177.8000030517578 }, { @@ -436,19 +436,19 @@ "route": [ { "x": 491, - "y": 406 + "y": 407 }, { "x": 491, - "y": 446 + "y": 447 }, { "x": 491, - "y": 482.20001220703125 + "y": 483.20001220703125 }, { "x": 491, - "y": 587 + "y": 588 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg index 09f65b478..251910a6e 100644 --- a/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/dagre/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + - - + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json index 7e26d5c32..52e292df6 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-shape/elk/board.exp.json @@ -16,10 +16,10 @@ "type": "c4-person", "pos": { "x": 12, - "y": 937 + "y": 938 }, "width": 336, - "height": 341, + "height": 342, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -100,7 +100,7 @@ "type": "person", "pos": { "x": 113, - "y": 752 + "y": 753 }, "width": 134, "height": 89, @@ -145,7 +145,7 @@ "y": 229 }, "width": 250, - "height": 453, + "height": 454, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -183,11 +183,11 @@ "id": "styling.c4styled", "type": "c4-person", "pos": { - "x": 340, + "x": 339, "y": 279 }, - "width": 83, - "height": 103, + "width": 84, + "height": 104, "opacity": 1, "strokeDash": 0, "strokeWidth": 1, @@ -226,7 +226,7 @@ "type": "c4-person", "pos": { "x": 306, - "y": 452 + "y": 453 }, "width": 150, "height": 180, @@ -292,11 +292,11 @@ "route": [ { "x": 180, - "y": 867 + "y": 868 }, { "x": 180, - "y": 937 + "y": 938 } ], "animated": false, @@ -331,7 +331,7 @@ "route": [ { "x": 258, - "y": 144 + "y": 143 }, { "x": 257.5830078125, @@ -343,7 +343,7 @@ }, { "x": 180, - "y": 752 + "y": 753 } ], "animated": false, @@ -378,7 +378,7 @@ "route": [ { "x": 304, - "y": 144 + "y": 143 }, { "x": 303.9159851074219, @@ -425,11 +425,11 @@ "route": [ { "x": 381, - "y": 382 + "y": 383 }, { "x": 382, - "y": 452 + "y": 453 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg index f1cdfda47..6305b8c57 100644 --- a/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-shape/elk/sketch.exp.svg @@ -1,27 +1,27 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with
personal bank accounts

-
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes - - - - +
C4 Style PersonStandard Personstylingc4styledCustom Size Compare shapes + + + + - - + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json index bfeabddd5..4b80ded31 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/dagre/board.exp.json @@ -18,8 +18,8 @@ "x": 1089, "y": 0 }, - "width": 414, - "height": 393, + "width": 415, + "height": 394, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,7 +58,7 @@ "type": "rectangle", "pos": { "x": 147, - "y": 550 + "y": 551 }, "width": 2407, "height": 915, @@ -100,7 +100,7 @@ "type": "rectangle", "pos": { "x": 177, - "y": 580 + "y": 581 }, "width": 550, "height": 164, @@ -142,7 +142,7 @@ "type": "rectangle", "pos": { "x": 390, - "y": 865 + "y": 866 }, "width": 609, "height": 164, @@ -184,7 +184,7 @@ "type": "rectangle", "pos": { "x": 1123, - "y": 865 + "y": 866 }, "width": 707, "height": 164, @@ -226,7 +226,7 @@ "type": "rectangle", "pos": { "x": 1246, - "y": 1166 + "y": 1167 }, "width": 461, "height": 164, @@ -268,7 +268,7 @@ "type": "rectangle", "pos": { "x": 1890, - "y": 865 + "y": 866 }, "width": 634, "height": 164, @@ -310,7 +310,7 @@ "type": "rectangle", "pos": { "x": 2410, - "y": 1602 + "y": 1603 }, "width": 360, "height": 164, @@ -352,7 +352,7 @@ "type": "rectangle", "pos": { "x": 0, - "y": 1602 + "y": 1603 }, "width": 629, "height": 164, @@ -418,19 +418,19 @@ "route": [ { "x": 1089, - "y": 261 + "y": 262 }, { "x": 579.4000244140625, - "y": 421.3999938964844 + "y": 422.3999938964844 }, { "x": 452, - "y": 540 + "y": 541 }, { "x": 452, - "y": 580 + "y": 581 } ], "isCurve": true, @@ -466,19 +466,19 @@ "route": [ { "x": 452, - "y": 743.5 + "y": 744.5 }, { "x": 452, - "y": 792.2999877929688 + "y": 793.2999877929688 }, { "x": 472.3999938964844, - "y": 816.7000122070312 + "y": 817.7000122070312 }, { "x": 554, - "y": 865.5 + "y": 866.5 } ], "isCurve": true, @@ -514,43 +514,43 @@ "route": [ { "x": 1091, - "y": 348 + "y": 349 }, { "x": 967.7999877929688, - "y": 438.79998779296875 + "y": 439.79998779296875 }, { "x": 937, - "y": 475.20001220703125 + "y": 476.20001220703125 }, { "x": 937, - "y": 495.75 + "y": 496.75 }, { "x": 937, - "y": 516.2990112304688 + "y": 517.2990112304688 }, { "x": 937, - "y": 556.4000244140625 + "y": 557.4000244140625 }, { "x": 937, - "y": 596 + "y": 597 }, { "x": 937, - "y": 635.5999755859375 + "y": 636.5999755859375 }, { "x": 916.5999755859375, - "y": 816.7000122070312 + "y": 817.7000122070312 }, { "x": 835, - "y": 865.5 + "y": 866.5 } ], "isCurve": true, @@ -585,44 +585,44 @@ "link": "", "route": [ { - "x": 1429, - "y": 393 + "x": 1430, + "y": 394 }, { - "x": 1466.5999755859375, - "y": 447.79998779296875 + "x": 1466.800048828125, + "y": 448.79998779296875 }, { "x": 1476, - "y": 475.20001220703125 + "y": 476.20001220703125 }, { "x": 1476, - "y": 495.75 + "y": 496.75 }, { "x": 1476, - "y": 516.2990112304688 + "y": 517.2990112304688 }, { "x": 1476, - "y": 556.4000244140625 + "y": 557.4000244140625 }, { "x": 1476, - "y": 596 + "y": 597 }, { "x": 1476, - "y": 635.5999755859375 + "y": 636.5999755859375 }, { "x": 1476, - "y": 816.7000122070312 + "y": 817.7000122070312 }, { "x": 1476, - "y": 865.5 + "y": 866.5 } ], "isCurve": true, @@ -658,19 +658,19 @@ "route": [ { "x": 694.5, - "y": 1028.5 + "y": 1029.5 }, { "x": 694.5, - "y": 1083.699951171875 + "y": 1084.699951171875 }, { "x": 804.7000122070312, - "y": 1118.7220458984375 + "y": 1119.7220458984375 }, { "x": 1245.5, - "y": 1203.6099853515625 + "y": 1204.6099853515625 } ], "isCurve": true, @@ -706,19 +706,19 @@ "route": [ { "x": 1476, - "y": 1028.5 + "y": 1029.5 }, { "x": 1476, - "y": 1083.699951171875 + "y": 1084.699951171875 }, { "x": 1476, - "y": 1111.300048828125 + "y": 1112.300048828125 }, { "x": 1476, - "y": 1166.5 + "y": 1167.5 } ], "isCurve": true, @@ -754,19 +754,19 @@ "route": [ { "x": 1245.5, - "y": 1274.1949462890625 + "y": 1275.1949462890625 }, { "x": 500.6990051269531, - "y": 1426.8389892578125 + "y": 1427.8389892578125 }, { "x": 314.5, - "y": 1547.300048828125 + "y": 1548.300048828125 }, { "x": 314.5, - "y": 1602.5 + "y": 1603.5 } ], "isCurve": true, @@ -806,99 +806,99 @@ }, { "x": 2410.199951171875, - "y": 416.79998779296875 + "y": 417.6000061035156 }, { "x": 2637, - "y": 475.20001220703125 + "y": 476.20001220703125 }, { "x": 2637, - "y": 495.75 + "y": 496.75 }, { "x": 2637, - "y": 516.2990112304688 + "y": 517.2990112304688 }, { "x": 2637, - "y": 556.4000244140625 + "y": 557.4000244140625 }, { "x": 2637, - "y": 596 + "y": 597 }, { "x": 2637, - "y": 635.5999755859375 + "y": 636.5999755859375 }, { "x": 2637, - "y": 690.5 + "y": 691.5 }, { "x": 2637, - "y": 733.25 + "y": 734.25 }, { "x": 2637, - "y": 776 + "y": 777 }, { "x": 2637, - "y": 833 + "y": 834 }, { "x": 2637, - "y": 875.75 + "y": 876.75 }, { "x": 2637, - "y": 918.5 + "y": 919.5 }, { "x": 2637, - "y": 977.0999755859375 + "y": 978.0999755859375 }, { "x": 2637, - "y": 1022.25 + "y": 1023.25 }, { "x": 2637, - "y": 1067.4000244140625 + "y": 1068.4000244140625 }, { "x": 2637, - "y": 1127.5999755859375 + "y": 1128.5999755859375 }, { "x": 2637, - "y": 1172.75 + "y": 1173.75 }, { "x": 2637, - "y": 1217.9000244140625 + "y": 1218.9000244140625 }, { "x": 2637, - "y": 1291.4000244140625 + "y": 1292.4000244140625 }, { "x": 2637, - "y": 1356.5 + "y": 1357.5 }, { "x": 2637, - "y": 1421.5999755859375 + "y": 1422.5999755859375 }, { "x": 2632.800048828125, - "y": 1547.300048828125 + "y": 1548.300048828125 }, { "x": 2616, - "y": 1602.5 + "y": 1603.5 } ], "isCurve": true, @@ -934,19 +934,19 @@ "route": [ { "x": 1707.5, - "y": 1281.843994140625 + "y": 1282.843994140625 }, { "x": 2241.5, - "y": 1428.3680419921875 + "y": 1429.3680419921875 }, { "x": 2394.39990234375, - "y": 1547.300048828125 + "y": 1548.300048828125 }, { "x": 2472, - "y": 1602.5 + "y": 1603.5 } ], "isCurve": true, @@ -982,19 +982,19 @@ "route": [ { "x": 2206.5, - "y": 1028.5 + "y": 1029.5 }, { "x": 2206.5, - "y": 1083.699951171875 + "y": 1084.699951171875 }, { "x": 2106.5, - "y": 1118.0999755859375 + "y": 1119.0999755859375 }, { "x": 1706.5, - "y": 1200.5 + "y": 1201.5 } ], "isCurve": true, diff --git a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg index ba14d5df2..fb2279b45 100644 --- a/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/dagre/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

-

Internet Banking System

+

Internet Banking System

[Software System]

-

E-mail System

+

E-mail System

[Software System]

The internal Microsoft Exchange e-mail system.

-

Mainframe Banking System

+

Mainframe Banking System

[Software System]

Stores all of the core banking information about customers, accounts, transactions, etc.

-

Web Application

+

Web Application

[Container: Java and Spring MVC]

Delivers the static content and the Internet banking single page application.

-

Single-Page Application

+

Single-Page Application

[Container: JavaScript and Angular]

Provides all of the Internet banking functionality to customers via their web browser.

-

Mobile App

+

Mobile App

[Container: Xamarin]

Provides a limited subset of the Internet banking functionality to customers via their mobile device.

-

API Application

+

API Application

[Container: Java and Spring MVC]

Provides Internet banking functionality via a JSON/HTTPS API.

-

Database

+

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - - - - - - - - - - - - - - - - - - - - +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-theme/elk/board.exp.json b/e2etests/testdata/txtar/c4-theme/elk/board.exp.json index 4f90b629b..4d6d3ccd8 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-theme/elk/board.exp.json @@ -15,11 +15,11 @@ "id": "customer", "type": "c4-person", "pos": { - "x": 705, + "x": 704, "y": 12 }, - "width": 414, - "height": 393, + "width": 415, + "height": 394, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -58,7 +58,7 @@ "type": "rectangle", "pos": { "x": 12, - "y": 657 + "y": 658 }, "width": 2218, "height": 1035, @@ -100,7 +100,7 @@ "type": "rectangle", "pos": { "x": 62, - "y": 707 + "y": 708 }, "width": 550, "height": 164, @@ -142,7 +142,7 @@ "type": "rectangle", "pos": { "x": 190, - "y": 1042 + "y": 1043 }, "width": 609, "height": 164, @@ -184,7 +184,7 @@ "type": "rectangle", "pos": { "x": 819, - "y": 1042 + "y": 1043 }, "width": 707, "height": 164, @@ -226,7 +226,7 @@ "type": "rectangle", "pos": { "x": 942, - "y": 1393 + "y": 1394 }, "width": 461, "height": 164, @@ -268,7 +268,7 @@ "type": "rectangle", "pos": { "x": 1546, - "y": 1042 + "y": 1043 }, "width": 634, "height": 164, @@ -310,7 +310,7 @@ "type": "rectangle", "pos": { "x": 1746, - "y": 1894 + "y": 1895 }, "width": 360, "height": 164, @@ -352,7 +352,7 @@ "type": "rectangle", "pos": { "x": 781, - "y": 1894 + "y": 1895 }, "width": 629, "height": 164, @@ -418,19 +418,19 @@ "route": [ { "x": 788, - "y": 405 + "y": 406 }, { - "x": 788.0499877929688, - "y": 445 + "x": 787.75, + "y": 446 }, { "x": 359.25, - "y": 445 + "y": 446 }, { "x": 359.25, - "y": 707 + "y": 708 } ], "animated": false, @@ -465,11 +465,11 @@ "route": [ { "x": 393, - "y": 871 + "y": 872 }, { "x": 393, - "y": 1042 + "y": 1043 } ], "animated": false, @@ -504,19 +504,19 @@ "route": [ { "x": 871, - "y": 405 + "y": 406 }, { - "x": 870.8489990234375, - "y": 495 + "x": 870.75, + "y": 496 }, { "x": 652, - "y": 495 + "y": 496 }, { "x": 652, - "y": 1042 + "y": 1043 } ], "animated": false, @@ -551,11 +551,11 @@ "route": [ { "x": 954, - "y": 405 + "y": 406 }, { - "x": 953.6489868164062, - "y": 1042 + "x": 953.75, + "y": 1043 } ], "animated": false, @@ -590,19 +590,19 @@ "route": [ { "x": 494.5, - "y": 1206 + "y": 1207 }, { "x": 494.5, - "y": 1353 + "y": 1354 }, { "x": 1057.25, - "y": 1353 + "y": 1354 }, { "x": 1057.25, - "y": 1393 + "y": 1394 } ], "animated": false, @@ -637,11 +637,11 @@ "route": [ { "x": 1172.5, - "y": 1206 + "y": 1207 }, { "x": 1172.5, - "y": 1393 + "y": 1394 } ], "animated": false, @@ -676,11 +676,11 @@ "route": [ { "x": 1095.666015625, - "y": 1557 + "y": 1558 }, { "x": 1095.666015625, - "y": 1894 + "y": 1895 } ], "animated": false, @@ -714,28 +714,28 @@ "link": "", "route": [ { - "x": 1036, - "y": 405 + "x": 1037, + "y": 406 }, { - "x": 1036.448974609375, - "y": 445 + "x": 1036.75, + "y": 446 }, { "x": 2303.5, - "y": 445 + "y": 446 }, { "x": 2303.5, - "y": 1854 + "y": 1855 }, { "x": 1986.8330078125, - "y": 1854 + "y": 1855 }, { "x": 1986.8330078125, - "y": 1894 + "y": 1895 } ], "animated": false, @@ -770,19 +770,19 @@ "route": [ { "x": 1249.3330078125, - "y": 1557 + "y": 1558 }, { "x": 1249.3330078125, - "y": 1854 + "y": 1855 }, { "x": 1866.8330078125, - "y": 1854 + "y": 1855 }, { "x": 1866.8330078125, - "y": 1894 + "y": 1895 } ], "animated": false, @@ -817,19 +817,19 @@ "route": [ { "x": 1863, - "y": 1206 + "y": 1207 }, { "x": 1863, - "y": 1353 + "y": 1354 }, { "x": 1287.75, - "y": 1353 + "y": 1354 }, { "x": 1287.75, - "y": 1393 + "y": 1394 } ], "animated": false, diff --git a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg index 19d96dd6b..46f088711 100644 --- a/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-theme/elk/sketch.exp.svg @@ -1,20 +1,20 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts.

-

Internet Banking System

+

Internet Banking System

[Software System]

-

E-mail System

+

E-mail System

[Software System]

The internal Microsoft Exchange e-mail system.

-

Mainframe Banking System

+

Mainframe Banking System

[Software System]

Stores all of the core banking information about customers, accounts, transactions, etc.

-

Web Application

+

Web Application

[Container: Java and Spring MVC]

Delivers the static content and the Internet banking single page application.

-

Single-Page Application

+

Single-Page Application

[Container: JavaScript and Angular]

Provides all of the Internet banking functionality to customers via their web browser.

-

Mobile App

+

Mobile App

[Container: Xamarin]

Provides a limited subset of the Internet banking functionality to customers via their mobile device.

-

API Application

+

API Application

[Container: Java and Spring MVC]

Provides Internet banking functionality via a JSON/HTTPS API.

-

Database

+

Database

[Container: Oracle Database Schema]

Stores user registration information, hashed authentication credentials, access logs, etc.

-
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] - - - - - - - - - - - - - - - - - - - - +
Visits bigbank.com/ib using[HTTPS]Delivers to the customer's web browserViews account balances, and makes payments usingViews account balances, and makes payments usingMakes API calls to[JSON/HTTPS]Makes API calls to[JSON/HTTPS]Makes API calls to[XML/HTTPS]Sends e-mails toSends e-mail using Reads from and writes to[SQL/TCP] + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg index eab5e1bdf..a743498d0 100644 --- a/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/dagre/sketch.exp.svg @@ -89,7 +89,7 @@ .d2-1864249435 .color-AA4{color:#EDF0FD;} .d2-1864249435 .color-AA5{color:#F7F8FE;} .d2-1864249435 .color-AB4{color:#EDF0FD;} - .d2-1864249435 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + .d2-1864249435 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1864249435);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1864249435);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1864249435);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1864249435);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person - + \ No newline at end of file diff --git a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg index 8d06fbfb8..fa51d71b6 100644 --- a/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/small-c4-person/elk/sketch.exp.svg @@ -89,7 +89,7 @@ .d2-1736778707 .color-AA4{color:#EDF0FD;} .d2-1736778707 .color-AA5{color:#F7F8FE;} .d2-1736778707 .color-AB4{color:#EDF0FD;} - .d2-1736778707 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person + .d2-1736778707 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker-d2-1736778707);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark-d2-1736778707);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal-d2-1736778707);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright-d2-1736778707);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>c4-person - + \ No newline at end of file diff --git a/lib/shape/shape_c4_person.go b/lib/shape/shape_c4_person.go index b2a571d2b..e08dc2810 100644 --- a/lib/shape/shape_c4_person.go +++ b/lib/shape/shape_c4_person.go @@ -38,21 +38,21 @@ func (s shapeC4Person) GetInnerBox() *geo.Box { width := s.Box.Width height := s.Box.Height - headRadius := math.Round(width * HEAD_RADIUS_FACTOR) + headRadius := width * HEAD_RADIUS_FACTOR headCenterY := headRadius - bodyTop := math.Round(headCenterY + headRadius*BODY_TOP_FACTOR) + bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR // Horizontal padding = 5% of width - horizontalPadding := math.Round(width * 0.05) + horizontalPadding := width * 0.05 // Vertical padding = 3% of height - verticalPadding := math.Round(height * 0.03) + verticalPadding := height * 0.03 tl := s.Box.TopLeft.Copy() tl.X += horizontalPadding tl.Y += bodyTop + verticalPadding - innerWidth := math.Round(width - (horizontalPadding * 2)) - innerHeight := math.Round(height - bodyTop - (verticalPadding * 2)) + innerWidth := width - (horizontalPadding * 2) + innerHeight := height - bodyTop - (verticalPadding * 2) return geo.NewBox(tl, innerWidth, innerHeight) } @@ -63,14 +63,15 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - headRadius := math.Round(width * HEAD_RADIUS_FACTOR) + headRadius := width * HEAD_RADIUS_FACTOR headCenterY := headRadius - bodyTop := math.Round(headCenterY + headRadius*BODY_TOP_FACTOR) + bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR bodyWidth := width - bodyHeight := math.Round(height - bodyTop) + bodyHeight := height - bodyTop bodyLeft := 0 - cornerRadius := math.Round(math.Min(width*CORNER_RADIUS_FACTOR, bodyHeight*0.25)) + // Use the same corner radius calculation as frontend + cornerRadius := math.Min(width*CORNER_RADIUS_FACTOR, bodyHeight*0.25) pc.StartAt(pc.Absolute(float64(bodyLeft), bodyTop+cornerRadius)) @@ -91,8 +92,8 @@ func headPath(box *geo.Box) *svg.SvgPathContext { pc := svg.NewSVGPathContext(box.TopLeft, 1, 1) - headRadius := math.Round(width * HEAD_RADIUS_FACTOR) - headCenterX := math.Round(width / 2) + headRadius := width * HEAD_RADIUS_FACTOR + headCenterX := width / 2 headCenterY := headRadius pc.StartAt(pc.Absolute(headCenterX, headCenterY-headRadius)) @@ -125,8 +126,8 @@ func (s shapeC4Person) Perimeter() []geo.Intersectable { bodyPerimeter := bodyPath(s.Box).Path - headRadius := math.Round(width * HEAD_RADIUS_FACTOR) - headCenterX := s.Box.TopLeft.X + math.Round(width/2) + headRadius := width * HEAD_RADIUS_FACTOR + headCenterX := s.Box.TopLeft.X + width/2 headCenterY := s.Box.TopLeft.Y + headRadius headCenter := geo.NewPoint(headCenterX, headCenterY) @@ -147,19 +148,19 @@ func (s shapeC4Person) GetDimensionsToFit(width, height, paddingX, paddingY floa contentHeight := height + paddingY // Account for 10% total horizontal padding (5% on each side) - totalWidth := math.Round(contentWidth / 0.9) - headRadius := math.Round(totalWidth * HEAD_RADIUS_FACTOR) + totalWidth := contentWidth / 0.9 + headRadius := totalWidth * HEAD_RADIUS_FACTOR // Use positioning matching frontend headCenterY := headRadius - bodyTop := math.Round(headCenterY + headRadius*BODY_TOP_FACTOR) + bodyTop := headCenterY + headRadius*BODY_TOP_FACTOR // Include vertical padding - verticalPadding := math.Round(totalWidth * 0.06) // 3% top + 3% bottom - totalHeight := math.Round(contentHeight + bodyTop + verticalPadding) + verticalPadding := totalWidth * 0.06 // 3% top + 3% bottom + totalHeight := contentHeight + bodyTop + verticalPadding // Calculate minimum height - minHeight := math.Round(totalWidth * 0.95) + minHeight := totalWidth * 0.95 if totalHeight < minHeight { totalHeight = minHeight } From 048344218253a97afb5496c9ce16e1e4610be9c0 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 20:14:40 -0600 Subject: [PATCH 7/9] calc --- lib/shape/shape_c4_person.go | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/shape/shape_c4_person.go b/lib/shape/shape_c4_person.go index e08dc2810..9424347a1 100644 --- a/lib/shape/shape_c4_person.go +++ b/lib/shape/shape_c4_person.go @@ -8,9 +8,6 @@ import ( "oss.terrastruct.com/util-go/go2" ) -// Optimal value for circular arc approximation with cubic bezier curves -const kCircleApprox = 0.5522847498307936 // 4*(math.Sqrt(2)-1)/3 - // Constants to match frontend implementation const ( C4_PERSON_AR_LIMIT = 1.5 @@ -75,13 +72,13 @@ func bodyPath(box *geo.Box) *svg.SvgPathContext { pc.StartAt(pc.Absolute(float64(bodyLeft), bodyTop+cornerRadius)) - pc.C(true, 0, -kCircleApprox*cornerRadius, kCircleApprox*cornerRadius, -cornerRadius, cornerRadius, -cornerRadius) + pc.C(true, 0, -4*(math.Sqrt(2)-1)/3*cornerRadius, 4*(math.Sqrt(2)-1)/3*cornerRadius, -cornerRadius, cornerRadius, -cornerRadius) pc.H(true, bodyWidth-2*cornerRadius) - pc.C(true, kCircleApprox*cornerRadius, 0, cornerRadius, kCircleApprox*cornerRadius, cornerRadius, cornerRadius) + pc.C(true, 4*(math.Sqrt(2)-1)/3*cornerRadius, 0, cornerRadius, 4*(math.Sqrt(2)-1)/3*cornerRadius, cornerRadius, cornerRadius) pc.V(true, bodyHeight-2*cornerRadius) - pc.C(true, 0, kCircleApprox*cornerRadius, -kCircleApprox*cornerRadius, cornerRadius, -cornerRadius, cornerRadius) + pc.C(true, 0, 4*(math.Sqrt(2)-1)/3*cornerRadius, -4*(math.Sqrt(2)-1)/3*cornerRadius, cornerRadius, -cornerRadius, cornerRadius) pc.H(true, -(bodyWidth - 2*cornerRadius)) - pc.C(true, -kCircleApprox*cornerRadius, 0, -cornerRadius, -kCircleApprox*cornerRadius, -cornerRadius, -cornerRadius) + pc.C(true, -4*(math.Sqrt(2)-1)/3*cornerRadius, 0, -cornerRadius, -4*(math.Sqrt(2)-1)/3*cornerRadius, -cornerRadius, -cornerRadius) pc.Z() return pc @@ -99,23 +96,23 @@ func headPath(box *geo.Box) *svg.SvgPathContext { pc.StartAt(pc.Absolute(headCenterX, headCenterY-headRadius)) pc.C(false, - headCenterX+headRadius*kCircleApprox, headCenterY-headRadius, - headCenterX+headRadius, headCenterY-headRadius*kCircleApprox, + headCenterX+headRadius*4*(math.Sqrt(2)-1)/3, headCenterY-headRadius, + headCenterX+headRadius, headCenterY-headRadius*4*(math.Sqrt(2)-1)/3, headCenterX+headRadius, headCenterY) pc.C(false, - headCenterX+headRadius, headCenterY+headRadius*kCircleApprox, - headCenterX+headRadius*kCircleApprox, headCenterY+headRadius, + headCenterX+headRadius, headCenterY+headRadius*4*(math.Sqrt(2)-1)/3, + headCenterX+headRadius*4*(math.Sqrt(2)-1)/3, headCenterY+headRadius, headCenterX, headCenterY+headRadius) pc.C(false, - headCenterX-headRadius*kCircleApprox, headCenterY+headRadius, - headCenterX-headRadius, headCenterY+headRadius*kCircleApprox, + headCenterX-headRadius*4*(math.Sqrt(2)-1)/3, headCenterY+headRadius, + headCenterX-headRadius, headCenterY+headRadius*4*(math.Sqrt(2)-1)/3, headCenterX-headRadius, headCenterY) pc.C(false, - headCenterX-headRadius, headCenterY-headRadius*kCircleApprox, - headCenterX-headRadius*kCircleApprox, headCenterY-headRadius, + headCenterX-headRadius, headCenterY-headRadius*4*(math.Sqrt(2)-1)/3, + headCenterX-headRadius*4*(math.Sqrt(2)-1)/3, headCenterY-headRadius, headCenterX, headCenterY-headRadius) return pc From 7312799fb650f4dce785f76623e663db751649da Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 20:20:16 -0600 Subject: [PATCH 8/9] remove tests --- e2etests/txtar.txt | 103 --------------------------------------------- 1 file changed, 103 deletions(-) diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index 62d82d7ef..ac940b683 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -1027,106 +1027,6 @@ c4person -> styling.c4styled -> styling.c4sized style.stroke-width: 1 } --- c4-theme -- - -vars: { - d2-config: { - theme-id: 303 - } -} - -customer: |md - ## Personal Banking Customer - [person] - - A customer of the bank, with personal bank accounts. -| { - shape: c4-person -} - -internet_banking_system: |md - ## Internet Banking System - [Software System] -| { - shape: rectangle - label.near: bottom-left -} - -internet_banking_system.web_app: |md - ## Web Application - [Container: Java and Spring MVC] - - Delivers the static content and the Internet banking single page application. -| { - shape: rectangle -} - -internet_banking_system.spa: |md - ## Single-Page Application - [Container: JavaScript and Angular] - - Provides all of the Internet banking functionality to customers via their web browser. -| { - shape: rectangle -} - -internet_banking_system.mobile_app: |md - ## Mobile App - [Container: Xamarin] - - Provides a limited subset of the Internet banking functionality to customers via their mobile device. -| { - shape: rectangle -} - -internet_banking_system.api_app: |md - ## API Application - [Container: Java and Spring MVC] - - Provides Internet banking functionality via a JSON/HTTPS API. -| { - shape: rectangle -} - -internet_banking_system.database: |md - ## Database - [Container: Oracle Database Schema] - - Stores user registration information, hashed authentication credentials, access logs, etc. -| { - shape: rectangle -} - -email_system: |md - ## E-mail System - [Software System] - - The internal Microsoft Exchange e-mail system. -| { - shape: rectangle -} - -mainframe: |md - ## Mainframe Banking System - [Software System] - - Stores all of the core banking information about customers, accounts, transactions, etc. -| { - shape: rectangle -} - -# Connections -customer -> internet_banking_system.web_app: "Visits bigbank.com/ib using\n[HTTPS]" -internet_banking_system.web_app -> internet_banking_system.spa: "Delivers to the customer's web browser" -customer -> internet_banking_system.spa: "Views account balances, and makes payments using" -customer -> internet_banking_system.mobile_app: "Views account balances, and makes payments using" -internet_banking_system.spa -> internet_banking_system.api_app: "Makes API calls to\n[JSON/HTTPS]" -internet_banking_system.mobile_app -> internet_banking_system.api_app: "Makes API calls to\n[JSON/HTTPS]" -internet_banking_system.api_app -> mainframe: "Makes API calls to\n[XML/HTTPS]" -customer -> email_system: "Sends e-mails to" -internet_banking_system.api_app -> email_system: "Sends e-mail using" -internet_banking_system.database <-> internet_banking_system.api_app: "Reads from and writes to\n[SQL/TCP]" - -- legend -- vars: { d2-legend: { @@ -1261,6 +1161,3 @@ customer4: |md | { shape: c4-person } - -customer1 -> customer2 -> customer3 -> customer4 -customer4 -> customer1 -> customer3 -> customer2 From dff430e006c409c8997241bdbde3fee742c1b580 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Thu, 13 Mar 2025 20:21:25 -0600 Subject: [PATCH 9/9] ta --- .../c4-person-label/dagre/board.exp.json | 359 +---------- .../c4-person-label/dagre/sketch.exp.svg | 578 +++++++++--------- .../txtar/c4-person-label/elk/board.exp.json | 263 +------- .../txtar/c4-person-label/elk/sketch.exp.svg | 578 +++++++++--------- 4 files changed, 603 insertions(+), 1175 deletions(-) diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json index def972f1f..2c7e30d13 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/dagre/board.exp.json @@ -16,7 +16,7 @@ "type": "c4-person", "pos": { "x": 0, - "y": 18 + "y": 32 }, "width": 410, "height": 390, @@ -58,7 +58,7 @@ "type": "c4-person", "pos": { "x": 470, - "y": 18 + "y": 32 }, "width": 410, "height": 390, @@ -100,7 +100,7 @@ "type": "c4-person", "pos": { "x": 940, - "y": 18 + "y": 32 }, "width": 410, "height": 390, @@ -142,7 +142,7 @@ "type": "c4-person", "pos": { "x": 1410, - "y": 0 + "y": 14 }, "width": 448, "height": 426, @@ -183,8 +183,8 @@ "id": "customer2", "type": "c4-person", "pos": { - "x": 1137, - "y": 526 + "x": 1918, + "y": 0 }, "width": 457, "height": 453, @@ -225,8 +225,8 @@ "id": "customer3", "type": "c4-person", "pos": { - "x": 1147, - "y": 1079 + "x": 2435, + "y": 10 }, "width": 457, "height": 434, @@ -267,8 +267,8 @@ "id": "customer4", "type": "c4-person", "pos": { - "x": 1426, - "y": 1613 + "x": 2952, + "y": 10 }, "width": 457, "height": 434, @@ -306,344 +306,7 @@ "level": 1 } ], - "connections": [ - { - "id": "(customer1 -> customer2)[0]", - "src": "customer1", - "srcArrow": "none", - "dst": "customer2", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1433, - "y": 410 - }, - { - "x": 1379, - "y": 462.79998779296875 - }, - { - "x": 1365.5999755859375, - "y": 486 - }, - { - "x": 1366, - "y": 526 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer2 -> customer3)[0]", - "src": "customer2", - "srcArrow": "none", - "dst": "customer3", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1358, - "y": 979 - }, - { - "x": 1356, - "y": 1019 - }, - { - "x": 1356.4000244140625, - "y": 1039.199951171875 - }, - { - "x": 1360, - "y": 1080 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer3 -> customer4)[0]", - "src": "customer3", - "srcArrow": "none", - "dst": "customer4", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1375, - "y": 1513 - }, - { - "x": 1375.4000244140625, - "y": 1553 - }, - { - "x": 1411.800048828125, - "y": 1597.800048828125 - }, - { - "x": 1557, - "y": 1737 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer4 -> customer1)[0]", - "src": "customer4", - "srcArrow": "none", - "dst": "customer1", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1654, - "y": 1613 - }, - { - "x": 1654, - "y": 1573 - }, - { - "x": 1654, - "y": 1509.5999755859375 - }, - { - "x": 1654, - "y": 1429.5 - }, - { - "x": 1654, - "y": 1349.4000244140625 - }, - { - "x": 1654, - "y": 1242.5999755859375 - }, - { - "x": 1654, - "y": 1162.5 - }, - { - "x": 1654, - "y": 1082.4000244140625 - }, - { - "x": 1654, - "y": 973.7000122070312 - }, - { - "x": 1654, - "y": 890.75 - }, - { - "x": 1654, - "y": 807.7999877929688 - }, - { - "x": 1653.199951171875, - "y": 466 - }, - { - "x": 1650, - "y": 426 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer1 -> customer3)[0]", - "src": "customer1", - "srcArrow": "none", - "dst": "customer3", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1634, - "y": 426 - }, - { - "x": 1634, - "y": 466 - }, - { - "x": 1634, - "y": 531.2999877929688 - }, - { - "x": 1634, - "y": 614.25 - }, - { - "x": 1634, - "y": 697.2000122070312 - }, - { - "x": 1602.199951171875, - "y": 1062.199951171875 - }, - { - "x": 1475, - "y": 1195 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer3 -> customer2)[0]", - "src": "customer3", - "srcArrow": "none", - "dst": "customer2", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1453, - "y": 1116 - }, - { - "x": 1482.4000244140625, - "y": 1046.4000244140625 - }, - { - "x": 1485.4000244140625, - "y": 1019 - }, - { - "x": 1468, - "y": 979 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - } - ], + "connections": [], "root": { "id": "", "type": "", diff --git a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg index 25c78740e..24701726f 100644 --- a/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/dagre/sketch.exp.svg @@ -1,13 +1,13 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank ccountskks.

-

Personal Banking Customerk

+

Personal Banking Customerk

[person]

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-
- - - - - - - - +
+ + + + + + + +
\ No newline at end of file diff --git a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json index e46b21769..ecf5fb0fd 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json +++ b/e2etests/testdata/txtar/c4-person-label/elk/board.exp.json @@ -16,7 +16,7 @@ "type": "c4-person", "pos": { "x": 12, - "y": 30 + "y": 43 }, "width": 410, "height": 390, @@ -57,8 +57,8 @@ "id": "c4mdperson2", "type": "c4-person", "pos": { - "x": 441, - "y": 30 + "x": 442, + "y": 43 }, "width": 410, "height": 390, @@ -99,8 +99,8 @@ "id": "c4mdperson3", "type": "c4-person", "pos": { - "x": 871, - "y": 30 + "x": 872, + "y": 43 }, "width": 410, "height": 390, @@ -141,8 +141,8 @@ "id": "customer1", "type": "c4-person", "pos": { - "x": 1301, - "y": 12 + "x": 1302, + "y": 25 }, "width": 448, "height": 426, @@ -183,8 +183,8 @@ "id": "customer2", "type": "c4-person", "pos": { - "x": 1028, - "y": 518 + "x": 1770, + "y": 12 }, "width": 457, "height": 453, @@ -225,8 +225,8 @@ "id": "customer3", "type": "c4-person", "pos": { - "x": 1123, - "y": 1051 + "x": 2247, + "y": 21 }, "width": 457, "height": 434, @@ -267,8 +267,8 @@ "id": "customer4", "type": "c4-person", "pos": { - "x": 1313, - "y": 1565 + "x": 2724, + "y": 21 }, "width": 457, "height": 434, @@ -306,242 +306,7 @@ "level": 1 } ], - "connections": [ - { - "id": "(customer1 -> customer2)[0]", - "src": "customer1", - "srcArrow": "none", - "dst": "customer2", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1414, - "y": 438 - }, - { - "x": 1414, - "y": 699 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer2 -> customer3)[0]", - "src": "customer2", - "srcArrow": "none", - "dst": "customer3", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1237, - "y": 971 - }, - { - "x": 1237, - "y": 1232 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer3 -> customer4)[0]", - "src": "customer3", - "srcArrow": "none", - "dst": "customer4", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1466, - "y": 1485 - }, - { - "x": 1466, - "y": 1600 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer4 -> customer1)[0]", - "src": "customer4", - "srcArrow": "none", - "dst": "customer1", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1620, - "y": 1603 - }, - { - "x": 1620, - "y": 438 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer1 -> customer3)[0]", - "src": "customer1", - "srcArrow": "none", - "dst": "customer3", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1526, - "y": 438 - }, - { - "x": 1526, - "y": 1233 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, - { - "id": "(customer3 -> customer2)[0]", - "src": "customer3", - "srcArrow": "none", - "dst": "customer2", - "dstArrow": "triangle", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "B1", - "borderRadius": 10, - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "N2", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "link": "", - "route": [ - { - "x": 1334, - "y": 1053 - }, - { - "x": 1334, - "y": 971 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - } - ], + "connections": [], "root": { "id": "", "type": "", diff --git a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg index 5a6e872f4..01c202e6c 100644 --- a/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/c4-person-label/elk/sketch.exp.svg @@ -1,13 +1,13 @@ -

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with personal bank accounts

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank ccountskks.

-

Personal Banking Customerk

+

Personal Banking Customerk

[person]

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-

Personal Banking Customer

+

Personal Banking Customer

[person]

A customer of the bank, with pekkrsonal bank accountskks.

-
- - - - - - - - +
+ + + + + + + +
\ No newline at end of file