diff --git a/e2etests/testdata/todo/container_label_edge_adjustment/dagre/board.exp.json b/e2etests/testdata/todo/container_label_edge_adjustment/dagre/board.exp.json index b02dc9feb..8b2d7cfb0 100644 --- a/e2etests/testdata/todo/container_label_edge_adjustment/dagre/board.exp.json +++ b/e2etests/testdata/todo/container_label_edge_adjustment/dagre/board.exp.json @@ -6,7 +6,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 40, + "x": 14, "y": 0 }, "width": 53, @@ -45,18 +45,18 @@ }, { "id": "b", - "type": "rectangle", + "type": "cloud", "pos": { "x": 0, "y": 207 }, - "width": 133, + "width": 397, "height": 125, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "B4", + "fill": "N7", "stroke": "B1", "shadow": false, "3d": false, @@ -70,7 +70,7 @@ "fields": null, "methods": null, "columns": null, - "label": "b", + "label": "a container label", "fontSize": 28, "fontFamily": "DEFAULT", "language": "", @@ -78,7 +78,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 13, + "labelWidth": 195, "labelHeight": 36, "labelPosition": "OUTSIDE_TOP_CENTER", "zIndex": 0, @@ -88,7 +88,7 @@ "id": "b.c", "type": "rectangle", "pos": { - "x": 40, + "x": 183, "y": 236 }, "width": 53, @@ -129,7 +129,7 @@ "id": "d", "type": "rectangle", "pos": { - "x": 40, + "x": 182, "y": 432 }, "width": 54, @@ -165,6 +165,129 @@ "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "e", + "type": "rectangle", + "pos": { + "x": 127, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "f", + "type": "rectangle", + "pos": { + "x": 240, + "y": 0 + }, + "width": 51, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 6, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "g", + "type": "rectangle", + "pos": { + "x": 351, + "y": 0 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [ @@ -174,11 +297,11 @@ "srcArrow": "none", "srcLabel": "", "dst": "b.c", - "dstArrow": "triangle", + "dstArrow": "filled-diamond", "dstLabel": "", "opacity": 1, "strokeDash": 0, - "strokeWidth": 2, + "strokeWidth": 8, "stroke": "B1", "label": "", "fontSize": 16, @@ -194,20 +317,20 @@ "labelPercentage": 0, "route": [ { - "x": 66.5, + "x": 40, "y": 66 }, { - "x": 66.5, + "x": 40, "y": 106 }, { - "x": 66.5, - "y": 180.1 + "x": 68.5, + "y": 184.09704142011833 }, { - "x": 66.5, - "y": 236.5 + "x": 182.5, + "y": 256.4852071005917 } ], "isCurve": true, @@ -222,11 +345,11 @@ "srcArrow": "none", "srcLabel": "", "dst": "d", - "dstArrow": "triangle", + "dstArrow": "filled-diamond", "dstLabel": "", "opacity": 1, "strokeDash": 0, - "strokeWidth": 2, + "strokeWidth": 8, "stroke": "B1", "label": "", "fontSize": 16, @@ -242,19 +365,19 @@ "labelPercentage": 0, "route": [ { - "x": 66.5, + "x": 209, "y": 302.5 }, { - "x": 66.5, + "x": 209, "y": 326.1 }, { - "x": 66.5, + "x": 209, "y": 392 }, { - "x": 66.5, + "x": 209, "y": 432 } ], @@ -263,6 +386,150 @@ "tooltip": "", "icon": null, "zIndex": 0 + }, + { + "id": "(e -> b.c)[0]", + "src": "e", + "srcArrow": "none", + "srcLabel": "", + "dst": "b.c", + "dstArrow": "filled-diamond", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 8, + "stroke": "B1", + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 153, + "y": 66 + }, + { + "x": 153, + "y": 106 + }, + { + "x": 159.8, + "y": 180.1 + }, + { + "x": 187, + "y": 236.5 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(f -> b)[0]", + "src": "f", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "filled-diamond", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 8, + "stroke": "red", + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 265, + "y": 66 + }, + { + "x": 265, + "y": 106 + }, + { + "x": 265, + "y": 135.2 + }, + { + "x": 265, + "y": 212 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(g -> b)[0]", + "src": "g", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "filled-diamond", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 8, + "stroke": "B1", + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 377.5, + "y": 66 + }, + { + "x": 377.5, + "y": 106 + }, + { + "x": 377.6, + "y": 145.2 + }, + { + "x": 378, + "y": 262 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 } ] } diff --git a/e2etests/testdata/todo/container_label_edge_adjustment/dagre/sketch.exp.svg b/e2etests/testdata/todo/container_label_edge_adjustment/dagre/sketch.exp.svg index 9bffbf424..dea3419a2 100644 --- a/e2etests/testdata/todo/container_label_edge_adjustment/dagre/sketch.exp.svg +++ b/e2etests/testdata/todo/container_label_edge_adjustment/dagre/sketch.exp.svg @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/e2etests/testdata/todo/container_label_edge_adjustment/elk/board.exp.json b/e2etests/testdata/todo/container_label_edge_adjustment/elk/board.exp.json index 862d7a6fc..c124141e8 100644 --- a/e2etests/testdata/todo/container_label_edge_adjustment/elk/board.exp.json +++ b/e2etests/testdata/todo/container_label_edge_adjustment/elk/board.exp.json @@ -6,7 +6,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 62, + "x": 12, "y": 12 }, "width": 53, @@ -45,18 +45,18 @@ }, { "id": "b", - "type": "rectangle", + "type": "cloud", "pos": { - "x": 12, - "y": 153 + "x": 26, + "y": 213 }, - "width": 153, + "width": 155, "height": 166, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "B4", + "fill": "N7", "stroke": "B1", "shadow": false, "3d": false, @@ -70,7 +70,7 @@ "fields": null, "methods": null, "columns": null, - "label": "b", + "label": "a container label", "fontSize": 28, "fontFamily": "DEFAULT", "language": "", @@ -78,7 +78,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 13, + "labelWidth": 195, "labelHeight": 36, "labelPosition": "INSIDE_TOP_CENTER", "zIndex": 0, @@ -88,8 +88,8 @@ "id": "b.c", "type": "rectangle", "pos": { - "x": 62, - "y": 203 + "x": 76, + "y": 263 }, "width": 53, "height": 66, @@ -129,8 +129,8 @@ "id": "d", "type": "rectangle", "pos": { - "x": 61, - "y": 394 + "x": 75, + "y": 454 }, "width": 54, "height": 66, @@ -165,6 +165,129 @@ "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, "level": 1 + }, + { + "id": "e", + "type": "rectangle", + "pos": { + "x": 85, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "e", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "f", + "type": "rectangle", + "pos": { + "x": 158, + "y": 12 + }, + "width": 51, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "f", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 6, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "g", + "type": "rectangle", + "pos": { + "x": 229, + "y": 12 + }, + "width": 54, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "g", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 } ], "connections": [ @@ -174,11 +297,11 @@ "srcArrow": "none", "srcLabel": "", "dst": "b.c", - "dstArrow": "triangle", + "dstArrow": "filled-diamond", "dstLabel": "", "opacity": 1, "strokeDash": 0, - "strokeWidth": 2, + "strokeWidth": 8, "stroke": "B1", "label": "", "fontSize": 16, @@ -194,12 +317,20 @@ "labelPercentage": 0, "route": [ { - "x": 88.5, + "x": 38.5, "y": 78 }, { - "x": 88.5, - "y": 203 + "x": 38.5, + "y": 118 + }, + { + "x": 93.83333333333333, + "y": 118 + }, + { + "x": 93.83333333333333, + "y": 263 } ], "animated": false, @@ -213,11 +344,11 @@ "srcArrow": "none", "srcLabel": "", "dst": "d", - "dstArrow": "triangle", + "dstArrow": "filled-diamond", "dstLabel": "", "opacity": 1, "strokeDash": 0, - "strokeWidth": 2, + "strokeWidth": 8, "stroke": "B1", "label": "", "fontSize": 16, @@ -233,12 +364,145 @@ "labelPercentage": 0, "route": [ { - "x": 88.5, - "y": 269 + "x": 102.66666666666666, + "y": 329 }, { - "x": 88.5, - "y": 394 + "x": 102.66666666666666, + "y": 454 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(e -> b.c)[0]", + "src": "e", + "srcArrow": "none", + "srcLabel": "", + "dst": "b.c", + "dstArrow": "filled-diamond", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 8, + "stroke": "B1", + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 111.5, + "y": 78 + }, + { + "x": 111.5, + "y": 263 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(f -> b)[0]", + "src": "f", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "filled-diamond", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 8, + "stroke": "red", + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 183.5, + "y": 78 + }, + { + "x": 183.5, + "y": 118 + }, + { + "x": 121.5, + "y": 118 + }, + { + "x": 122, + "y": 213 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(g -> b)[0]", + "src": "g", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "filled-diamond", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 8, + "stroke": "B1", + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 256, + "y": 78 + }, + { + "x": 256, + "y": 168 + }, + { + "x": 131.5, + "y": 168 + }, + { + "x": 131, + "y": 218 } ], "animated": false, diff --git a/e2etests/testdata/todo/container_label_edge_adjustment/elk/sketch.exp.svg b/e2etests/testdata/todo/container_label_edge_adjustment/elk/sketch.exp.svg index 70a9551c7..934011400 100644 --- a/e2etests/testdata/todo/container_label_edge_adjustment/elk/sketch.exp.svg +++ b/e2etests/testdata/todo/container_label_edge_adjustment/elk/sketch.exp.svg @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/e2etests/todo_test.go b/e2etests/todo_test.go index 6bcb70b34..70cf11785 100644 --- a/e2etests/todo_test.go +++ b/e2etests/todo_test.go @@ -225,7 +225,19 @@ Office chatter: { { name: "container_label_edge_adjustment", script: ` -a -> b.c -> d +a -> b.c -> d: {style.stroke-width: 8; target-arrowhead.shape: diamond; target-arrowhead.style.filled: true} +b.shape: cloud +e -> b.c: {style.stroke-width: 8; target-arrowhead.shape: diamond; target-arrowhead.style.filled: true} +f -> b: { + style: { + stroke: red + stroke-width: 8 + } + target-arrowhead.shape: diamond + target-arrowhead.style.filled: true +} +g -> b: {style.stroke-width: 8; target-arrowhead.shape: diamond; target-arrowhead.style.filled: true} +b: a container label `, }, }