From 88e71c30888cc1c4ab3e838be26fb7a4df328e07 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 19 Apr 2023 13:49:56 -0700 Subject: [PATCH] fix elk self loop spacing --- ci/release/changelogs/next.md | 3 + d2layouts/d2elklayout/layout.go | 28 +- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 79993 -> 79993 bytes e2etests/stable_test.go | 7 +- e2etests/testdata/files/ent2d2_basic.d2 | 2 +- e2etests/testdata/files/ent2d2_right.d2 | 99 ++ .../stable/ent2d2_basic/dagre/board.exp.json | 34 +- .../stable/ent2d2_basic/dagre/sketch.exp.svg | 160 +-- .../stable/ent2d2_basic/elk/board.exp.json | 36 +- .../stable/ent2d2_basic/elk/sketch.exp.svg | 162 +-- .../stable/ent2d2_right/dagre/board.exp.json | 1106 +++++++++++++++++ .../stable/ent2d2_right/dagre/sketch.exp.svg | 108 ++ .../stable/ent2d2_right/elk/board.exp.json | 1019 +++++++++++++++ .../stable/ent2d2_right/elk/sketch.exp.svg | 108 ++ .../self-referencing/elk/board.exp.json | 62 +- .../self-referencing/elk/sketch.exp.svg | 162 +-- 16 files changed, 2783 insertions(+), 313 deletions(-) create mode 100644 e2etests/testdata/files/ent2d2_right.d2 create mode 100644 e2etests/testdata/stable/ent2d2_right/dagre/board.exp.json create mode 100644 e2etests/testdata/stable/ent2d2_right/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/stable/ent2d2_right/elk/board.exp.json create mode 100644 e2etests/testdata/stable/ent2d2_right/elk/sketch.exp.svg diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 4a1a80dd2..331845212 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -2,6 +2,9 @@ #### Improvements 🧹 +- ELK self loops get distributed around the object instead of stacking [#1232](https://github.com/terrastruct/d2/pull/1232) + #### Bugfixes ⛑️ - Fixes an issue with markdown labels that are empty when rendered [#1223](https://github.com/terrastruct/d2/issues/1223) +- ELK self loops always have enough space for long labels [#1232](https://github.com/terrastruct/d2/pull/1232) diff --git a/d2layouts/d2elklayout/layout.go b/d2layouts/d2elklayout/layout.go index 1f21f3d08..e6a42c762 100644 --- a/d2layouts/d2elklayout/layout.go +++ b/d2layouts/d2elklayout/layout.go @@ -109,6 +109,8 @@ type elkOpts struct { ForceNodeModelOrder bool `json:"elk.layered.crossingMinimization.forceNodeModelOrder,omitempty"` ConsiderModelOrder string `json:"elk.layered.considerModelOrder.strategy,omitempty"` + SelfLoopDistribution string `json:"elk.layered.edgeRouting.selfLoopDistribution,omitempty"` + NodeSizeConstraints string `json:"elk.nodeSize.constraints,omitempty"` ContentAlignment string `json:"elk.contentAlignment,omitempty"` NodeSizeMinimum string `json:"elk.nodeSize.minimum,omitempty"` @@ -159,6 +161,10 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err }, }, } + if elkGraph.LayoutOptions.ConfigurableOpts.SelfLoopSpacing == DefaultOpts.SelfLoopSpacing { + // +5 for a tiny bit of padding + elkGraph.LayoutOptions.ConfigurableOpts.SelfLoopSpacing = go2.Max(elkGraph.LayoutOptions.ConfigurableOpts.SelfLoopSpacing, childrenMaxSelfLoop(g.Root, g.Root.Direction.Value == "down" || g.Root.Direction.Value == "" || g.Root.Direction.Value == "up")/2+5) + } switch g.Root.Direction.Value { case "down": elkGraph.LayoutOptions.Direction = "DOWN" @@ -239,6 +245,9 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err Padding: opts.Padding, }, } + if n.LayoutOptions.ConfigurableOpts.SelfLoopSpacing == DefaultOpts.SelfLoopSpacing { + n.LayoutOptions.ConfigurableOpts.SelfLoopSpacing = go2.Max(n.LayoutOptions.ConfigurableOpts.SelfLoopSpacing, childrenMaxSelfLoop(obj, g.Root.Direction.Value == "down" || g.Root.Direction.Value == "" || g.Root.Direction.Value == "up")/2+5) + } switch elkGraph.LayoutOptions.Direction { case "DOWN", "UP": @@ -277,7 +286,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err } } else { n.LayoutOptions = &elkOpts{ - // Margins: "[top=100,left=100,bottom=100,right=100]", + SelfLoopDistribution: "EQUALLY", } } @@ -725,3 +734,20 @@ func countEdgeIntersects(g *d2graph.Graph, sEdge *d2graph.Edge, s geo.Segment) ( } return crossingsCount, overlapsCount, closeOverlapsCount, touchingCount } + +func childrenMaxSelfLoop(parent *d2graph.Object, isWidth bool) int { + max := 0 + for _, ch := range parent.Children { + for _, e := range parent.Graph.Edges { + if e.Src == e.Dst && e.Src == ch && e.Label.Value != "" { + if isWidth { + max = go2.Max(max, e.LabelDimensions.Width) + } else { + max = go2.Max(max, e.LabelDimensions.Height) + } + } + } + } + + return max +} diff --git a/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf index 4d217cc0b0e133cf5e569bbab8156d55d1698f5b..05a877952a2f44625e26d87765d89285671f5396 100644 GIT binary patch delta 68 zcmezQf#v51mWC~it|rsVO&Im3JDV^XO y: { style.stroke: green } - + y -> z: { style.stroke: red } - + legend: { near: bottom-center color1: foo { shape: text style.font-color: green } - + color2: bar { shape: text style.font-color: red @@ -2593,6 +2593,7 @@ scenarios: { loadFromFile(t, "grid_animated"), loadFromFile(t, "grid_gap"), loadFromFile(t, "ent2d2_basic"), + loadFromFile(t, "ent2d2_right"), } runa(t, tcs) diff --git a/e2etests/testdata/files/ent2d2_basic.d2 b/e2etests/testdata/files/ent2d2_basic.d2 index d6a4fdee9..d92934b03 100644 --- a/e2etests/testdata/files/ent2d2_basic.d2 +++ b/e2etests/testdata/files/ent2d2_basic.d2 @@ -8,7 +8,7 @@ User <-> User: "spouse" { shape: cf-one } } -User <-> User: "children/parent" { +User <-> User: "children/parent/ancestor" { # o2m optional source-arrowhead: { shape: cf-one-required diff --git a/e2etests/testdata/files/ent2d2_right.d2 b/e2etests/testdata/files/ent2d2_right.d2 new file mode 100644 index 000000000..6bd62f4ce --- /dev/null +++ b/e2etests/testdata/files/ent2d2_right.d2 @@ -0,0 +1,99 @@ +direction: right +# Edges +User <-> User: "spouse\nspouse" { + # o2o optional + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-one + } +} +User <-> User: "children\nparent\nyo\nwhoa\nhey" { + # o2m optional + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-many + } +} +User <-> Pet: "pets/owner" { + # o2m optional + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-many + } +} +User <-> Card: "card/owner" { + # o2o optional + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-one + } +} +User <-> Post: "posts/author" { + # o2m optional + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-many + } +} +User <-> Metadata: "metadata/user" { + # o2m optional + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-many + } +} +User <-> Info: "info/user" { + # o2m optional + source-arrowhead: { + shape: cf-one-required + } + target-arrowhead: { + shape: cf-many + } +} + +# Tables +Card: { + shape: sql_table + id: int {constraint: primary_key} + owner_id: int {constraint: foreign_key} +} +Info: { + shape: sql_table + id: int {constraint: primary_key} + content: json.RawMessage +} +Metadata: { + shape: sql_table + id: int {constraint: primary_key} + age: int +} +Pet: { + shape: sql_table + id: int {constraint: primary_key} + owner_id: int {constraint: foreign_key} +} +Post: { + shape: sql_table + id: int {constraint: primary_key} + text: string + author_id: int {constraint: foreign_key} +} +User: { + shape: sql_table + id: int {constraint: primary_key} + parent_id: int {constraint: foreign_key} + spouse_id: int {constraint: foreign_key} +} diff --git a/e2etests/testdata/stable/ent2d2_basic/dagre/board.exp.json b/e2etests/testdata/stable/ent2d2_basic/dagre/board.exp.json index be03ffb3a..b2ce90df8 100644 --- a/e2etests/testdata/stable/ent2d2_basic/dagre/board.exp.json +++ b/e2etests/testdata/stable/ent2d2_basic/dagre/board.exp.json @@ -755,7 +755,7 @@ "strokeWidth": 2, "stroke": "B1", "borderRadius": 10, - "label": "children/parent", + "label": "children/parent/ancestor", "fontSize": 16, "fontFamily": "DEFAULT", "language": "", @@ -763,62 +763,62 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 104, + "labelWidth": 167, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, "route": [ { "x": 770.5, - "y": 38.698727015558696 + "y": 41.42337662337662 }, { - "x": 871.8333333333333, - "y": 7.739745403111737 + "x": 888.6333333333333, + "y": 8.28467532467532 }, { - "x": 903.5, + "x": 925.55, "y": 0 }, { - "x": 913, + "x": 936.625, "y": 0 }, { - "x": 922.5, + "x": 947.7, "y": 0 }, { - "x": 935.1666666666667, + "x": 962.4666666666667, "y": 14.4 }, { - "x": 944.6666666666667, + "x": 973.5416666666667, "y": 36 }, { - "x": 954.1666666666666, + "x": 984.6166666666667, "y": 57.6 }, { - "x": 954.1666666666666, + "x": 984.6166666666667, "y": 86.4 }, { - "x": 944.6666666666667, + "x": 973.5416666666667, "y": 108 }, { - "x": 935.1666666666667, + "x": 962.4666666666667, "y": 129.6 }, { - "x": 871.8333333333333, - "y": 136.26025459688827 + "x": 888.6333333333333, + "y": 135.71532467532467 }, { "x": 770.5, - "y": 105.30127298444131 + "y": 102.57662337662339 } ], "isCurve": true, diff --git a/e2etests/testdata/stable/ent2d2_basic/dagre/sketch.exp.svg b/e2etests/testdata/stable/ent2d2_basic/dagre/sketch.exp.svg index c7463534e..e820b5b57 100644 --- a/e2etests/testdata/stable/ent2d2_basic/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/ent2d2_basic/dagre/sketch.exp.svg @@ -1,16 +1,16 @@ -UseridintPKparent_idintFKspouse_idintFKPetidintPKowner_idintFKCardidintPKowner_idintFKPostidintPKtextstringauthor_idintFKMetadataidintPKageintInfoidintPKcontentjson.RawMessage spouse children/parentpets/ownercard/ownerposts/authormetadata/userinfo/user + .d2-1012858411 .fill-N1{fill:#0A0F25;} + .d2-1012858411 .fill-N2{fill:#676C7E;} + .d2-1012858411 .fill-N3{fill:#9499AB;} + .d2-1012858411 .fill-N4{fill:#CFD2DD;} + .d2-1012858411 .fill-N5{fill:#DEE1EB;} + .d2-1012858411 .fill-N6{fill:#EEF1F8;} + .d2-1012858411 .fill-N7{fill:#FFFFFF;} + .d2-1012858411 .fill-B1{fill:#0D32B2;} + .d2-1012858411 .fill-B2{fill:#0D32B2;} + .d2-1012858411 .fill-B3{fill:#E3E9FD;} + .d2-1012858411 .fill-B4{fill:#E3E9FD;} + .d2-1012858411 .fill-B5{fill:#EDF0FD;} + .d2-1012858411 .fill-B6{fill:#F7F8FE;} + .d2-1012858411 .fill-AA2{fill:#4A6FF3;} + .d2-1012858411 .fill-AA4{fill:#EDF0FD;} + .d2-1012858411 .fill-AA5{fill:#F7F8FE;} + .d2-1012858411 .fill-AB4{fill:#EDF0FD;} + .d2-1012858411 .fill-AB5{fill:#F7F8FE;} + .d2-1012858411 .stroke-N1{stroke:#0A0F25;} + .d2-1012858411 .stroke-N2{stroke:#676C7E;} + .d2-1012858411 .stroke-N3{stroke:#9499AB;} + .d2-1012858411 .stroke-N4{stroke:#CFD2DD;} + .d2-1012858411 .stroke-N5{stroke:#DEE1EB;} + .d2-1012858411 .stroke-N6{stroke:#EEF1F8;} + .d2-1012858411 .stroke-N7{stroke:#FFFFFF;} + .d2-1012858411 .stroke-B1{stroke:#0D32B2;} + .d2-1012858411 .stroke-B2{stroke:#0D32B2;} + .d2-1012858411 .stroke-B3{stroke:#E3E9FD;} + .d2-1012858411 .stroke-B4{stroke:#E3E9FD;} + .d2-1012858411 .stroke-B5{stroke:#EDF0FD;} + .d2-1012858411 .stroke-B6{stroke:#F7F8FE;} + .d2-1012858411 .stroke-AA2{stroke:#4A6FF3;} + .d2-1012858411 .stroke-AA4{stroke:#EDF0FD;} + .d2-1012858411 .stroke-AA5{stroke:#F7F8FE;} + .d2-1012858411 .stroke-AB4{stroke:#EDF0FD;} + .d2-1012858411 .stroke-AB5{stroke:#F7F8FE;} + .d2-1012858411 .background-color-N1{background-color:#0A0F25;} + .d2-1012858411 .background-color-N2{background-color:#676C7E;} + .d2-1012858411 .background-color-N3{background-color:#9499AB;} + .d2-1012858411 .background-color-N4{background-color:#CFD2DD;} + .d2-1012858411 .background-color-N5{background-color:#DEE1EB;} + .d2-1012858411 .background-color-N6{background-color:#EEF1F8;} + .d2-1012858411 .background-color-N7{background-color:#FFFFFF;} + .d2-1012858411 .background-color-B1{background-color:#0D32B2;} + .d2-1012858411 .background-color-B2{background-color:#0D32B2;} + .d2-1012858411 .background-color-B3{background-color:#E3E9FD;} + .d2-1012858411 .background-color-B4{background-color:#E3E9FD;} + .d2-1012858411 .background-color-B5{background-color:#EDF0FD;} + .d2-1012858411 .background-color-B6{background-color:#F7F8FE;} + .d2-1012858411 .background-color-AA2{background-color:#4A6FF3;} + .d2-1012858411 .background-color-AA4{background-color:#EDF0FD;} + .d2-1012858411 .background-color-AA5{background-color:#F7F8FE;} + .d2-1012858411 .background-color-AB4{background-color:#EDF0FD;} + .d2-1012858411 .background-color-AB5{background-color:#F7F8FE;} + .d2-1012858411 .color-N1{color:#0A0F25;} + .d2-1012858411 .color-N2{color:#676C7E;} + .d2-1012858411 .color-N3{color:#9499AB;} + .d2-1012858411 .color-N4{color:#CFD2DD;} + .d2-1012858411 .color-N5{color:#DEE1EB;} + .d2-1012858411 .color-N6{color:#EEF1F8;} + .d2-1012858411 .color-N7{color:#FFFFFF;} + .d2-1012858411 .color-B1{color:#0D32B2;} + .d2-1012858411 .color-B2{color:#0D32B2;} + .d2-1012858411 .color-B3{color:#E3E9FD;} + .d2-1012858411 .color-B4{color:#E3E9FD;} + .d2-1012858411 .color-B5{color:#EDF0FD;} + .d2-1012858411 .color-B6{color:#F7F8FE;} + .d2-1012858411 .color-AA2{color:#4A6FF3;} + .d2-1012858411 .color-AA4{color:#EDF0FD;} + .d2-1012858411 .color-AA5{color:#F7F8FE;} + .d2-1012858411 .color-AB4{color:#EDF0FD;} + .d2-1012858411 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>UseridintPKparent_idintFKspouse_idintFKPetidintPKowner_idintFKCardidintPKowner_idintFKPostidintPKtextstringauthor_idintFKMetadataidintPKageintInfoidintPKcontentjson.RawMessage spouse children/parent/ancestorpets/ownercard/ownerposts/authormetadata/userinfo/user - + diff --git a/e2etests/testdata/stable/ent2d2_basic/elk/board.exp.json b/e2etests/testdata/stable/ent2d2_basic/elk/board.exp.json index 5468008d2..fbf27f13b 100644 --- a/e2etests/testdata/stable/ent2d2_basic/elk/board.exp.json +++ b/e2etests/testdata/stable/ent2d2_basic/elk/board.exp.json @@ -687,19 +687,19 @@ "route": [ { "x": 453.5, - "y": 69.6 + "y": 60 }, { - "x": 403.5, - "y": 69.6 + "x": 365.5, + "y": 60 }, { - "x": 403.5, - "y": 98.4 + "x": 365.5, + "y": 108 }, { "x": 453.5, - "y": 98.4 + "y": 108 } ], "animated": false, @@ -718,7 +718,7 @@ "strokeWidth": 2, "stroke": "B1", "borderRadius": 10, - "label": "children/parent", + "label": "children/parent/ancestor", "fontSize": 16, "fontFamily": "DEFAULT", "language": "", @@ -726,26 +726,26 @@ "italic": true, "bold": false, "underline": false, - "labelWidth": 104, + "labelWidth": 167, "labelHeight": 21, "labelPosition": "INSIDE_MIDDLE_CENTER", "labelPercentage": 0, "route": [ { - "x": 453.5, - "y": 40.8 + "x": 733.5, + "y": 108 }, { - "x": 343.5, - "y": 40.8 + "x": 821.5, + "y": 108 }, { - "x": 343.5, - "y": 127.2 + "x": 821.5, + "y": 60 }, { - "x": 453.5, - "y": 127.2 + "x": 733.5, + "y": 60 } ], "animated": false, @@ -778,11 +778,11 @@ "labelPercentage": 0, "route": [ { - "x": 500.16666666666663, + "x": 500.1666666666667, "y": 156 }, { - "x": 500.16666666666663, + "x": 500.1666666666667, "y": 196 }, { diff --git a/e2etests/testdata/stable/ent2d2_basic/elk/sketch.exp.svg b/e2etests/testdata/stable/ent2d2_basic/elk/sketch.exp.svg index 9d0008817..a6417eaa8 100644 --- a/e2etests/testdata/stable/ent2d2_basic/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/ent2d2_basic/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -UseridintPKparent_idintFKspouse_idintFKPetidintPKowner_idintFKCardidintPKowner_idintFKPostidintPKtextstringauthor_idintFKMetadataidintPKageintInfoidintPKcontentjson.RawMessage spouse children/parentpets/ownercard/ownerposts/authormetadata/userinfo/user + .d2-1921105543 .fill-N1{fill:#0A0F25;} + .d2-1921105543 .fill-N2{fill:#676C7E;} + .d2-1921105543 .fill-N3{fill:#9499AB;} + .d2-1921105543 .fill-N4{fill:#CFD2DD;} + .d2-1921105543 .fill-N5{fill:#DEE1EB;} + .d2-1921105543 .fill-N6{fill:#EEF1F8;} + .d2-1921105543 .fill-N7{fill:#FFFFFF;} + .d2-1921105543 .fill-B1{fill:#0D32B2;} + .d2-1921105543 .fill-B2{fill:#0D32B2;} + .d2-1921105543 .fill-B3{fill:#E3E9FD;} + .d2-1921105543 .fill-B4{fill:#E3E9FD;} + .d2-1921105543 .fill-B5{fill:#EDF0FD;} + .d2-1921105543 .fill-B6{fill:#F7F8FE;} + .d2-1921105543 .fill-AA2{fill:#4A6FF3;} + .d2-1921105543 .fill-AA4{fill:#EDF0FD;} + .d2-1921105543 .fill-AA5{fill:#F7F8FE;} + .d2-1921105543 .fill-AB4{fill:#EDF0FD;} + .d2-1921105543 .fill-AB5{fill:#F7F8FE;} + .d2-1921105543 .stroke-N1{stroke:#0A0F25;} + .d2-1921105543 .stroke-N2{stroke:#676C7E;} + .d2-1921105543 .stroke-N3{stroke:#9499AB;} + .d2-1921105543 .stroke-N4{stroke:#CFD2DD;} + .d2-1921105543 .stroke-N5{stroke:#DEE1EB;} + .d2-1921105543 .stroke-N6{stroke:#EEF1F8;} + .d2-1921105543 .stroke-N7{stroke:#FFFFFF;} + .d2-1921105543 .stroke-B1{stroke:#0D32B2;} + .d2-1921105543 .stroke-B2{stroke:#0D32B2;} + .d2-1921105543 .stroke-B3{stroke:#E3E9FD;} + .d2-1921105543 .stroke-B4{stroke:#E3E9FD;} + .d2-1921105543 .stroke-B5{stroke:#EDF0FD;} + .d2-1921105543 .stroke-B6{stroke:#F7F8FE;} + .d2-1921105543 .stroke-AA2{stroke:#4A6FF3;} + .d2-1921105543 .stroke-AA4{stroke:#EDF0FD;} + .d2-1921105543 .stroke-AA5{stroke:#F7F8FE;} + .d2-1921105543 .stroke-AB4{stroke:#EDF0FD;} + .d2-1921105543 .stroke-AB5{stroke:#F7F8FE;} + .d2-1921105543 .background-color-N1{background-color:#0A0F25;} + .d2-1921105543 .background-color-N2{background-color:#676C7E;} + .d2-1921105543 .background-color-N3{background-color:#9499AB;} + .d2-1921105543 .background-color-N4{background-color:#CFD2DD;} + .d2-1921105543 .background-color-N5{background-color:#DEE1EB;} + .d2-1921105543 .background-color-N6{background-color:#EEF1F8;} + .d2-1921105543 .background-color-N7{background-color:#FFFFFF;} + .d2-1921105543 .background-color-B1{background-color:#0D32B2;} + .d2-1921105543 .background-color-B2{background-color:#0D32B2;} + .d2-1921105543 .background-color-B3{background-color:#E3E9FD;} + .d2-1921105543 .background-color-B4{background-color:#E3E9FD;} + .d2-1921105543 .background-color-B5{background-color:#EDF0FD;} + .d2-1921105543 .background-color-B6{background-color:#F7F8FE;} + .d2-1921105543 .background-color-AA2{background-color:#4A6FF3;} + .d2-1921105543 .background-color-AA4{background-color:#EDF0FD;} + .d2-1921105543 .background-color-AA5{background-color:#F7F8FE;} + .d2-1921105543 .background-color-AB4{background-color:#EDF0FD;} + .d2-1921105543 .background-color-AB5{background-color:#F7F8FE;} + .d2-1921105543 .color-N1{color:#0A0F25;} + .d2-1921105543 .color-N2{color:#676C7E;} + .d2-1921105543 .color-N3{color:#9499AB;} + .d2-1921105543 .color-N4{color:#CFD2DD;} + .d2-1921105543 .color-N5{color:#DEE1EB;} + .d2-1921105543 .color-N6{color:#EEF1F8;} + .d2-1921105543 .color-N7{color:#FFFFFF;} + .d2-1921105543 .color-B1{color:#0D32B2;} + .d2-1921105543 .color-B2{color:#0D32B2;} + .d2-1921105543 .color-B3{color:#E3E9FD;} + .d2-1921105543 .color-B4{color:#E3E9FD;} + .d2-1921105543 .color-B5{color:#EDF0FD;} + .d2-1921105543 .color-B6{color:#F7F8FE;} + .d2-1921105543 .color-AA2{color:#4A6FF3;} + .d2-1921105543 .color-AA4{color:#EDF0FD;} + .d2-1921105543 .color-AA5{color:#F7F8FE;} + .d2-1921105543 .color-AB4{color:#EDF0FD;} + .d2-1921105543 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>UseridintPKparent_idintFKspouse_idintFKPetidintPKowner_idintFKCardidintPKowner_idintFKPostidintPKtextstringauthor_idintFKMetadataidintPKageintInfoidintPKcontentjson.RawMessage spouse children/parent/ancestorpets/ownercard/ownerposts/authormetadata/userinfo/user - - + + diff --git a/e2etests/testdata/stable/ent2d2_right/dagre/board.exp.json b/e2etests/testdata/stable/ent2d2_right/dagre/board.exp.json new file mode 100644 index 000000000..e3cd89886 --- /dev/null +++ b/e2etests/testdata/stable/ent2d2_right/dagre/board.exp.json @@ -0,0 +1,1106 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "User", + "type": "sql_table", + "pos": { + "x": 0, + "y": 231 + }, + "width": 218, + "height": 144, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "parent_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 80, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + }, + { + "name": { + "label": "spouse_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 85, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + } + ], + "label": "User", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 49, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Pet", + "type": "sql_table", + "pos": { + "x": 517, + "y": 0 + }, + "width": 211, + "height": 108, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "owner_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 78, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + } + ], + "label": "Pet", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 35, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Card", + "type": "sql_table", + "pos": { + "x": 517, + "y": 146 + }, + "width": 211, + "height": 108, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "owner_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 78, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + } + ], + "label": "Card", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 49, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Post", + "type": "sql_table", + "pos": { + "x": 503, + "y": 274 + }, + "width": 239, + "height": 144, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "text", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 33, + "labelHeight": 26 + }, + "type": { + "label": "string", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 48, + "labelHeight": 26 + }, + "constraint": "", + "reference": "" + }, + { + "name": { + "label": "author_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 81, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + } + ], + "label": "Post", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 47, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Metadata", + "type": "sql_table", + "pos": { + "x": 541, + "y": 438 + }, + "width": 163, + "height": 108, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "age", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 30, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "", + "reference": "" + } + ], + "label": "Metadata", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 100, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Info", + "type": "sql_table", + "pos": { + "x": 460, + "y": 584 + }, + "width": 325, + "height": 108, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "content", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 66, + "labelHeight": 26 + }, + "type": { + "label": "json.RawMessage", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 149, + "labelHeight": 26 + }, + "constraint": "", + "reference": "" + } + ], + "label": "Info", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 42, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + } + ], + "connections": [ + { + "id": "(User <-> User)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "User", + "dstArrow": "cf-one", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "spouse\nspouse", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 48, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 52.67464114832535, + "y": 374.5 + }, + { + "x": 10.53492822966507, + "y": 428.3666666666667 + }, + { + "x": 0, + "y": 445.2 + }, + { + "x": 0, + "y": 450.25 + }, + { + "x": 0, + "y": 455.3 + }, + { + "x": 21.8, + "y": 462.03333333333336 + }, + { + "x": 54.5, + "y": 467.08333333333337 + }, + { + "x": 87.2, + "y": 472.1333333333333 + }, + { + "x": 130.8, + "y": 472.1333333333333 + }, + { + "x": 163.5, + "y": 467.08333333333337 + }, + { + "x": 196.2, + "y": 462.03333333333336 + }, + { + "x": 207.46507177033493, + "y": 428.3666666666667 + }, + { + "x": 165.32535885167465, + "y": 374.5 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> User)[1]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "User", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "children\nparent\nyo\nwhoa\nhey", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 54, + "labelHeight": 85, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 80.63373493975904, + "y": 374.5 + }, + { + "x": 16.126746987951805, + "y": 538.2333333333333 + }, + { + "x": 0, + "y": 589.4 + }, + { + "x": 0, + "y": 604.75 + }, + { + "x": 0, + "y": 620.1 + }, + { + "x": 21.8, + "y": 640.5666666666667 + }, + { + "x": 54.5, + "y": 655.9166666666667 + }, + { + "x": 87.2, + "y": 671.2666666666667 + }, + { + "x": 130.8, + "y": 671.2666666666667 + }, + { + "x": 163.5, + "y": 655.9166666666667 + }, + { + "x": 196.2, + "y": 640.5666666666667 + }, + { + "x": 201.8732530120482, + "y": 538.2333333333333 + }, + { + "x": 137.36626506024098, + "y": 374.5 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Pet)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Pet", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "pets/owner", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 77, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 175.63983903420524, + "y": 230.5 + }, + { + "x": 306.32796780684106, + "y": 89.29999999999998 + }, + { + "x": 374.6, + "y": 54 + }, + { + "x": 517, + "y": 54 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Card)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Card", + "dstArrow": "cf-one", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "card/owner", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 78, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 218, + "y": 253.92391304347825 + }, + { + "x": 314.8, + "y": 210.78478260869565 + }, + { + "x": 374.6, + "y": 200 + }, + { + "x": 517, + "y": 200 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Post)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Post", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "posts/author", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 88, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 218, + "y": 323.1152173913043 + }, + { + "x": 314.8, + "y": 341.42304347826087 + }, + { + "x": 371.8, + "y": 346 + }, + { + "x": 503, + "y": 346 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Metadata)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Metadata", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "metadata/user", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 101, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 197.38786279683376, + "y": 375.5 + }, + { + "x": 310.67757255936675, + "y": 468.7 + }, + { + "x": 379.4, + "y": 492 + }, + { + "x": 541, + "y": 492 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Info)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Info", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "info/user", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 158.3591654247392, + "y": 375.5 + }, + { + "x": 302.87183308494787, + "y": 585.5 + }, + { + "x": 363.2, + "y": 638 + }, + { + "x": 460, + "y": 638 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/stable/ent2d2_right/dagre/sketch.exp.svg b/e2etests/testdata/stable/ent2d2_right/dagre/sketch.exp.svg new file mode 100644 index 000000000..884d3e0fc --- /dev/null +++ b/e2etests/testdata/stable/ent2d2_right/dagre/sketch.exp.svg @@ -0,0 +1,108 @@ +UseridintPKparent_idintFKspouse_idintFKPetidintPKowner_idintFKCardidintPKowner_idintFKPostidintPKtextstringauthor_idintFKMetadataidintPKageintInfoidintPKcontentjson.RawMessage spousespouse childrenparentyowhoaheypets/ownercard/ownerposts/authormetadata/userinfo/user + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/ent2d2_right/elk/board.exp.json b/e2etests/testdata/stable/ent2d2_right/elk/board.exp.json new file mode 100644 index 000000000..6843f9ded --- /dev/null +++ b/e2etests/testdata/stable/ent2d2_right/elk/board.exp.json @@ -0,0 +1,1019 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "User", + "type": "sql_table", + "pos": { + "x": 12, + "y": 200 + }, + "width": 218, + "height": 280, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "parent_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 80, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + }, + { + "name": { + "label": "spouse_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 85, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + } + ], + "label": "User", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 49, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Pet", + "type": "sql_table", + "pos": { + "x": 531, + "y": 12 + }, + "width": 211, + "height": 108, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "owner_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 78, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + } + ], + "label": "Pet", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 35, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Card", + "type": "sql_table", + "pos": { + "x": 531, + "y": 140 + }, + "width": 211, + "height": 108, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "owner_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 78, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + } + ], + "label": "Card", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 49, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Post", + "type": "sql_table", + "pos": { + "x": 531, + "y": 268 + }, + "width": 239, + "height": 144, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "text", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 33, + "labelHeight": 26 + }, + "type": { + "label": "string", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 48, + "labelHeight": 26 + }, + "constraint": "", + "reference": "" + }, + { + "name": { + "label": "author_id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 81, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "foreign_key", + "reference": "" + } + ], + "label": "Post", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 47, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Metadata", + "type": "sql_table", + "pos": { + "x": 531, + "y": 432 + }, + "width": 163, + "height": 108, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "age", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 30, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "", + "reference": "" + } + ], + "label": "Metadata", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 100, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + }, + { + "id": "Info", + "type": "sql_table", + "pos": { + "x": 531, + "y": 560 + }, + "width": 325, + "height": 108, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "N1", + "stroke": "N7", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": [ + { + "name": { + "label": "id", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 15, + "labelHeight": 26 + }, + "type": { + "label": "int", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 23, + "labelHeight": 26 + }, + "constraint": "primary_key", + "reference": "" + }, + { + "name": { + "label": "content", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 66, + "labelHeight": 26 + }, + "type": { + "label": "json.RawMessage", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 149, + "labelHeight": 26 + }, + "constraint": "", + "reference": "" + } + ], + "label": "Info", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 42, + "labelHeight": 31, + "zIndex": 0, + "level": 1, + "primaryAccentColor": "B2", + "secondaryAccentColor": "AA2", + "neutralAccentColor": "N2" + } + ], + "connections": [ + { + "id": "(User <-> User)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "User", + "dstArrow": "cf-one", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "spouse\nspouse", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 48, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 84.66666666666666, + "y": 200 + }, + { + "x": 84.66666666666666, + "y": 150 + }, + { + "x": 157.33333333333331, + "y": 150 + }, + { + "x": 157.33333333333331, + "y": 200 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> User)[1]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "User", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "children\nparent\nyo\nwhoa\nhey", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 54, + "labelHeight": 85, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 157.33333333333331, + "y": 480 + }, + { + "x": 157.33333333333331, + "y": 530 + }, + { + "x": 84.66666666666666, + "y": 530 + }, + { + "x": 84.66666666666666, + "y": 480 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Pet)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Pet", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "pets/owner", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 77, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 230, + "y": 246.66666666666666 + }, + { + "x": 270, + "y": 246.66666666666666 + }, + { + "x": 270, + "y": 66 + }, + { + "x": 531, + "y": 66 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Card)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Card", + "dstArrow": "cf-one", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "card/owner", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 78, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 230, + "y": 293.3333333333333 + }, + { + "x": 320, + "y": 293.3333333333333 + }, + { + "x": 320, + "y": 194 + }, + { + "x": 531, + "y": 194 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Post)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Post", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "posts/author", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 88, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 230, + "y": 340 + }, + { + "x": 531, + "y": 340 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Metadata)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Metadata", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "metadata/user", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 101, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 230, + "y": 386.66666666666663 + }, + { + "x": 320, + "y": 386.66666666666663 + }, + { + "x": 320, + "y": 486 + }, + { + "x": 531, + "y": 486 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(User <-> Info)[0]", + "src": "User", + "srcArrow": "cf-one-required", + "dst": "Info", + "dstArrow": "cf-many", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "B1", + "borderRadius": 10, + "label": "info/user", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N2", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 60, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 230, + "y": 433.3333333333333 + }, + { + "x": 270, + "y": 433.3333333333333 + }, + { + "x": 270, + "y": 614 + }, + { + "x": 531, + "y": 614 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/stable/ent2d2_right/elk/sketch.exp.svg b/e2etests/testdata/stable/ent2d2_right/elk/sketch.exp.svg new file mode 100644 index 000000000..e0fdbba72 --- /dev/null +++ b/e2etests/testdata/stable/ent2d2_right/elk/sketch.exp.svg @@ -0,0 +1,108 @@ +UseridintPKparent_idintFKspouse_idintFKPetidintPKowner_idintFKCardidintPKowner_idintFKPostidintPKtextstringauthor_idintFKMetadataidintPKageintInfoidintPKcontentjson.RawMessage spousespouse childrenparentyowhoaheypets/ownercard/ownerposts/authormetadata/userinfo/user + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/stable/self-referencing/elk/board.exp.json b/e2etests/testdata/stable/self-referencing/elk/board.exp.json index 29a40166d..82b4208b8 100644 --- a/e2etests/testdata/stable/self-referencing/elk/board.exp.json +++ b/e2etests/testdata/stable/self-referencing/elk/board.exp.json @@ -7,7 +7,7 @@ "id": "x", "type": "rectangle", "pos": { - "x": 72, + "x": 62, "y": 12 }, "width": 120, @@ -48,7 +48,7 @@ "id": "y", "type": "rectangle", "pos": { - "x": 194, + "x": 209, "y": 158 }, "width": 80, @@ -89,7 +89,7 @@ "id": "z", "type": "rectangle", "pos": { - "x": 297, + "x": 337, "y": 12 }, "width": 80, @@ -153,20 +153,20 @@ "labelPercentage": 0, "route": [ { - "x": 72, - "y": 38.4 + "x": 62, + "y": 34 }, { - "x": 22, - "y": 38.4 + "x": 12, + "y": 34 }, { - "x": 22, - "y": 51.599999999999994 + "x": 12, + "y": 56 }, { - "x": 72, - "y": 51.599999999999994 + "x": 62, + "y": 56 } ], "animated": false, @@ -199,20 +199,20 @@ "labelPercentage": 0, "route": [ { - "x": 72, - "y": 25.2 + "x": 182, + "y": 56 }, { - "x": 12, - "y": 25.2 + "x": 232, + "y": 56 }, { - "x": 12, - "y": 64.8 + "x": 232, + "y": 34 }, { - "x": 72, - "y": 64.8 + "x": 182, + "y": 34 } ], "animated": false, @@ -245,19 +245,19 @@ "labelPercentage": 0, "route": [ { - "x": 132, + "x": 122, "y": 78 }, { - "x": 132, + "x": 122, "y": 118 }, { - "x": 221.16666666666663, + "x": 236.16666666666663, "y": 118 }, { - "x": 221.16666666666663, + "x": 236.16666666666663, "y": 158 } ], @@ -291,19 +291,19 @@ "labelPercentage": 0, "route": [ { - "x": 337, + "x": 377, "y": 78 }, { - "x": 337, + "x": 377, "y": 118 }, { - "x": 247.83333333333331, + "x": 262.8333333333333, "y": 118 }, { - "x": 247.83333333333331, + "x": 262.8333333333333, "y": 158 } ], @@ -337,19 +337,19 @@ "labelPercentage": 0, "route": [ { - "x": 297, + "x": 337, "y": 34 }, { - "x": 247, + "x": 287, "y": 34 }, { - "x": 247, + "x": 287, "y": 56 }, { - "x": 297, + "x": 337, "y": 56 } ], diff --git a/e2etests/testdata/stable/self-referencing/elk/sketch.exp.svg b/e2etests/testdata/stable/self-referencing/elk/sketch.exp.svg index db193f35c..74cce882c 100644 --- a/e2etests/testdata/stable/self-referencing/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/self-referencing/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -xyz hello - - + .d2-127389242 .fill-N1{fill:#0A0F25;} + .d2-127389242 .fill-N2{fill:#676C7E;} + .d2-127389242 .fill-N3{fill:#9499AB;} + .d2-127389242 .fill-N4{fill:#CFD2DD;} + .d2-127389242 .fill-N5{fill:#DEE1EB;} + .d2-127389242 .fill-N6{fill:#EEF1F8;} + .d2-127389242 .fill-N7{fill:#FFFFFF;} + .d2-127389242 .fill-B1{fill:#0D32B2;} + .d2-127389242 .fill-B2{fill:#0D32B2;} + .d2-127389242 .fill-B3{fill:#E3E9FD;} + .d2-127389242 .fill-B4{fill:#E3E9FD;} + .d2-127389242 .fill-B5{fill:#EDF0FD;} + .d2-127389242 .fill-B6{fill:#F7F8FE;} + .d2-127389242 .fill-AA2{fill:#4A6FF3;} + .d2-127389242 .fill-AA4{fill:#EDF0FD;} + .d2-127389242 .fill-AA5{fill:#F7F8FE;} + .d2-127389242 .fill-AB4{fill:#EDF0FD;} + .d2-127389242 .fill-AB5{fill:#F7F8FE;} + .d2-127389242 .stroke-N1{stroke:#0A0F25;} + .d2-127389242 .stroke-N2{stroke:#676C7E;} + .d2-127389242 .stroke-N3{stroke:#9499AB;} + .d2-127389242 .stroke-N4{stroke:#CFD2DD;} + .d2-127389242 .stroke-N5{stroke:#DEE1EB;} + .d2-127389242 .stroke-N6{stroke:#EEF1F8;} + .d2-127389242 .stroke-N7{stroke:#FFFFFF;} + .d2-127389242 .stroke-B1{stroke:#0D32B2;} + .d2-127389242 .stroke-B2{stroke:#0D32B2;} + .d2-127389242 .stroke-B3{stroke:#E3E9FD;} + .d2-127389242 .stroke-B4{stroke:#E3E9FD;} + .d2-127389242 .stroke-B5{stroke:#EDF0FD;} + .d2-127389242 .stroke-B6{stroke:#F7F8FE;} + .d2-127389242 .stroke-AA2{stroke:#4A6FF3;} + .d2-127389242 .stroke-AA4{stroke:#EDF0FD;} + .d2-127389242 .stroke-AA5{stroke:#F7F8FE;} + .d2-127389242 .stroke-AB4{stroke:#EDF0FD;} + .d2-127389242 .stroke-AB5{stroke:#F7F8FE;} + .d2-127389242 .background-color-N1{background-color:#0A0F25;} + .d2-127389242 .background-color-N2{background-color:#676C7E;} + .d2-127389242 .background-color-N3{background-color:#9499AB;} + .d2-127389242 .background-color-N4{background-color:#CFD2DD;} + .d2-127389242 .background-color-N5{background-color:#DEE1EB;} + .d2-127389242 .background-color-N6{background-color:#EEF1F8;} + .d2-127389242 .background-color-N7{background-color:#FFFFFF;} + .d2-127389242 .background-color-B1{background-color:#0D32B2;} + .d2-127389242 .background-color-B2{background-color:#0D32B2;} + .d2-127389242 .background-color-B3{background-color:#E3E9FD;} + .d2-127389242 .background-color-B4{background-color:#E3E9FD;} + .d2-127389242 .background-color-B5{background-color:#EDF0FD;} + .d2-127389242 .background-color-B6{background-color:#F7F8FE;} + .d2-127389242 .background-color-AA2{background-color:#4A6FF3;} + .d2-127389242 .background-color-AA4{background-color:#EDF0FD;} + .d2-127389242 .background-color-AA5{background-color:#F7F8FE;} + .d2-127389242 .background-color-AB4{background-color:#EDF0FD;} + .d2-127389242 .background-color-AB5{background-color:#F7F8FE;} + .d2-127389242 .color-N1{color:#0A0F25;} + .d2-127389242 .color-N2{color:#676C7E;} + .d2-127389242 .color-N3{color:#9499AB;} + .d2-127389242 .color-N4{color:#CFD2DD;} + .d2-127389242 .color-N5{color:#DEE1EB;} + .d2-127389242 .color-N6{color:#EEF1F8;} + .d2-127389242 .color-N7{color:#FFFFFF;} + .d2-127389242 .color-B1{color:#0D32B2;} + .d2-127389242 .color-B2{color:#0D32B2;} + .d2-127389242 .color-B3{color:#E3E9FD;} + .d2-127389242 .color-B4{color:#E3E9FD;} + .d2-127389242 .color-B5{color:#EDF0FD;} + .d2-127389242 .color-B6{color:#F7F8FE;} + .d2-127389242 .color-AA2{color:#4A6FF3;} + .d2-127389242 .color-AA4{color:#EDF0FD;} + .d2-127389242 .color-AA5{color:#F7F8FE;} + .d2-127389242 .color-AB4{color:#EDF0FD;} + .d2-127389242 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>xyz hello + + \ No newline at end of file