diff --git a/d2layouts/d2sequence/layout_test.go b/d2layouts/d2sequence/layout_test.go
index 5f2368c9b..dc4e6d07c 100644
--- a/d2layouts/d2sequence/layout_test.go
+++ b/d2layouts/d2sequence/layout_test.go
@@ -393,7 +393,7 @@ func TestSelfEdges(t *testing.T) {
}
ctx := log.WithTB(context.Background(), t, nil)
- Layout(ctx, g, func(ctx context.Context, g *d2graph.Graph) error {
+ d2sequence.Layout(ctx, g, func(ctx context.Context, g *d2graph.Graph) error {
return nil
})
@@ -406,8 +406,8 @@ func TestSelfEdges(t *testing.T) {
t.Fatalf("route does not end at the same actor, start at %.5f, end at %.5f", route[0].X, route[3].X)
}
- if route[3].Y-route[0].Y != MIN_MESSAGE_DISTANCE {
- t.Fatalf("expected route height to be %.f5, got %.5f", MIN_MESSAGE_DISTANCE, route[3].Y-route[0].Y)
+ if route[3].Y-route[0].Y != d2sequence.MIN_MESSAGE_DISTANCE {
+ t.Fatalf("expected route height to be %.f5, got %.5f", d2sequence.MIN_MESSAGE_DISTANCE, route[3].Y-route[0].Y)
}
}
@@ -435,7 +435,7 @@ func TestSequenceToDescendant(t *testing.T) {
}
ctx := log.WithTB(context.Background(), t, nil)
- Layout(ctx, g, func(ctx context.Context, g *d2graph.Graph) error {
+ d2sequence.Layout(ctx, g, func(ctx context.Context, g *d2graph.Graph) error {
return nil
})
diff --git a/e2etests/stable_test.go b/e2etests/stable_test.go
index d256a29ed..526d22aca 100644
--- a/e2etests/stable_test.go
+++ b/e2etests/stable_test.go
@@ -1408,6 +1408,18 @@ choo: {
d2exporter.export -> CLI: resulting SVG
}
`,
+ }, {
+ name: "sequence_diagram_actor_distance",
+ script: `shape: sequence_diagram
+a: "an actor with a really long label that will break everything"
+b: "a short one"
+c: "an\nactor\nwith\na\nreally\nlong\nlabel\nthat\nwill\nbreak\neverything"
+d: "simple"
+a -> b -> c: "short"
+a -> b: "long label for testing purposes and it must be really, really long"
+b -> c: "long label for testing purposes and it must be really, really long"
+c -> d: "short"
+a -> d: "this should span many actors lifelines so we know how it will look like when redering a long label over many actors"`,
},
}
diff --git a/e2etests/testdata/stable/sequence_diagram_actor_distance/dagre/board.exp.json b/e2etests/testdata/stable/sequence_diagram_actor_distance/dagre/board.exp.json
new file mode 100644
index 000000000..6a65d1acc
--- /dev/null
+++ b/e2etests/testdata/stable/sequence_diagram_actor_distance/dagre/board.exp.json
@@ -0,0 +1,553 @@
+{
+ "name": "",
+ "shapes": [
+ {
+ "id": "a",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 210
+ },
+ "width": 514,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "an actor with a really long label that will break everything",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 414,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "b",
+ "type": "",
+ "pos": {
+ "x": 626,
+ "y": 210
+ },
+ "width": 184,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a short one",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 84,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "c",
+ "type": "",
+ "pos": {
+ "x": 1088,
+ "y": 50
+ },
+ "width": 183,
+ "height": 286,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "an\nactor\nwith\na\nreally\nlong\nlabel\nthat\nwill\nbreak\neverything",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 83,
+ "labelHeight": 186,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "d",
+ "type": "",
+ "pos": {
+ "x": 1401,
+ "y": 210
+ },
+ "width": 152,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "simple",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 52,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(a -> b)[0]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "b",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "short",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 36,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 257,
+ "y": 466
+ },
+ {
+ "x": 718,
+ "y": 466
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(b -> c)[0]",
+ "src": "b",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "c",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "short",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 36,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 718,
+ "y": 596
+ },
+ {
+ "x": 1179.5,
+ "y": 596
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(a -> b)[1]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "b",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "long label for testing purposes and it must be really, really long",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 411,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 257,
+ "y": 726
+ },
+ {
+ "x": 718,
+ "y": 726
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(b -> c)[1]",
+ "src": "b",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "c",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "long label for testing purposes and it must be really, really long",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 411,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 718,
+ "y": 856
+ },
+ {
+ "x": 1179.5,
+ "y": 856
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(c -> d)[0]",
+ "src": "c",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "d",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "short",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 36,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1179.5,
+ "y": 986
+ },
+ {
+ "x": 1477,
+ "y": 986
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(a -> d)[0]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "d",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "this should span many actors lifelines so we know how it will look like when redering a long label over many actors",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 745,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 257,
+ "y": 1116
+ },
+ {
+ "x": 1477,
+ "y": 1116
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(a -- )[0]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "a-lifeline-end-2251863791",
+ "dstArrow": "none",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 6,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 257,
+ "y": 336
+ },
+ {
+ "x": 257,
+ "y": 1246
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(b -- )[0]",
+ "src": "b",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "b-lifeline-end-668380428",
+ "dstArrow": "none",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 6,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 718,
+ "y": 336
+ },
+ {
+ "x": 718,
+ "y": 1246
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(c -- )[0]",
+ "src": "c",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "c-lifeline-end-955173837",
+ "dstArrow": "none",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 6,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1179.5,
+ "y": 336
+ },
+ {
+ "x": 1179.5,
+ "y": 1246
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(d -- )[0]",
+ "src": "d",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "d-lifeline-end-2106864010",
+ "dstArrow": "none",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 6,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1477,
+ "y": 336
+ },
+ {
+ "x": 1477,
+ "y": 1246
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/stable/sequence_diagram_actor_distance/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_actor_distance/dagre/sketch.exp.svg
new file mode 100644
index 000000000..ab5408c09
--- /dev/null
+++ b/e2etests/testdata/stable/sequence_diagram_actor_distance/dagre/sketch.exp.svg
@@ -0,0 +1,39 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/board.exp.json b/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/board.exp.json
new file mode 100644
index 000000000..6a65d1acc
--- /dev/null
+++ b/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/board.exp.json
@@ -0,0 +1,553 @@
+{
+ "name": "",
+ "shapes": [
+ {
+ "id": "a",
+ "type": "",
+ "pos": {
+ "x": 0,
+ "y": 210
+ },
+ "width": 514,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "an actor with a really long label that will break everything",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 414,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "b",
+ "type": "",
+ "pos": {
+ "x": 626,
+ "y": 210
+ },
+ "width": 184,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "a short one",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 84,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "c",
+ "type": "",
+ "pos": {
+ "x": 1088,
+ "y": 50
+ },
+ "width": 183,
+ "height": 286,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "an\nactor\nwith\na\nreally\nlong\nlabel\nthat\nwill\nbreak\neverything",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 83,
+ "labelHeight": 186,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ },
+ {
+ "id": "d",
+ "type": "",
+ "pos": {
+ "x": 1401,
+ "y": 210
+ },
+ "width": 152,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "#F7F8FE",
+ "stroke": "#0D32B2",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "simple",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#0A0F25",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 52,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 1
+ }
+ ],
+ "connections": [
+ {
+ "id": "(a -> b)[0]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "b",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "short",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 36,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 257,
+ "y": 466
+ },
+ {
+ "x": 718,
+ "y": 466
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(b -> c)[0]",
+ "src": "b",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "c",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "short",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 36,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 718,
+ "y": 596
+ },
+ {
+ "x": 1179.5,
+ "y": 596
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(a -> b)[1]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "b",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "long label for testing purposes and it must be really, really long",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 411,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 257,
+ "y": 726
+ },
+ {
+ "x": 718,
+ "y": 726
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(b -> c)[1]",
+ "src": "b",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "c",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "long label for testing purposes and it must be really, really long",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 411,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 718,
+ "y": 856
+ },
+ {
+ "x": 1179.5,
+ "y": 856
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(c -> d)[0]",
+ "src": "c",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "d",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "short",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 36,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1179.5,
+ "y": 986
+ },
+ {
+ "x": 1477,
+ "y": 986
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(a -> d)[0]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "d",
+ "dstArrow": "triangle",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "this should span many actors lifelines so we know how it will look like when redering a long label over many actors",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 745,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 257,
+ "y": 1116
+ },
+ {
+ "x": 1477,
+ "y": 1116
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 2
+ },
+ {
+ "id": "(a -- )[0]",
+ "src": "a",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "a-lifeline-end-2251863791",
+ "dstArrow": "none",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 6,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 257,
+ "y": 336
+ },
+ {
+ "x": 257,
+ "y": 1246
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(b -- )[0]",
+ "src": "b",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "b-lifeline-end-668380428",
+ "dstArrow": "none",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 6,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 718,
+ "y": 336
+ },
+ {
+ "x": 718,
+ "y": 1246
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(c -- )[0]",
+ "src": "c",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "c-lifeline-end-955173837",
+ "dstArrow": "none",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 6,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1179.5,
+ "y": 336
+ },
+ {
+ "x": 1179.5,
+ "y": 1246
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "(d -- )[0]",
+ "src": "d",
+ "srcArrow": "none",
+ "srcLabel": "",
+ "dst": "d-lifeline-end-2106864010",
+ "dstArrow": "none",
+ "dstLabel": "",
+ "opacity": 1,
+ "strokeDash": 6,
+ "strokeWidth": 2,
+ "stroke": "#0D32B2",
+ "label": "",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "#676C7E",
+ "italic": true,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 0,
+ "labelHeight": 0,
+ "labelPosition": "",
+ "labelPercentage": 0,
+ "route": [
+ {
+ "x": 1477,
+ "y": 336
+ },
+ {
+ "x": 1477,
+ "y": 1246
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ }
+ ]
+}
diff --git a/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/sketch.exp.svg
new file mode 100644
index 000000000..ab5408c09
--- /dev/null
+++ b/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/sketch.exp.svg
@@ -0,0 +1,39 @@
+
+
\ No newline at end of file
diff --git a/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json
index 49097965c..4c42ba6d9 100644
--- a/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json
+++ b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json
@@ -44,7 +44,7 @@
"id": "b",
"type": "oval",
"pos": {
- "x": 410,
+ "x": 259,
"y": 84
},
"width": 150,
@@ -83,7 +83,7 @@
"id": "c",
"type": "class",
"pos": {
- "x": 817,
+ "x": 463,
"y": 50
},
"width": 241,
@@ -133,7 +133,7 @@
"id": "d",
"type": "cloud",
"pos": {
- "x": 1315,
+ "x": 744,
"y": 108
},
"width": 179,
@@ -172,7 +172,7 @@
"id": "e",
"type": "code",
"pos": {
- "x": 1751,
+ "x": 986,
"y": 164
},
"width": 196,
@@ -211,7 +211,7 @@
"id": "f",
"type": "cylinder",
"pos": {
- "x": 2204,
+ "x": 1259,
"y": 84
},
"width": 150,
@@ -250,7 +250,7 @@
"id": "g",
"type": "diamond",
"pos": {
- "x": 2611,
+ "x": 1509,
"y": 85
},
"width": 150,
@@ -289,7 +289,7 @@
"id": "h",
"type": "document",
"pos": {
- "x": 3018,
+ "x": 1759,
"y": 97
},
"width": 150,
@@ -328,7 +328,7 @@
"id": "i",
"type": "hexagon",
"pos": {
- "x": 3425,
+ "x": 1993,
"y": 108
},
"width": 182,
@@ -367,7 +367,7 @@
"id": "j",
"type": "image",
"pos": {
- "x": 3864,
+ "x": 2259,
"y": 63
},
"width": 150,
@@ -417,7 +417,7 @@
"id": "k",
"type": "oval",
"pos": {
- "x": 4271,
+ "x": 2509,
"y": 97
},
"width": 150,
@@ -456,7 +456,7 @@
"id": "l",
"type": "package",
"pos": {
- "x": 4678,
+ "x": 2759,
"y": 98
},
"width": 150,
@@ -495,7 +495,7 @@
"id": "m",
"type": "page",
"pos": {
- "x": 5085,
+ "x": 2996,
"y": 108
},
"width": 175,
@@ -534,7 +534,7 @@
"id": "n",
"type": "parallelogram",
"pos": {
- "x": 5517,
+ "x": 3242,
"y": 92
},
"width": 183,
@@ -573,7 +573,7 @@
"id": "o",
"type": "person",
"pos": {
- "x": 5957,
+ "x": 3507,
"y": 55
},
"width": 154,
@@ -612,7 +612,7 @@
"id": "p",
"type": "queue",
"pos": {
- "x": 6368,
+ "x": 3753,
"y": 108
},
"width": 161,
@@ -651,7 +651,7 @@
"id": "q",
"type": "rectangle",
"pos": {
- "x": 6786,
+ "x": 4001,
"y": 69
},
"width": 165,
@@ -690,7 +690,7 @@
"id": "r",
"type": "step",
"pos": {
- "x": 7208,
+ "x": 4227,
"y": 108
},
"width": 213,
@@ -729,7 +729,7 @@
"id": "s",
"type": "stored_data",
"pos": {
- "x": 7678,
+ "x": 4509,
"y": 96
},
"width": 150,
@@ -768,7 +768,7 @@
"id": "t",
"type": "sql_table",
"pos": {
- "x": 8085,
+ "x": 4729,
"y": 126
},
"width": 210,
@@ -848,7 +848,7 @@
"y": 364
},
{
- "x": 485,
+ "x": 334,
"y": 364
}
],
@@ -883,11 +883,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 485,
+ "x": 334,
"y": 494
},
{
- "x": 937.5,
+ "x": 583.5,
"y": 494
}
],
@@ -922,11 +922,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 937.5,
+ "x": 583.5,
"y": 624
},
{
- "x": 1404.5,
+ "x": 833.5,
"y": 624
}
],
@@ -961,11 +961,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 1404.5,
+ "x": 833.5,
"y": 754
},
{
- "x": 1849,
+ "x": 1084,
"y": 754
}
],
@@ -1000,11 +1000,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 1849,
+ "x": 1084,
"y": 884
},
{
- "x": 2279,
+ "x": 1334,
"y": 884
}
],
@@ -1039,11 +1039,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 2279,
+ "x": 1334,
"y": 1014
},
{
- "x": 2686,
+ "x": 1584,
"y": 1014
}
],
@@ -1078,11 +1078,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 2686,
+ "x": 1584,
"y": 1144
},
{
- "x": 3093,
+ "x": 1834,
"y": 1144
}
],
@@ -1117,11 +1117,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 3093,
+ "x": 1834,
"y": 1274
},
{
- "x": 3516,
+ "x": 2084,
"y": 1274
}
],
@@ -1156,11 +1156,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 3516,
+ "x": 2084,
"y": 1404
},
{
- "x": 3939,
+ "x": 2334,
"y": 1404
}
],
@@ -1195,11 +1195,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 3939,
+ "x": 2334,
"y": 1534
},
{
- "x": 4346,
+ "x": 2584,
"y": 1534
}
],
@@ -1234,11 +1234,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 4346,
+ "x": 2584,
"y": 1664
},
{
- "x": 4753,
+ "x": 2834,
"y": 1664
}
],
@@ -1273,11 +1273,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 4753,
+ "x": 2834,
"y": 1794
},
{
- "x": 5172.5,
+ "x": 3083.5,
"y": 1794
}
],
@@ -1312,11 +1312,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 5172.5,
+ "x": 3083.5,
"y": 1924
},
{
- "x": 5608.5,
+ "x": 3333.5,
"y": 1924
}
],
@@ -1351,11 +1351,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 5608.5,
+ "x": 3333.5,
"y": 2054
},
{
- "x": 6034,
+ "x": 3584,
"y": 2054
}
],
@@ -1390,11 +1390,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 6034,
+ "x": 3584,
"y": 2184
},
{
- "x": 6448.5,
+ "x": 3833.5,
"y": 2184
}
],
@@ -1429,11 +1429,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 6448.5,
+ "x": 3833.5,
"y": 2314
},
{
- "x": 6868.5,
+ "x": 4083.5,
"y": 2314
}
],
@@ -1468,11 +1468,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 6868.5,
+ "x": 4083.5,
"y": 2444
},
{
- "x": 7314.5,
+ "x": 4333.5,
"y": 2444
}
],
@@ -1507,11 +1507,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 7314.5,
+ "x": 4333.5,
"y": 2574
},
{
- "x": 7753,
+ "x": 4584,
"y": 2574
}
],
@@ -1546,11 +1546,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 7753,
+ "x": 4584,
"y": 2704
},
{
- "x": 8190,
+ "x": 4834,
"y": 2704
}
],
@@ -1624,11 +1624,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 485,
+ "x": 334,
"y": 234
},
{
- "x": 485,
+ "x": 334,
"y": 2834
}
],
@@ -1663,11 +1663,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 937.5,
+ "x": 583.5,
"y": 234
},
{
- "x": 937.5,
+ "x": 583.5,
"y": 2834
}
],
@@ -1702,11 +1702,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 1404.5,
+ "x": 833.5,
"y": 234
},
{
- "x": 1404.5,
+ "x": 833.5,
"y": 2834
}
],
@@ -1741,11 +1741,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 1849,
+ "x": 1084,
"y": 234
},
{
- "x": 1849,
+ "x": 1084,
"y": 2834
}
],
@@ -1780,11 +1780,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 2279,
+ "x": 1334,
"y": 234
},
{
- "x": 2279,
+ "x": 1334,
"y": 2834
}
],
@@ -1819,11 +1819,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 2686,
+ "x": 1584,
"y": 234
},
{
- "x": 2686,
+ "x": 1584,
"y": 2834
}
],
@@ -1858,11 +1858,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 3093,
+ "x": 1834,
"y": 234
},
{
- "x": 3093,
+ "x": 1834,
"y": 2834
}
],
@@ -1897,11 +1897,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 3516,
+ "x": 2084,
"y": 234
},
{
- "x": 3516,
+ "x": 2084,
"y": 2834
}
],
@@ -1936,11 +1936,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 3939,
+ "x": 2334,
"y": 239
},
{
- "x": 3939,
+ "x": 2334,
"y": 2834
}
],
@@ -1975,11 +1975,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 4346,
+ "x": 2584,
"y": 234
},
{
- "x": 4346,
+ "x": 2584,
"y": 2834
}
],
@@ -2014,11 +2014,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 4753,
+ "x": 2834,
"y": 234
},
{
- "x": 4753,
+ "x": 2834,
"y": 2834
}
],
@@ -2053,11 +2053,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 5172.5,
+ "x": 3083.5,
"y": 234
},
{
- "x": 5172.5,
+ "x": 3083.5,
"y": 2834
}
],
@@ -2092,11 +2092,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 5608.5,
+ "x": 3333.5,
"y": 234
},
{
- "x": 5608.5,
+ "x": 3333.5,
"y": 2834
}
],
@@ -2131,11 +2131,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 6034,
+ "x": 3584,
"y": 239
},
{
- "x": 6034,
+ "x": 3584,
"y": 2834
}
],
@@ -2170,11 +2170,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 6448.5,
+ "x": 3833.5,
"y": 234
},
{
- "x": 6448.5,
+ "x": 3833.5,
"y": 2834
}
],
@@ -2209,11 +2209,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 6868.5,
+ "x": 4083.5,
"y": 234
},
{
- "x": 6868.5,
+ "x": 4083.5,
"y": 2834
}
],
@@ -2248,11 +2248,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 7314.5,
+ "x": 4333.5,
"y": 234
},
{
- "x": 7314.5,
+ "x": 4333.5,
"y": 2834
}
],
@@ -2287,11 +2287,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 7753,
+ "x": 4584,
"y": 234
},
{
- "x": 7753,
+ "x": 4584,
"y": 2834
}
],
@@ -2326,11 +2326,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 8190,
+ "x": 4834,
"y": 234
},
{
- "x": 8190,
+ "x": 4834,
"y": 2834
}
],
diff --git a/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/sketch.exp.svg
index 0428bcef4..2d74a90f0 100644
--- a/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/sketch.exp.svg
+++ b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/sketch.exp.svg
@@ -2,7 +2,7 @@