From edb6b857b35426baeac64a7e0bd0cac3b6ca4a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20C=C3=A9sar=20Batista?= Date: Mon, 5 Dec 2022 10:19:26 -0800 Subject: [PATCH 1/6] Space actor centers --- d2layouts/d2sequence/sequence_diagram.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go index 3df170756..752299adc 100644 --- a/d2layouts/d2sequence/sequence_diagram.go +++ b/d2layouts/d2sequence/sequence_diagram.go @@ -196,7 +196,6 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) *se // rankDiff = 0 for self edges distributedLabelWidth := float64(message.LabelDimensions.Width) / rankDiff sd.actorXStep = math.Max(sd.actorXStep, distributedLabelWidth+HORIZONTAL_PAD) - } sd.lastMessage[message.Src] = message if _, exists := sd.firstMessage[message.Src]; !exists { @@ -287,9 +286,9 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { ) } -// placeActors places actors bottom aligned, side by side +// placeActors places actors bottom aligned, side by side with centers spaced by sd.actorXStep func (sd *sequenceDiagram) placeActors() { - x := 0. + centerX := sd.actors[0].Width / 2. for _, actor := range sd.actors { shape := actor.Attributes.Shape.Value var yOffset float64 @@ -303,8 +302,9 @@ func (sd *sequenceDiagram) placeActors() { actor.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter)) yOffset = sd.maxActorHeight - actor.Height } - actor.TopLeft = geo.NewPoint(x, yOffset) - x += actor.Width + sd.actorXStep + halfWidth := actor.Width / 2. + actor.TopLeft = geo.NewPoint(math.Round(centerX-halfWidth), yOffset) + centerX += sd.actorXStep } } From 04ba174fe56e0933e1add3498a4cf1b7b3258980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20C=C3=A9sar=20Batista?= Date: Mon, 5 Dec 2022 10:27:55 -0800 Subject: [PATCH 2/6] Handle different actor distances --- d2layouts/d2sequence/sequence_diagram.go | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/d2layouts/d2sequence/sequence_diagram.go b/d2layouts/d2sequence/sequence_diagram.go index 752299adc..11df81b59 100644 --- a/d2layouts/d2sequence/sequence_diagram.go +++ b/d2layouts/d2sequence/sequence_diagram.go @@ -32,8 +32,11 @@ type sequenceDiagram struct { firstMessage map[*d2graph.Object]*d2graph.Edge lastMessage map[*d2graph.Object]*d2graph.Edge + // the distance from actor[i] center to actor[i+1] center + // every neighbor actors need different distances depending on the message labels between them + actorXStep []float64 + yStep float64 - actorXStep float64 maxActorHeight float64 verticalIndices map[string]int @@ -139,8 +142,8 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) *se objectRank: make(map[*d2graph.Object]int), firstMessage: make(map[*d2graph.Object]*d2graph.Edge), lastMessage: make(map[*d2graph.Object]*d2graph.Edge), + actorXStep: make([]float64, len(actors)-1), yStep: MIN_MESSAGE_DISTANCE, - actorXStep: MIN_ACTOR_DISTANCE, maxActorHeight: 0., verticalIndices: make(map[string]int), } @@ -183,6 +186,10 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) *se queue = append(queue, child.ChildrenArray...) } + + if rank != len(actors)-1 { + sd.actorXStep[rank] = math.Max(actor.Width/2., MIN_ACTOR_DISTANCE) + } } for _, message := range sd.messages { @@ -195,7 +202,9 @@ func newSequenceDiagram(objects []*d2graph.Object, messages []*d2graph.Edge) *se if rankDiff != 0 { // rankDiff = 0 for self edges distributedLabelWidth := float64(message.LabelDimensions.Width) / rankDiff - sd.actorXStep = math.Max(sd.actorXStep, distributedLabelWidth+HORIZONTAL_PAD) + for rank := sd.objectRank[message.Src]; rank <= sd.objectRank[message.Dst]-1; rank++ { + sd.actorXStep[rank] = math.Max(sd.actorXStep[rank], distributedLabelWidth+HORIZONTAL_PAD) + } } sd.lastMessage[message.Src] = message if _, exists := sd.firstMessage[message.Src]; !exists { @@ -289,7 +298,7 @@ func (sd *sequenceDiagram) placeGroup(group *d2graph.Object) { // placeActors places actors bottom aligned, side by side with centers spaced by sd.actorXStep func (sd *sequenceDiagram) placeActors() { centerX := sd.actors[0].Width / 2. - for _, actor := range sd.actors { + for rank, actor := range sd.actors { shape := actor.Attributes.Shape.Value var yOffset float64 if shape == d2target.ShapeImage || shape == d2target.ShapePerson { @@ -304,7 +313,9 @@ func (sd *sequenceDiagram) placeActors() { } halfWidth := actor.Width / 2. actor.TopLeft = geo.NewPoint(math.Round(centerX-halfWidth), yOffset) - centerX += sd.actorXStep + if rank != len(sd.actors)-1 { + centerX += sd.actorXStep[rank] + } } } From 3eca7bd13923395ba8bd4f691e40286b9ccdb1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20C=C3=A9sar=20Batista?= Date: Mon, 5 Dec 2022 10:33:46 -0800 Subject: [PATCH 3/6] Update tests --- d2layouts/d2sequence/layout_test.go | 8 +- e2etests/stable_test.go | 12 + .../dagre/board.exp.json | 553 ++++++++++++++++++ .../dagre/sketch.exp.svg | 39 ++ .../elk/board.exp.json | 553 ++++++++++++++++++ .../elk/sketch.exp.svg | 39 ++ .../dagre/board.exp.json | 188 +++--- .../dagre/sketch.exp.svg | 28 +- .../elk/board.exp.json | 188 +++--- .../elk/sketch.exp.svg | 28 +- .../dagre/board.exp.json | 80 +-- .../dagre/sketch.exp.svg | 14 +- .../elk/board.exp.json | 80 +-- .../elk/sketch.exp.svg | 14 +- .../dagre/board.exp.json | 90 +-- .../dagre/sketch.exp.svg | 4 +- .../elk/board.exp.json | 90 +-- .../elk/sketch.exp.svg | 4 +- .../dagre/board.exp.json | 32 +- .../dagre/sketch.exp.svg | 8 +- .../sequence_diagram_note/elk/board.exp.json | 32 +- .../sequence_diagram_note/elk/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 92 +-- .../dagre/sketch.exp.svg | 32 +- .../sequence_diagram_real/elk/board.exp.json | 92 +-- .../sequence_diagram_real/elk/sketch.exp.svg | 32 +- .../dagre/board.exp.json | 42 +- .../dagre/sketch.exp.svg | 16 +- .../elk/board.exp.json | 42 +- .../elk/sketch.exp.svg | 16 +- .../dagre/board.exp.json | 56 +- .../dagre/sketch.exp.svg | 22 +- .../elk/board.exp.json | 56 +- .../elk/sketch.exp.svg | 22 +- .../dagre/board.exp.json | 80 +-- .../dagre/sketch.exp.svg | 30 +- .../sequence_diagram_span/elk/board.exp.json | 80 +-- .../sequence_diagram_span/elk/sketch.exp.svg | 30 +- .../sequence_diagrams/dagre/board.exp.json | 390 ++++++------ .../sequence_diagrams/dagre/sketch.exp.svg | 54 +- .../sequence_diagrams/elk/board.exp.json | 346 +++++------ .../sequence_diagrams/elk/sketch.exp.svg | 54 +- 42 files changed, 2436 insertions(+), 1240 deletions(-) create mode 100644 e2etests/testdata/stable/sequence_diagram_actor_distance/dagre/board.exp.json create mode 100644 e2etests/testdata/stable/sequence_diagram_actor_distance/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/stable/sequence_diagram_actor_distance/elk/board.exp.json create mode 100644 e2etests/testdata/stable/sequence_diagram_actor_distance/elk/sketch.exp.svg 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 @@ + +an actor with a really long label that will break everythinga short oneanactorwithareallylonglabelthatwillbreakeverythingsimple shortshortlong label for testing purposes and it must be really, really longlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actors + + + + + + + + \ 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 @@ + +an actor with a really long label that will break everythinga short oneanactorwithareallylonglabelthatwillbreakeverythingsimple shortshortlong label for testing purposes and it must be really, really longlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actors + + + + + + + + \ 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 @@ a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - - - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + + + a labelblabelsa class+ -public() bool -void- -private() int -voidcloudyyyy:= 5 +a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - - - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + + + abcdggggroup 1group bchoonested guywhat would arnold saythis note lalaeyokayokay - - - - - +abcdggggroup 1group bchoonested guywhat would arnold saythis note lalaeyokayokay + + + + + abcdggggroup 1group bchoonested guywhat would arnold saythis note lalaeyokayokay - - - - - +abcdggggroup 1group bchoonested guywhat would arnold saythis note lalaeyokayokay + + + + + scoreritemResponseitemessayRubricconceptitemOutcome scoreritemResponseitemessayRubricconceptitemOutcome abcdexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier okay - - +abcdexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier okay + + abcdexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier okay - - +abcdexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier okay + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutmeasurements also take place 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVG - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutmeasurements also take place 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVG + + + + + + + + + + + + + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutmeasurements also take place 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVG - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutmeasurements also take place 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVG + + + + + + + + + + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response - - - - - - - - - +AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response + + + + + + + + + AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response - - - - - - - - - +AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + an actor with a really long label that will break everythinga short oneanactorwithareallylonglabelthatwillbreakeverythingsimple shortshortlong label for testing purposes and it must be really, really longlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actors +an actor with a really long label that will break everythinga short oneanactorwithareallylonglabelthatwillbreakeverythingsimple shortshortlong label for testing purposes and it must be really, really longlong label for testing purposes and it must be really, really longshortthis 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/elk/board.exp.json b/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/board.exp.json index 6a65d1acc..bfd562063 100644 --- a/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/board.exp.json @@ -14,7 +14,7 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#F7F8FE", + "fill": "#EDF0FD", "stroke": "#0D32B2", "shadow": false, "3d": false, @@ -53,7 +53,7 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#F7F8FE", + "fill": "#EDF0FD", "stroke": "#0D32B2", "shadow": false, "3d": false, @@ -92,7 +92,7 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#F7F8FE", + "fill": "#EDF0FD", "stroke": "#0D32B2", "shadow": false, "3d": false, @@ -131,7 +131,7 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#F7F8FE", + "fill": "#EDF0FD", "stroke": "#0D32B2", "shadow": false, "3d": false, @@ -196,7 +196,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 2 + "zIndex": 4 }, { "id": "(b -> c)[0]", @@ -235,7 +235,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 2 + "zIndex": 4 }, { "id": "(a -> b)[1]", @@ -274,7 +274,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 2 + "zIndex": 4 }, { "id": "(b -> c)[1]", @@ -313,7 +313,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 2 + "zIndex": 4 }, { "id": "(c -> d)[0]", @@ -352,7 +352,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 2 + "zIndex": 4 }, { "id": "(a -> d)[0]", @@ -391,7 +391,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 2 + "zIndex": 4 }, { "id": "(a -- )[0]", @@ -430,7 +430,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(b -- )[0]", @@ -469,7 +469,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(c -- )[0]", @@ -508,7 +508,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 }, { "id": "(d -- )[0]", @@ -547,7 +547,7 @@ "animated": false, "tooltip": "", "icon": null, - "zIndex": 0 + "zIndex": 2 } ] } 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 index ab5408c09..d1f73d658 100644 --- a/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_actor_distance/elk/sketch.exp.svg @@ -14,7 +14,7 @@ width="1753" height="1396" viewBox="-100 -50 1753 1396">an actor with a really long label that will break everythinga short oneanactorwithareallylonglabelthatwillbreakeverythingsimple shortshortlong label for testing purposes and it must be really, really longlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actors +an actor with a really long label that will break everythinga short oneanactorwithareallylonglabelthatwillbreakeverythingsimple shortshortlong label for testing purposes and it must be really, really longlong label for testing purposes and it must be really, really longshortthis 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_all_shapes/dagre/board.exp.json b/e2etests/testdata/stable/sequence_diagram_all_shapes/dagre/board.exp.json index 73b2fad99..b6504c0b0 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": 223, + "x": 259, "y": 87 }, "width": 150, @@ -83,7 +83,7 @@ "id": "c", "type": "class", "pos": { - "x": 443, + "x": 289, "y": 50 }, "width": 241, @@ -133,7 +133,7 @@ "id": "d", "type": "cloud", "pos": { - "x": 754, + "x": 441, "y": 108 }, "width": 179, @@ -172,7 +172,7 @@ "id": "e", "type": "code", "pos": { - "x": 1003, + "x": 522, "y": 164 }, "width": 196, @@ -211,7 +211,7 @@ "id": "f", "type": "cylinder", "pos": { - "x": 1269, + "x": 643, "y": 108 }, "width": 150, @@ -250,7 +250,7 @@ "id": "g", "type": "diamond", "pos": { - "x": 1489, + "x": 718, "y": 108 }, "width": 150, @@ -289,7 +289,7 @@ "id": "h", "type": "document", "pos": { - "x": 1709, + "x": 793, "y": 108 }, "width": 150, @@ -328,7 +328,7 @@ "id": "i", "type": "hexagon", "pos": { - "x": 1929, + "x": 852, "y": 108 }, "width": 182, @@ -367,7 +367,7 @@ "id": "j", "type": "image", "pos": { - "x": 2181, + "x": 959, "y": 85 }, "width": 150, @@ -417,7 +417,7 @@ "id": "k", "type": "oval", "pos": { - "x": 2401, + "x": 1034, "y": 108 }, "width": 150, @@ -456,7 +456,7 @@ "id": "l", "type": "package", "pos": { - "x": 2621, + "x": 1109, "y": 108 }, "width": 150, @@ -495,7 +495,7 @@ "id": "m", "type": "page", "pos": { - "x": 2841, + "x": 1171, "y": 108 }, "width": 175, @@ -534,7 +534,7 @@ "id": "n", "type": "parallelogram", "pos": { - "x": 3086, + "x": 1255, "y": 92 }, "width": 183, @@ -573,7 +573,7 @@ "id": "o", "type": "person", "pos": { - "x": 3339, + "x": 1361, "y": 55 }, "width": 154, @@ -612,7 +612,7 @@ "id": "p", "type": "queue", "pos": { - "x": 3563, + "x": 1434, "y": 108 }, "width": 161, @@ -651,7 +651,7 @@ "id": "q", "type": "rectangle", "pos": { - "x": 3794, + "x": 1513, "y": 69 }, "width": 165, @@ -690,7 +690,7 @@ "id": "r", "type": "step", "pos": { - "x": 4029, + "x": 1571, "y": 108 }, "width": 213, @@ -729,7 +729,7 @@ "id": "s", "type": "stored_data", "pos": { - "x": 4312, + "x": 1709, "y": 108 }, "width": 150, @@ -768,7 +768,7 @@ "id": "t", "type": "sql_table", "pos": { - "x": 4532, + "x": 1754, "y": 126 }, "width": 210, @@ -848,7 +848,7 @@ "y": 364 }, { - "x": 298, + "x": 334, "y": 364 } ], @@ -883,11 +883,11 @@ "labelPercentage": 0, "route": [ { - "x": 298, + "x": 334, "y": 494 }, { - "x": 563.5, + "x": 409.5, "y": 494 } ], @@ -922,11 +922,11 @@ "labelPercentage": 0, "route": [ { - "x": 563.5, + "x": 409.5, "y": 624 }, { - "x": 843.5, + "x": 530.5, "y": 624 } ], @@ -961,11 +961,11 @@ "labelPercentage": 0, "route": [ { - "x": 843.5, + "x": 530.5, "y": 754 }, { - "x": 1101, + "x": 620, "y": 754 } ], @@ -1000,11 +1000,11 @@ "labelPercentage": 0, "route": [ { - "x": 1101, + "x": 620, "y": 884 }, { - "x": 1344, + "x": 718, "y": 884 } ], @@ -1039,11 +1039,11 @@ "labelPercentage": 0, "route": [ { - "x": 1344, + "x": 718, "y": 1014 }, { - "x": 1564, + "x": 793, "y": 1014 } ], @@ -1078,11 +1078,11 @@ "labelPercentage": 0, "route": [ { - "x": 1564, + "x": 793, "y": 1144 }, { - "x": 1784, + "x": 868, "y": 1144 } ], @@ -1117,11 +1117,11 @@ "labelPercentage": 0, "route": [ { - "x": 1784, + "x": 868, "y": 1274 }, { - "x": 2020, + "x": 943, "y": 1274 } ], @@ -1156,11 +1156,11 @@ "labelPercentage": 0, "route": [ { - "x": 2020, + "x": 943, "y": 1404 }, { - "x": 2256, + "x": 1034, "y": 1404 } ], @@ -1195,11 +1195,11 @@ "labelPercentage": 0, "route": [ { - "x": 2256, + "x": 1034, "y": 1534 }, { - "x": 2476, + "x": 1109, "y": 1534 } ], @@ -1234,11 +1234,11 @@ "labelPercentage": 0, "route": [ { - "x": 2476, + "x": 1109, "y": 1664 }, { - "x": 2696, + "x": 1184, "y": 1664 } ], @@ -1273,11 +1273,11 @@ "labelPercentage": 0, "route": [ { - "x": 2696, + "x": 1184, "y": 1794 }, { - "x": 2928.5, + "x": 1258.5, "y": 1794 } ], @@ -1312,11 +1312,11 @@ "labelPercentage": 0, "route": [ { - "x": 2928.5, + "x": 1258.5, "y": 1924 }, { - "x": 3177.5, + "x": 1346.5, "y": 1924 } ], @@ -1351,11 +1351,11 @@ "labelPercentage": 0, "route": [ { - "x": 3177.5, + "x": 1346.5, "y": 2054 }, { - "x": 3416, + "x": 1438, "y": 2054 } ], @@ -1390,11 +1390,11 @@ "labelPercentage": 0, "route": [ { - "x": 3416, + "x": 1438, "y": 2184 }, { - "x": 3643.5, + "x": 1514.5, "y": 2184 } ], @@ -1429,11 +1429,11 @@ "labelPercentage": 0, "route": [ { - "x": 3643.5, + "x": 1514.5, "y": 2314 }, { - "x": 3876.5, + "x": 1595.5, "y": 2314 } ], @@ -1468,11 +1468,11 @@ "labelPercentage": 0, "route": [ { - "x": 3876.5, + "x": 1595.5, "y": 2444 }, { - "x": 4135.5, + "x": 1677.5, "y": 2444 } ], @@ -1507,11 +1507,11 @@ "labelPercentage": 0, "route": [ { - "x": 4135.5, + "x": 1677.5, "y": 2574 }, { - "x": 4387, + "x": 1784, "y": 2574 } ], @@ -1546,11 +1546,11 @@ "labelPercentage": 0, "route": [ { - "x": 4387, + "x": 1784, "y": 2704 }, { - "x": 4637, + "x": 1859, "y": 2704 } ], @@ -1624,11 +1624,11 @@ "labelPercentage": 0, "route": [ { - "x": 298, + "x": 334, "y": 234 }, { - "x": 298, + "x": 334, "y": 2834 } ], @@ -1663,11 +1663,11 @@ "labelPercentage": 0, "route": [ { - "x": 563.5, + "x": 409.5, "y": 234 }, { - "x": 563.5, + "x": 409.5, "y": 2834 } ], @@ -1702,11 +1702,11 @@ "labelPercentage": 0, "route": [ { - "x": 843.5, + "x": 530.5, "y": 234 }, { - "x": 843.5, + "x": 530.5, "y": 2834 } ], @@ -1741,11 +1741,11 @@ "labelPercentage": 0, "route": [ { - "x": 1101, + "x": 620, "y": 234 }, { - "x": 1101, + "x": 620, "y": 2834 } ], @@ -1780,11 +1780,11 @@ "labelPercentage": 0, "route": [ { - "x": 1344, + "x": 718, "y": 234 }, { - "x": 1344, + "x": 718, "y": 2834 } ], @@ -1819,11 +1819,11 @@ "labelPercentage": 0, "route": [ { - "x": 1564, + "x": 793, "y": 234 }, { - "x": 1564, + "x": 793, "y": 2834 } ], @@ -1858,11 +1858,11 @@ "labelPercentage": 0, "route": [ { - "x": 1784, + "x": 868, "y": 234 }, { - "x": 1784, + "x": 868, "y": 2834 } ], @@ -1897,11 +1897,11 @@ "labelPercentage": 0, "route": [ { - "x": 2020, + "x": 943, "y": 234 }, { - "x": 2020, + "x": 943, "y": 2834 } ], @@ -1936,11 +1936,11 @@ "labelPercentage": 0, "route": [ { - "x": 2256, + "x": 1034, "y": 239 }, { - "x": 2256, + "x": 1034, "y": 2834 } ], @@ -1975,11 +1975,11 @@ "labelPercentage": 0, "route": [ { - "x": 2476, + "x": 1109, "y": 234 }, { - "x": 2476, + "x": 1109, "y": 2834 } ], @@ -2014,11 +2014,11 @@ "labelPercentage": 0, "route": [ { - "x": 2696, + "x": 1184, "y": 234 }, { - "x": 2696, + "x": 1184, "y": 2834 } ], @@ -2053,11 +2053,11 @@ "labelPercentage": 0, "route": [ { - "x": 2928.5, + "x": 1258.5, "y": 234 }, { - "x": 2928.5, + "x": 1258.5, "y": 2834 } ], @@ -2092,11 +2092,11 @@ "labelPercentage": 0, "route": [ { - "x": 3177.5, + "x": 1346.5, "y": 234 }, { - "x": 3177.5, + "x": 1346.5, "y": 2834 } ], @@ -2131,11 +2131,11 @@ "labelPercentage": 0, "route": [ { - "x": 3416, + "x": 1438, "y": 239 }, { - "x": 3416, + "x": 1438, "y": 2834 } ], @@ -2170,11 +2170,11 @@ "labelPercentage": 0, "route": [ { - "x": 3643.5, + "x": 1514.5, "y": 234 }, { - "x": 3643.5, + "x": 1514.5, "y": 2834 } ], @@ -2209,11 +2209,11 @@ "labelPercentage": 0, "route": [ { - "x": 3876.5, + "x": 1595.5, "y": 234 }, { - "x": 3876.5, + "x": 1595.5, "y": 2834 } ], @@ -2248,11 +2248,11 @@ "labelPercentage": 0, "route": [ { - "x": 4135.5, + "x": 1677.5, "y": 234 }, { - "x": 4135.5, + "x": 1677.5, "y": 2834 } ], @@ -2287,11 +2287,11 @@ "labelPercentage": 0, "route": [ { - "x": 4387, + "x": 1784, "y": 234 }, { - "x": 4387, + "x": 1784, "y": 2834 } ], @@ -2326,11 +2326,11 @@ "labelPercentage": 0, "route": [ { - "x": 4637, + "x": 1859, "y": 234 }, { - "x": 4637, + "x": 1859, "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 7e13b2b3a..80a3928b3 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 @@ a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - - - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + + + a labelblabelsa class+ -public() bool -void- -private() int -voidcloudyyyy:= 5 +a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - - - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + + + abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note - - - - - +abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note + + + + + abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note - - - - - +abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note + + + + + scoreritemResponseitemessayRubricconceptitemOutcome scoreritemResponseitemessayRubricconceptitemOutcome abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier - - +abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier + + abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier - - +abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place + + + + + + + + + + + + + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place + + + + + + + + + + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response - - - - - - - - - +AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response + + + + + + + + + AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response - - - - - - - - - +AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + an actor with a really long label that will break everythinga short oneanactorwithareallylonglabelthatwillbreakeverythingsimple shortshortlong label for testing purposes and it must be really, really longlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actors - - - - - - - +an actor with a really long label that will break everythinganactorwithareallylonglabelthatwillbreakeverythingsimplea short onefar awaywhat if there were no labels between this actor and the previous one shortlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actorslong label for testing purposes and it must be really, really long + + + + + + an actor with a really long label that will break everythinga short oneanactorwithareallylonglabelthatwillbreakeverythingsimple shortshortlong label for testing purposes and it must be really, really longlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actors - - - - - - - +an actor with a really long label that will break everythinganactorwithareallylonglabelthatwillbreakeverythingsimplea short onefar awaywhat if there were no labels between this actor and the previous one shortlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actorslong label for testing purposes and it must be really, really long + + + + + + a labelblabelsa class+ -public() bool -void- -private() int -voidcloudyyyy:= 5 +a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + - + a labelblabelsa class+ -public() bool -void- -private() int -voidcloudyyyy:= 5 +a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + - + abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note - - - - - +abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note + + + + + abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note - - - - - +abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note + + + + + scoreritemResponseitemessayRubricconceptitemOutcome scoreritemResponseitemessayRubricconceptitemOutcome abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier - - +abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier + + abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier - - +abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place + + + + + + + + + + + + + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place + + + + + + + + + + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + an actor with a really long label that will break everythinganactorwithareallylonglabelthatwillbreakeverythingsimplea short onefar awaywhat if there were no labels between this actor and the previous one shortlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actorslong label for testing purposes and it must be really, really long - - - - - - +an actor with a really long label that will break everythinganactorwithareallylonglabelthatwillbreakeverythingsimplea short onefar awaywhat if there were no labels between this actor and the previous one shortlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actorslong label for testing purposes and it must be really, really long + + + + + + an actor with a really long label that will break everythinganactorwithareallylonglabelthatwillbreakeverythingsimplea short onefar awaywhat if there were no labels between this actor and the previous one shortlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actorslong label for testing purposes and it must be really, really long - - - - - - +an actor with a really long label that will break everythinganactorwithareallylonglabelthatwillbreakeverythingsimplea short onefar awaywhat if there were no labels between this actor and the previous one shortlong label for testing purposes and it must be really, really longshortthis should span many actors lifelines so we know how it will look like when redering a long label over many actorslong label for testing purposes and it must be really, really long + + + + + + a labelblabelsa class+ -public() bool -void- -private() int -voidcloudyyyy:= 5 +a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - - - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + + + a labelblabelsa class+ -public() bool -void- -private() int -voidcloudyyyy:= 5 +a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - - - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + + + abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note - - - - - +abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note + + + + + abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note - - - - - +abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note + + + + + ba a note here to remember that padding must consider notes toojustalongnotehere \ No newline at end of file diff --git a/e2etests/testdata/stable/sequence_diagram_long_note/elk/board.exp.json b/e2etests/testdata/stable/sequence_diagram_long_note/elk/board.exp.json new file mode 100644 index 000000000..2e66a4eb8 --- /dev/null +++ b/e2etests/testdata/stable/sequence_diagram_long_note/elk/board.exp.json @@ -0,0 +1,280 @@ +{ + "name": "", + "shapes": [ + { + "id": "b", + "type": "", + "pos": { + "x": 0, + "y": 50 + }, + "width": 150, + "height": 126, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 13, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b.note", + "type": "rectangle", + "pos": { + "x": -187, + "y": 436 + }, + "width": 525, + "height": 126, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#FFFFFF", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "a note here to remember that padding must consider notes too", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 425, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 5, + "level": 2 + }, + { + "id": "a", + "type": "", + "pos": { + "x": 313, + "y": 50 + }, + "width": 150, + "height": 126, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 12, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "a.note", + "type": "rectangle", + "pos": { + "x": 319, + "y": 692 + }, + "width": 137, + "height": 190, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#FFFFFF", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "just\na\nlong\nnote\nhere", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 37, + "labelHeight": 90, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 5, + "level": 2 + } + ], + "connections": [ + { + "id": "(a -> b)[0]", + "src": "a", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "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": 388, + "y": 306 + }, + { + "x": 75, + "y": 306 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "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": 75, + "y": 176 + }, + { + "x": 75, + "y": 1012 + } + ], + "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": 388, + "y": 176 + }, + { + "x": 388, + "y": 1012 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 2 + } + ] +} diff --git a/e2etests/testdata/stable/sequence_diagram_long_note/elk/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_long_note/elk/sketch.exp.svg new file mode 100644 index 000000000..d73943b18 --- /dev/null +++ b/e2etests/testdata/stable/sequence_diagram_long_note/elk/sketch.exp.svg @@ -0,0 +1,24 @@ + +ba a note here to remember that padding must consider notes toojustalongnotehere \ No newline at end of file diff --git a/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/sketch.exp.svg index f2bb4e085..a35a7be98 100644 --- a/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_nested_span/dagre/sketch.exp.svg @@ -2,7 +2,7 @@ abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier + + abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier - - +abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place + + + + + + + + + + + + + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place + + + + + + + + + + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response - - - - - - - - - +AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response + + + + + + + + + AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response - - - - - - - - - +AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + bacthis is a message groupand this is a nested message groupwhat about more nestingyoyo \ No newline at end of file diff --git a/e2etests/testdata/todo/sequence_diagram_actor_padding_nested_groups/elk/board.exp.json b/e2etests/testdata/todo/sequence_diagram_actor_padding_nested_groups/elk/board.exp.json new file mode 100644 index 000000000..2a26b1e83 --- /dev/null +++ b/e2etests/testdata/todo/sequence_diagram_actor_padding_nested_groups/elk/board.exp.json @@ -0,0 +1,665 @@ +{ + "name": "", + "shapes": [ + { + "id": "b", + "type": "", + "pos": { + "x": 0, + "y": 50 + }, + "width": 150, + "height": 126, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 13, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "a", + "type": "", + "pos": { + "x": 250, + "y": 50 + }, + "width": 150, + "height": 126, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 12, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "", + "pos": { + "x": 500, + "y": 50 + }, + "width": 150, + "height": 126, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 12, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "this is a message group", + "type": "", + "pos": { + "x": -71, + "y": 396 + }, + "width": 542, + "height": 696, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "this is a message group", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 160, + "labelHeight": 26, + "zIndex": 1, + "level": 1 + }, + { + "id": "this is a message group.and this is a nested message group", + "type": "", + "pos": { + "x": -47, + "y": 526 + }, + "width": 494, + "height": 542, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#FFFFFF", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "and this is a nested message group", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 238, + "labelHeight": 26, + "zIndex": 1, + "level": 2 + }, + { + "id": "this is a message group.and this is a nested message group.what about more nesting", + "type": "", + "pos": { + "x": -23, + "y": 656 + }, + "width": 446, + "height": 388, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EEF1F8", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "what about more nesting", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 173, + "labelHeight": 26, + "zIndex": 1, + "level": 3 + }, + { + "id": "this is a message group.and this is a nested message group.what about more nesting.yo", + "type": "", + "pos": { + "x": 1, + "y": 786 + }, + "width": 398, + "height": 234, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#FFFFFF", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "yo", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 21, + "labelHeight": 26, + "zIndex": 1, + "level": 4 + }, + { + "id": "this is a message group.and this is a nested message group.what about more nesting.yo.yo", + "type": "", + "pos": { + "x": 25, + "y": 916 + }, + "width": 350, + "height": 80, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EEF1F8", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "fields": null, + "methods": null, + "columns": null, + "label": "yo", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 21, + "labelHeight": 26, + "zIndex": 1, + "level": 5 + } + ], + "connections": [ + { + "id": "(b -> c)[0]", + "src": "b", + "srcArrow": "none", + "srcLabel": "", + "dst": "c", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "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": 75, + "y": 306 + }, + { + "x": 575, + "y": 306 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(a -> b)[0]", + "src": "a", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "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": 325, + "y": 436 + }, + { + "x": 75, + "y": 436 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(a -> b)[1]", + "src": "a", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "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": 325, + "y": 566 + }, + { + "x": 75, + "y": 566 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(a -> b)[2]", + "src": "a", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "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": 325, + "y": 696 + }, + { + "x": 75, + "y": 696 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(a -> b)[3]", + "src": "a", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "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": 325, + "y": 826 + }, + { + "x": 75, + "y": 826 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "id": "(a -> b)[4]", + "src": "a", + "srcArrow": "none", + "srcLabel": "", + "dst": "b", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "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": 325, + "y": 956 + }, + { + "x": 75, + "y": 956 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 4 + }, + { + "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": 75, + "y": 176 + }, + { + "x": 75, + "y": 1086 + } + ], + "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": 325, + "y": 176 + }, + { + "x": 325, + "y": 1086 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 2 + }, + { + "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": 575, + "y": 176 + }, + { + "x": 575, + "y": 1086 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 2 + } + ] +} diff --git a/e2etests/testdata/todo/sequence_diagram_actor_padding_nested_groups/elk/sketch.exp.svg b/e2etests/testdata/todo/sequence_diagram_actor_padding_nested_groups/elk/sketch.exp.svg new file mode 100644 index 000000000..7663e9dd0 --- /dev/null +++ b/e2etests/testdata/todo/sequence_diagram_actor_padding_nested_groups/elk/sketch.exp.svg @@ -0,0 +1,24 @@ + +bacthis is a message groupand this is a nested message groupwhat about more nestingyoyo \ No newline at end of file diff --git a/e2etests/todo_test.go b/e2etests/todo_test.go index a0cecce13..cc15f14ec 100644 --- a/e2etests/todo_test.go +++ b/e2etests/todo_test.go @@ -66,6 +66,29 @@ ninety nine: { } } `, + }, { + // as nesting gets deeper, the groups advance towards `c` and may overlap its lifeline + // needs to consider the group size when computing the distance from `a` to `c` + // a similar effect can be seen for spans + name: "sequence_diagram_actor_padding_nested_groups", + script: `shape: sequence_diagram +b;a;c +b -> c +this is a message group: { + _.a -> _.b + and this is a nested message group: { + _._.a -> _._.b + what about more nesting: { + _._._.a -> _._._.b + yo: { + _._._._.a -> _._._._.b + yo: { + _._._._._.a -> _._._._._.b + } + } + } + } +}`, }, }