Repository: terrastruct/d2 (Go)

Issue:
elk layout seems to misplace edges on the playgroung
I have not confirmed if this is an actual issue with the latest code. Howver, when i do the below code and select elk layout on the playground this seems to be a bug somewhere.

My expectation was that edges will be properly drawn. The TALA layout does not seem to be affected by this issue.

```
main: {
  x -> y
  y <- z
}

root: {
  x -> y
  y <- z
}
```

output:

![image](https://user-images.githubusercontent.com/6591993/235331604-f2b7ee39-ae81-4e6b-8df3-74c77da5410f.png)





Discussion:
oh good find, strange. will look into it asap, thanks @ymolists 



Patch:
diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md
index 22c5210c2b..efa62a77e3 100644
--- a/ci/release/changelogs/next.md
+++ b/ci/release/changelogs/next.md
@@ -17,3 +17,4 @@
 - Fixes panic when setting `shape` to be `class` or `sql_table` within a class [#1251](https://github.com/terrastruct/d2/pull/1251)
 - Fixes rare panic exporting to gifs [#1257](https://github.com/terrastruct/d2/pull/1257)
 - Fixes bad performance in large grid diagrams [#1263](https://github.com/terrastruct/d2/pull/1263)
+- Fixes bug in ELK when container has ID "root" [#1268](https://github.com/terrastruct/d2/pull/1268)
diff --git a/d2layouts/d2elklayout/layout.go b/d2layouts/d2elklayout/layout.go
index c46ad58764..91da30b6fb 100644
--- a/d2layouts/d2elklayout/layout.go
+++ b/d2layouts/d2elklayout/layout.go
@@ -144,7 +144,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
 	}
 
 	elkGraph := &ELKGraph{
-		ID: "root",
+		ID: "",
 		LayoutOptions: &elkOpts{
 			Thoroughness:                 8,
 			EdgeEdgeBetweenLayersSpacing: 50,
@@ -432,7 +432,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
 
 		parentX := 0.0
 		parentY := 0.0
-		if e.Container != "root" {
+		if e.Container != "" {
 			parentX = byID[e.Container].TopLeft.X
 			parentY = byID[e.Container].TopLeft.Y
 		}


Test patch:
diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go
index 1e71d72025..a2d16828ff 100644
--- a/e2etests/regression_test.go
+++ b/e2etests/regression_test.go
@@ -89,6 +89,18 @@ b.1 -> b.1`,
 			script: `shape: sequence_diagram
 a: A
 b: B`,
+		},
+		{
+			name: "root-container",
+			script: `main: {
+  x -> y
+  y <- z
+}
+
+root: {
+  x -> y
+  y <- z
+}`,
 		},
 		{
 			name: "sequence_diagram_name_crash",
diff --git a/e2etests/testdata/regression/root-container/dagre/board.exp.json b/e2etests/testdata/regression/root-container/dagre/board.exp.json
new file mode 100644
index 0000000000..1c4bd7088a
--- /dev/null
+++ b/e2etests/testdata/regression/root-container/dagre/board.exp.json
@@ -0,0 +1,565 @@
+{
+  "name": "",
+  "isFolderOnly": false,
+  "fontFamily": "SourceSansPro",
+  "shapes": [
+    {
+      "id": "main",
+      "type": "rectangle",
+      "pos": {
+        "x": 0,
+        "y": 41
+      },
+      "width": 245,
+      "height": 291,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B4",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "main",
+      "fontSize": 28,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 57,
+      "labelHeight": 36,
+      "labelPosition": "OUTSIDE_TOP_CENTER",
+      "zIndex": 0,
+      "level": 1
+    },
+    {
+      "id": "main.x",
+      "type": "rectangle",
+      "pos": {
+        "x": 40,
+        "y": 70
+      },
+      "width": 53,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "x",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 8,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "main.y",
+      "type": "rectangle",
+      "pos": {
+        "x": 96,
+        "y": 236
+      },
+      "width": 54,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "y",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 9,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "main.z",
+      "type": "rectangle",
+      "pos": {
+        "x": 153,
+        "y": 70
+      },
+      "width": 52,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "z",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 7,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "root",
+      "type": "rectangle",
+      "pos": {
+        "x": 266,
+        "y": 41
+      },
+      "width": 245,
+      "height": 291,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B4",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "root",
+      "fontSize": 28,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 49,
+      "labelHeight": 36,
+      "labelPosition": "OUTSIDE_TOP_CENTER",
+      "zIndex": 0,
+      "level": 1
+    },
+    {
+      "id": "root.x",
+      "type": "rectangle",
+      "pos": {
+        "x": 306,
+        "y": 70
+      },
+      "width": 53,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "x",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 8,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "root.y",
+      "type": "rectangle",
+      "pos": {
+        "x": 362,
+        "y": 236
+      },
+      "width": 54,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "y",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 9,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "root.z",
+      "type": "rectangle",
+      "pos": {
+        "x": 419,
+        "y": 70
+      },
+      "width": 52,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "z",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 7,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    }
+  ],
+  "connections": [
+    {
+      "id": "main.(x -> y)[0]",
+      "src": "main.x",
+      "srcArrow": "none",
+      "dst": "main.y",
+      "dstArrow": "triangle",
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "stroke": "B1",
+      "borderRadius": 10,
+      "label": "",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N2",
+      "italic": true,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 0,
+      "labelHeight": 0,
+      "labelPosition": "",
+      "labelPercentage": 0,
+      "route": [
+        {
+          "x": 66.75,
+          "y": 136.5
+        },
+        {
+          "x": 66.75,
+          "y": 176.5
+        },
+        {
+          "x": 73.55,
+          "y": 196.5
+        },
+        {
+          "x": 100.75,
+          "y": 236.5
+        }
+      ],
+      "isCurve": true,
+      "animated": false,
+      "tooltip": "",
+      "icon": null,
+      "zIndex": 0
+    },
+    {
+      "id": "main.(y <- z)[0]",
+      "src": "main.y",
+      "srcArrow": "triangle",
+      "dst": "main.z",
+      "dstArrow": "none",
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "stroke": "B1",
+      "borderRadius": 10,
+      "label": "",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N2",
+      "italic": true,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 0,
+      "labelHeight": 0,
+      "labelPosition": "",
+      "labelPercentage": 0,
+      "route": [
+        {
+          "x": 145.3644578313253,
+          "y": 236.5
+        },
+        {
+          "x": 172.47289156626505,
+          "y": 196.5
+        },
+        {
+          "x": 179.25,
+          "y": 176.5
+        },
+        {
+          "x": 179.25,
+          "y": 136.5
+        }
+      ],
+      "isCurve": true,
+      "animated": false,
+      "tooltip": "",
+      "icon": null,
+      "zIndex": 0
+    },
+    {
+      "id": "root.(x -> y)[0]",
+      "src": "root.x",
+      "srcArrow": "none",
+      "dst": "root.y",
+      "dstArrow": "triangle",
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "stroke": "B1",
+      "borderRadius": 10,
+      "label": "",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N2",
+      "italic": true,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 0,
+      "labelHeight": 0,
+      "labelPosition": "",
+      "labelPercentage": 0,
+      "route": [
+        {
+          "x": 332.5,
+          "y": 136.5
+        },
+        {
+          "x": 332.5,
+          "y": 176.5
+        },
+        {
+          "x": 339.3,
+          "y": 196.5
+        },
+        {
+          "x": 366.5,
+          "y": 236.5
+        }
+      ],
+      "isCurve": true,
+      "animated": false,
+      "tooltip": "",
+      "icon": null,
+      "zIndex": 0
+    },
+    {
+      "id": "root.(y <- z)[0]",
+      "src": "root.y",
+      "srcArrow": "triangle",
+      "dst": "root.z",
+      "dstArrow": "none",
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "stroke": "B1",
+      "borderRadius": 10,
+      "label": "",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N2",
+      "italic": true,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 0,
+      "labelHeight": 0,
+      "labelPosition": "",
+      "labelPercentage": 0,
+      "route": [
+        {
+          "x": 411.1144578313253,
+          "y": 236.5
+        },
+        {
+          "x": 438.22289156626505,
+          "y": 196.5
+        },
+        {
+          "x": 445,
+          "y": 176.5
+        },
+        {
+          "x": 445,
+          "y": 136.5
+        }
+      ],
+      "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/regression/root-container/dagre/sketch.exp.svg b/e2etests/testdata/regression/root-container/dagre/sketch.exp.svg
new file mode 100644
index 0000000000..839884758d
--- /dev/null
+++ b/e2etests/testdata/regression/root-container/dagre/sketch.exp.svg
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" d2Version="v0.4.1-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 513 333"><svg id="d2-svg" class="d2-4051017789" width="513" height="333" viewBox="-1 0 513 333"><rect x="-1.000000" y="0.000000" width="513.000000" height="333.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
+.d2-4051017789 .text {
+	font-family: "d2-4051017789-font-regular";
+}
+@font-face {
+	font-family: d2-4051017789-font-regular;
+	src: url("data:application/font-woff;base64,d09GRgABAAAAAAjIAAoAAAAADgwAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXd/Vo2NtYXAAAAFUAAAAWwAAAGoBpQHTZ2x5ZgAAAbAAAAMFAAADlEJ8/rxoZWFkAAAEuAAAADYAAAA2G4Ue32hoZWEAAATwAAAAJAAAACQKhAXPaG10eAAABRQAAAA0AAAANBXXAmJsb2NhAAAFSAAAABwAAAAcBnIHRG1heHAAAAVkAAAAIAAAACAAJQD2bmFtZQAABYQAAAMjAAAIFAbDVU1wb3N0AAAIqAAAAB0AAAAg/9EAMgADAgkBkAAFAAACigJYAAAASwKKAlgAAAFeADIBIwAAAgsFAwMEAwICBGAAAvcAAAADAAAAAAAAAABBREJPAEAAIP//Au7/BgAAA9gBESAAAZ8AAAAAAeYClAAAACAAA3icTMsxCgIxAAXRl90Yo4jHs7e0EEEsxFMIimDnTb+Qaqd7xaCYFexUB+x1k+bo5OLq5pEwfB6+J/nlm0/eeeU57mXFZFatNGvdxpY/AAAA//8BAAD//x1VE2wAeJxMk81v23QYx5/Hce21dpqY+C2F1Im92CR1mzVO7NFkiZoXlnZplHkbLENMmiYtkwZIy6WahNhhSIwDGtJ2Q4Id+ANASOMOQoCEkLjAhSMylXZhoRxnIzsN9PTcPt+X3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Z3X+FJu2+DqeXa9e3luvz+/gyy80UTcvY1/a+G5fWLUb/58QMfNc3NbqndwTgv8AAAD//wEAAP//B1tMMAB4nGJgZgCD/+cYjBiwAAAAAAD//wEAAP//LwECAwAAAA==");
+}
+.d2-4051017789 .text-bold {
+	font-family: "d2-4051017789-font-bold";
+}
+@font-face {
+	font-family: d2-4051017789-font-bold;
+	src: url("data:application/font-woff;base64,d09GRgABAAAAAAjIAAoAAAAADiAAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXxHXrmNtYXAAAAFUAAAAWwAAAGoBpQHTZ2x5ZgAAAbAAAAMBAAADkL/JKvBoZWFkAAAEtAAAADYAAAA2G38e1GhoZWEAAATsAAAAJAAAACQKfwXMaG10eAAABRAAAAA0AAAANBeOAddsb2NhAAAFRAAAABwAAAAcBnAHQG1heHAAAAVgAAAAIAAAACAAJQD3bmFtZQAABYAAAAMoAAAIKgjwVkFwb3N0AAAIqAAAAB0AAAAg/9EAMgADAioCvAAFAAACigJYAAAASwKKAlgAAAFeADIBKQAAAgsHAwMEAwICBGAAAvcAAAADAAAAAAAAAABBREJPACAAIP//Au7/BgAAA9gBESAAAZ8AAAAAAfAClAAAACAAA3icTMsxCgIxAAXRl90Yo4jHs7e0EEEsxFMIimDnTb+Qaqd7xaCYFexUB+x1k+bo5OLq5pEwfB6+J/nlm0/eeeU57mXFZFatNGvdxpY/AAAA//8BAAD//x1VE2wAeJxUkz9sG2UYxp/38/nOdo6kZ/u7i9sYx/5yd7Fdu4mv54/Suo4lqxEQJyYRBIk/ERkYCKRVkypVF5ZMSFWRkiEsmWCDoRJLO4DEgpAYitqKCQkJZmSkiMk9o3MSKMPdO33P83uf7/kQRRdg62wfEcQxhiQ44Bl5w/ZcV2jSk1JYEemSoXVZMvjyC7eoFItKafIgd2dtjTrvsf1nH73dWV//e+3y5eDwwcPgLm09BBhKgyN6Qn1kIACr4PgX69JxREHV3Hrdq5ncEK5QVVmrS19Vedr8t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8xa8RVc8BM+BWKP5fOzYBdEmipJ8d+75851zvnOBHf5mm0r1IfBHPTFcYa9+bniLB/UTw9u061uGqzyp/Wm4RlibG67zea1n+CPeVn8z/ID96k+GH7JbbRv+mGfVHcOfbDv+Mvwp+7xd4Aq84FfDFXbJDG+xw4+Gt3mExaxUeUTTcI3P2DNcZw/oM6EgZkLCCMeQCSOumBGR4xMxY8KQiBBHhxYxhb4mBEKO0X9+DfApmBEo4pgCR4xPTEDO2CL+Iq+Uc2Uc6jSzuxYFYwIu5HFJQIIjZURKQsSl4hQUZLyiQYOcgfhmFOR45EyI8UiZMaJBlzan9BkzIcfRVqSSmU/KkIJrAuV3ZlF2ZkBEQm6srkgIxdOJXyTvDqc4umSyXY98uhHhSxzfybvklsr2Kzz9ujVmm3mXbALm6mesrsS6udYEx7ot87b4VrjgFe5e/dlk8v4ehfpfKPIFV5p/qEklYpLg3C4tfCnId49xHOncwVdHvqdDnxO6vKGvc4sePVqc0afDa/l26eH4mi5nHMujI7y4a0sxZ/yA4xs6siljR9afxcQifiYzdefiOFMdUzL1vGTuqdZIFd59wuUOpRvqyOUz0B6Vlk7zS7RnASNTRSaGU/VyqY3c+heaIqaqpZzt7X25DXPbveUW35Bqh0u1LjiVk1swet9UvXc0c60fj4CQlAtZDEiZ0qDgRrzPCbgixnGs7p1oSwpaK58yz41UEjEVgw6J4szI9Dcw3fjGfbChe2dvSSj/kunlqqr7ZHHq1e2M3qh7yzvfuhytTaBhU03X1DQQ18S0H2mn1vn78s31uqU85YiUmPBfL8AzPJrsc8AhY2UY6GZur0NTL0STlxyq+ksiWQ2l58giHODxnAMOeMnzd/q4ZOKMi1txWc/d4pgjuhx+UBUL+y5HvF59+/+sv4tpU7U4nq5OL+49xSd3UOsX2rPb97KniZWTmFu02604I2BacnG76zW5x3j/AAAA//8BAAD///S3T1F4nGJgZgCD/+cYjBiwAAAAAAD//wEAAP//LwECAwAAAA==");
+}]]></style><style type="text/css"><![CDATA[.shape {
+  shape-rendering: geometricPrecision;
+  stroke-linejoin: round;
+}
+.connection {
+  stroke-linecap: round;
+  stroke-linejoin: round;
+}
+.blend {
+  mix-blend-mode: multiply;
+  opacity: 0.5;
+}
+
+		.d2-4051017789 .fill-N1{fill:#0A0F25;}
+		.d2-4051017789 .fill-N2{fill:#676C7E;}
+		.d2-4051017789 .fill-N3{fill:#9499AB;}
+		.d2-4051017789 .fill-N4{fill:#CFD2DD;}
+		.d2-4051017789 .fill-N5{fill:#DEE1EB;}
+		.d2-4051017789 .fill-N6{fill:#EEF1F8;}
+		.d2-4051017789 .fill-N7{fill:#FFFFFF;}
+		.d2-4051017789 .fill-B1{fill:#0D32B2;}
+		.d2-4051017789 .fill-B2{fill:#0D32B2;}
+		.d2-4051017789 .fill-B3{fill:#E3E9FD;}
+		.d2-4051017789 .fill-B4{fill:#E3E9FD;}
+		.d2-4051017789 .fill-B5{fill:#EDF0FD;}
+		.d2-4051017789 .fill-B6{fill:#F7F8FE;}
+		.d2-4051017789 .fill-AA2{fill:#4A6FF3;}
+		.d2-4051017789 .fill-AA4{fill:#EDF0FD;}
+		.d2-4051017789 .fill-AA5{fill:#F7F8FE;}
+		.d2-4051017789 .fill-AB4{fill:#EDF0FD;}
+		.d2-4051017789 .fill-AB5{fill:#F7F8FE;}
+		.d2-4051017789 .stroke-N1{stroke:#0A0F25;}
+		.d2-4051017789 .stroke-N2{stroke:#676C7E;}
+		.d2-4051017789 .stroke-N3{stroke:#9499AB;}
+		.d2-4051017789 .stroke-N4{stroke:#CFD2DD;}
+		.d2-4051017789 .stroke-N5{stroke:#DEE1EB;}
+		.d2-4051017789 .stroke-N6{stroke:#EEF1F8;}
+		.d2-4051017789 .stroke-N7{stroke:#FFFFFF;}
+		.d2-4051017789 .stroke-B1{stroke:#0D32B2;}
+		.d2-4051017789 .stroke-B2{stroke:#0D32B2;}
+		.d2-4051017789 .stroke-B3{stroke:#E3E9FD;}
+		.d2-4051017789 .stroke-B4{stroke:#E3E9FD;}
+		.d2-4051017789 .stroke-B5{stroke:#EDF0FD;}
+		.d2-4051017789 .stroke-B6{stroke:#F7F8FE;}
+		.d2-4051017789 .stroke-AA2{stroke:#4A6FF3;}
+		.d2-4051017789 .stroke-AA4{stroke:#EDF0FD;}
+		.d2-4051017789 .stroke-AA5{stroke:#F7F8FE;}
+		.d2-4051017789 .stroke-AB4{stroke:#EDF0FD;}
+		.d2-4051017789 .stroke-AB5{stroke:#F7F8FE;}
+		.d2-4051017789 .background-color-N1{background-color:#0A0F25;}
+		.d2-4051017789 .background-color-N2{background-color:#676C7E;}
+		.d2-4051017789 .background-color-N3{background-color:#9499AB;}
+		.d2-4051017789 .background-color-N4{background-color:#CFD2DD;}
+		.d2-4051017789 .background-color-N5{background-color:#DEE1EB;}
+		.d2-4051017789 .background-color-N6{background-color:#EEF1F8;}
+		.d2-4051017789 .background-color-N7{background-color:#FFFFFF;}
+		.d2-4051017789 .background-color-B1{background-color:#0D32B2;}
+		.d2-4051017789 .background-color-B2{background-color:#0D32B2;}
+		.d2-4051017789 .background-color-B3{background-color:#E3E9FD;}
+		.d2-4051017789 .background-color-B4{background-color:#E3E9FD;}
+		.d2-4051017789 .background-color-B5{background-color:#EDF0FD;}
+		.d2-4051017789 .background-color-B6{background-color:#F7F8FE;}
+		.d2-4051017789 .background-color-AA2{background-color:#4A6FF3;}
+		.d2-4051017789 .background-color-AA4{background-color:#EDF0FD;}
+		.d2-4051017789 .background-color-AA5{background-color:#F7F8FE;}
+		.d2-4051017789 .background-color-AB4{background-color:#EDF0FD;}
+		.d2-4051017789 .background-color-AB5{background-color:#F7F8FE;}
+		.d2-4051017789 .color-N1{color:#0A0F25;}
+		.d2-4051017789 .color-N2{color:#676C7E;}
+		.d2-4051017789 .color-N3{color:#9499AB;}
+		.d2-4051017789 .color-N4{color:#CFD2DD;}
+		.d2-4051017789 .color-N5{color:#DEE1EB;}
+		.d2-4051017789 .color-N6{color:#EEF1F8;}
+		.d2-4051017789 .color-N7{color:#FFFFFF;}
+		.d2-4051017789 .color-B1{color:#0D32B2;}
+		.d2-4051017789 .color-B2{color:#0D32B2;}
+		.d2-4051017789 .color-B3{color:#E3E9FD;}
+		.d2-4051017789 .color-B4{color:#E3E9FD;}
+		.d2-4051017789 .color-B5{color:#EDF0FD;}
+		.d2-4051017789 .color-B6{color:#F7F8FE;}
+		.d2-4051017789 .color-AA2{color:#4A6FF3;}
+		.d2-4051017789 .color-AA4{color:#EDF0FD;}
+		.d2-4051017789 .color-AA5{color:#F7F8FE;}
+		.d2-4051017789 .color-AB4{color:#EDF0FD;}
+		.d2-4051017789 .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}]]></style><g id="main"><g class="shape" ><rect x="0.000000" y="41.000000" width="245.000000" height="291.000000" class=" stroke-B1 fill-B4" style="stroke-width:2;" /></g><text x="122.500000" y="28.000000" class="text fill-N1" style="text-anchor:middle;font-size:28px">main</text></g><g id="root"><g class="shape" ><rect x="266.000000" y="41.000000" width="245.000000" height="291.000000" class=" stroke-B1 fill-B4" style="stroke-width:2;" /></g><text x="388.500000" y="28.000000" class="text fill-N1" style="text-anchor:middle;font-size:28px">root</text></g><g id="main.x"><g class="shape" ><rect x="40.000000" y="70.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="66.500000" y="108.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">x</text></g><g id="main.y"><g class="shape" ><rect x="96.000000" y="236.000000" width="54.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="123.000000" y="274.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">y</text></g><g id="main.z"><g class="shape" ><rect x="153.000000" y="70.000000" width="52.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="179.000000" y="108.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">z</text></g><g id="root.x"><g class="shape" ><rect x="306.000000" y="70.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="332.500000" y="108.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">x</text></g><g id="root.y"><g class="shape" ><rect x="362.000000" y="236.000000" width="54.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="389.000000" y="274.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">y</text></g><g id="root.z"><g class="shape" ><rect x="419.000000" y="70.000000" width="52.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="445.000000" y="108.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">z</text></g><g id="main.(x -&gt; y)[0]"><marker id="mk-3488378134" markerWidth="10.000000" markerHeight="12.000000" refX="7.000000" refY="6.000000" viewBox="0.000000 0.000000 10.000000 12.000000" orient="auto" markerUnits="userSpaceOnUse"> <polygon points="0.000000,0.000000 10.000000,6.000000 0.000000,12.000000" class="connection fill-B1" stroke-width="2" /> </marker><path d="M 66.750000 138.500000 C 66.750000 176.500000 73.550000 196.500000 98.500760 233.192294" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-3488378134)" mask="url(#d2-4051017789)" /></g><g id="main.(y &lt;- z)[0]"><marker id="mk-2451250203" markerWidth="10.000000" markerHeight="12.000000" refX="3.000000" refY="6.000000" viewBox="0.000000 0.000000 10.000000 12.000000" orient="auto" markerUnits="userSpaceOnUse"> <polygon points="10.000000,0.000000 0.000000,6.000000 10.000000,12.000000" class="connection fill-B1" stroke-width="2" /> </marker><path d="M 147.608512 233.188773 C 172.472892 196.500000 179.250000 176.500000 179.250000 138.500000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-start="url(#mk-2451250203)" mask="url(#d2-4051017789)" /></g><g id="root.(x -&gt; y)[0]"><path d="M 332.500000 138.500000 C 332.500000 176.500000 339.300000 196.500000 364.250760 233.192294" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-3488378134)" mask="url(#d2-4051017789)" /></g><g id="root.(y &lt;- z)[0]"><path d="M 413.358512 233.188773 C 438.222892 196.500000 445.000000 176.500000 445.000000 138.500000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-start="url(#mk-2451250203)" mask="url(#d2-4051017789)" /></g><mask id="d2-4051017789" maskUnits="userSpaceOnUse" x="-1" y="0" width="513" height="333">
+<rect x="-1" y="0" width="513" height="333" fill="white"></rect>
+
+</mask></svg></svg>
\ No newline at end of file
diff --git a/e2etests/testdata/regression/root-container/elk/board.exp.json b/e2etests/testdata/regression/root-container/elk/board.exp.json
new file mode 100644
index 0000000000..0e8f8e2c98
--- /dev/null
+++ b/e2etests/testdata/regression/root-container/elk/board.exp.json
@@ -0,0 +1,529 @@
+{
+  "name": "",
+  "isFolderOnly": false,
+  "fontFamily": "SourceSansPro",
+  "shapes": [
+    {
+      "id": "main",
+      "type": "rectangle",
+      "pos": {
+        "x": 12,
+        "y": 12
+      },
+      "width": 154,
+      "height": 438,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B4",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "main",
+      "fontSize": 28,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 57,
+      "labelHeight": 36,
+      "labelPosition": "INSIDE_TOP_CENTER",
+      "zIndex": 0,
+      "level": 1
+    },
+    {
+      "id": "main.x",
+      "type": "rectangle",
+      "pos": {
+        "x": 62,
+        "y": 62
+      },
+      "width": 53,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "x",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 8,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "main.y",
+      "type": "rectangle",
+      "pos": {
+        "x": 62,
+        "y": 198
+      },
+      "width": 54,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "y",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 9,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "main.z",
+      "type": "rectangle",
+      "pos": {
+        "x": 63,
+        "y": 334
+      },
+      "width": 52,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "z",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 7,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "root",
+      "type": "rectangle",
+      "pos": {
+        "x": 186,
+        "y": 12
+      },
+      "width": 154,
+      "height": 438,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B4",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "root",
+      "fontSize": 28,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 49,
+      "labelHeight": 36,
+      "labelPosition": "INSIDE_TOP_CENTER",
+      "zIndex": 0,
+      "level": 1
+    },
+    {
+      "id": "root.x",
+      "type": "rectangle",
+      "pos": {
+        "x": 236,
+        "y": 62
+      },
+      "width": 53,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "x",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 8,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "root.y",
+      "type": "rectangle",
+      "pos": {
+        "x": 236,
+        "y": 198
+      },
+      "width": 54,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "y",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 9,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    },
+    {
+      "id": "root.z",
+      "type": "rectangle",
+      "pos": {
+        "x": 237,
+        "y": 334
+      },
+      "width": 52,
+      "height": 66,
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "borderRadius": 0,
+      "fill": "B5",
+      "stroke": "B1",
+      "shadow": false,
+      "3d": false,
+      "multiple": false,
+      "double-border": false,
+      "tooltip": "",
+      "link": "",
+      "icon": null,
+      "iconPosition": "",
+      "blend": false,
+      "fields": null,
+      "methods": null,
+      "columns": null,
+      "label": "z",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N1",
+      "italic": false,
+      "bold": true,
+      "underline": false,
+      "labelWidth": 7,
+      "labelHeight": 21,
+      "labelPosition": "INSIDE_MIDDLE_CENTER",
+      "zIndex": 0,
+      "level": 2
+    }
+  ],
+  "connections": [
+    {
+      "id": "main.(x -> y)[0]",
+      "src": "main.x",
+      "srcArrow": "none",
+      "dst": "main.y",
+      "dstArrow": "triangle",
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "stroke": "B1",
+      "borderRadius": 10,
+      "label": "",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N2",
+      "italic": true,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 0,
+      "labelHeight": 0,
+      "labelPosition": "",
+      "labelPercentage": 0,
+      "route": [
+        {
+          "x": 89,
+          "y": 128
+        },
+        {
+          "x": 89,
+          "y": 198
+        }
+      ],
+      "animated": false,
+      "tooltip": "",
+      "icon": null,
+      "zIndex": 0
+    },
+    {
+      "id": "main.(y <- z)[0]",
+      "src": "main.y",
+      "srcArrow": "triangle",
+      "dst": "main.z",
+      "dstArrow": "none",
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "stroke": "B1",
+      "borderRadius": 10,
+      "label": "",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N2",
+      "italic": true,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 0,
+      "labelHeight": 0,
+      "labelPosition": "",
+      "labelPercentage": 0,
+      "route": [
+        {
+          "x": 89,
+          "y": 264
+        },
+        {
+          "x": 89,
+          "y": 334
+        }
+      ],
+      "animated": false,
+      "tooltip": "",
+      "icon": null,
+      "zIndex": 0
+    },
+    {
+      "id": "root.(x -> y)[0]",
+      "src": "root.x",
+      "srcArrow": "none",
+      "dst": "root.y",
+      "dstArrow": "triangle",
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "stroke": "B1",
+      "borderRadius": 10,
+      "label": "",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N2",
+      "italic": true,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 0,
+      "labelHeight": 0,
+      "labelPosition": "",
+      "labelPercentage": 0,
+      "route": [
+        {
+          "x": 263,
+          "y": 128
+        },
+        {
+          "x": 263,
+          "y": 198
+        }
+      ],
+      "animated": false,
+      "tooltip": "",
+      "icon": null,
+      "zIndex": 0
+    },
+    {
+      "id": "root.(y <- z)[0]",
+      "src": "root.y",
+      "srcArrow": "triangle",
+      "dst": "root.z",
+      "dstArrow": "none",
+      "opacity": 1,
+      "strokeDash": 0,
+      "strokeWidth": 2,
+      "stroke": "B1",
+      "borderRadius": 10,
+      "label": "",
+      "fontSize": 16,
+      "fontFamily": "DEFAULT",
+      "language": "",
+      "color": "N2",
+      "italic": true,
+      "bold": false,
+      "underline": false,
+      "labelWidth": 0,
+      "labelHeight": 0,
+      "labelPosition": "",
+      "labelPercentage": 0,
+      "route": [
+        {
+          "x": 263,
+          "y": 264
+        },
+        {
+          "x": 263,
+          "y": 334
+        }
+      ],
+      "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/regression/root-container/elk/sketch.exp.svg b/e2etests/testdata/regression/root-container/elk/sketch.exp.svg
new file mode 100644
index 0000000000..c89877e41e
--- /dev/null
+++ b/e2etests/testdata/regression/root-container/elk/sketch.exp.svg
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" d2Version="v0.4.1-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 330 440"><svg id="d2-svg" class="d2-3104803376" width="330" height="440" viewBox="11 11 330 440"><rect x="11.000000" y="11.000000" width="330.000000" height="440.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
+.d2-3104803376 .text {
+	font-family: "d2-3104803376-font-regular";
+}
+@font-face {
+	font-family: d2-3104803376-font-regular;
+	src: url("data:application/font-woff;base64,d09GRgABAAAAAAjIAAoAAAAADgwAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXd/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UVBTs0aJFyVB8CypKAkqmpATkzBnToscRxwyYMKXEcaRKnllIzoiKSyKd7yzCd2ZIQkZprM7JiMXTiV+i7C7HOHoUil2tfLxW4SmO75TtueWK/YpAv26F2fq5SzYRF+pnqq6k2rmUghPt+nM7fCtcsYe7V3/WmXy4R7H+V6p8yrn0j6VUJiYZzm3RIZSDQvcEx4HWXUJ15Hu6DHhDj3cMtO7Qp0+HEwZ0ea3cHn0cX9PjhENldIUXe0dyzAk/4viGrmJ87cT6s1As4RcKc3cpjnPdY0ahnnvmge6a6IZ3V9jPUL7mjlI5Q82Rj3TSL9OcRYzNFYUYztTLpTdK619sjpjpLl7bm30/DRc2e8spviLXDHu3Ljh55RaMPqRqcMszl/oJiIjJOVXEkJwZLSquxPstEeekOA7VvTeakorOdY4/50ouSZiJQZdMdeYU+huZb0LjPlzzvbO3JFa+Z3p2fav7nOLUqxuN3ql7y73QupysKNAyVfMVNw3FNTPvJ5qpVf6hcku9bjnP6JNI9VQ3uP0OPCegzQ677DPROUPtXNgb0dY70eYV++rBGYmiRnJ1YhV2CXjBLru84sVazQ6HHNBj/w4cF1k9Dnh9a2ddp2UVZ3X+FJu2+DqeXa9e3luvz+/gyy80UTcvY1/a+G5fWLUb/58QMfNc3NbqndwTgv8AAAD//wEAAP//B1tMMAB4nGJgZgCD/+cYjBiwAAAAAAD//wEAAP//LwECAwAAAA==");
+}
+.d2-3104803376 .text-bold {
+	font-family: "d2-3104803376-font-bold";
+}
+@font-face {
+	font-family: d2-3104803376-font-bold;
+	src: url("data:application/font-woff;base64,d09GRgABAAAAAAjIAAoAAAAADiAAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXxHXrmNtYXAAAAFUAAAAWwAAAGoBpQHTZ2x5ZgAAAbAAAAMBAAADkL/JKvBoZWFkAAAEtAAAADYAAAA2G38e1GhoZWEAAATsAAAAJAAAACQKfwXMaG10eAAABRAAAAA0AAAANBeOAddsb2NhAAAFRAAAABwAAA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lk8v4ehfpfKPIFV5p/qEklYpLg3C4tfCnId49xHOncwVdHvqdDnxO6vKGvc4sePVqc0afDa/l26eH4mi5nHMujI7y4a0sxZ/yA4xs6siljR9afxcQifiYzdefiOFMdUzL1vGTuqdZIFd59wuUOpRvqyOUz0B6Vlk7zS7RnASNTRSaGU/VyqY3c+heaIqaqpZzt7X25DXPbveUW35Bqh0u1LjiVk1swet9UvXc0c60fj4CQlAtZDEiZ0qDgRrzPCbgixnGs7p1oSwpaK58yz41UEjEVgw6J4szI9Dcw3fjGfbChe2dvSSj/kunlqqr7ZHHq1e2M3qh7yzvfuhytTaBhU03X1DQQ18S0H2mn1vn78s31uqU85YiUmPBfL8AzPJrsc8AhY2UY6GZur0NTL0STlxyq+ksiWQ2l58giHODxnAMOeMnzd/q4ZOKMi1txWc/d4pgjuhx+UBUL+y5HvF59+/+sv4tpU7U4nq5OL+49xSd3UOsX2rPb97KniZWTmFu02604I2BacnG76zW5x3j/AAAA//8BAAD///S3T1F4nGJgZgCD/+cYjBiwAAAAAAD//wEAAP//LwECAwAAAA==");
+}]]></style><style type="text/css"><![CDATA[.shape {
+  shape-rendering: geometricPrecision;
+  stroke-linejoin: round;
+}
+.connection {
+  stroke-linecap: round;
+  stroke-linejoin: round;
+}
+.blend {
+  mix-blend-mode: multiply;
+  opacity: 0.5;
+}
+
+		.d2-3104803376 .fill-N1{fill:#0A0F25;}
+		.d2-3104803376 .fill-N2{fill:#676C7E;}
+		.d2-3104803376 .fill-N3{fill:#9499AB;}
+		.d2-3104803376 .fill-N4{fill:#CFD2DD;}
+		.d2-3104803376 .fill-N5{fill:#DEE1EB;}
+		.d2-3104803376 .fill-N6{fill:#EEF1F8;}
+		.d2-3104803376 .fill-N7{fill:#FFFFFF;}
+		.d2-3104803376 .fill-B1{fill:#0D32B2;}
+		.d2-3104803376 .fill-B2{fill:#0D32B2;}
+		.d2-3104803376 .fill-B3{fill:#E3E9FD;}
+		.d2-3104803376 .fill-B4{fill:#E3E9FD;}
+		.d2-3104803376 .fill-B5{fill:#EDF0FD;}
+		.d2-3104803376 .fill-B6{fill:#F7F8FE;}
+		.d2-3104803376 .fill-AA2{fill:#4A6FF3;}
+		.d2-3104803376 .fill-AA4{fill:#EDF0FD;}
+		.d2-3104803376 .fill-AA5{fill:#F7F8FE;}
+		.d2-3104803376 .fill-AB4{fill:#EDF0FD;}
+		.d2-3104803376 .fill-AB5{fill:#F7F8FE;}
+		.d2-3104803376 .stroke-N1{stroke:#0A0F25;}
+		.d2-3104803376 .stroke-N2{stroke:#676C7E;}
+		.d2-3104803376 .stroke-N3{stroke:#9499AB;}
+		.d2-3104803376 .stroke-N4{stroke:#CFD2DD;}
+		.d2-3104803376 .stroke-N5{stroke:#DEE1EB;}
+		.d2-3104803376 .stroke-N6{stroke:#EEF1F8;}
+		.d2-3104803376 .stroke-N7{stroke:#FFFFFF;}
+		.d2-3104803376 .stroke-B1{stroke:#0D32B2;}
+		.d2-3104803376 .stroke-B2{stroke:#0D32B2;}
+		.d2-3104803376 .stroke-B3{stroke:#E3E9FD;}
+		.d2-3104803376 .stroke-B4{stroke:#E3E9FD;}
+		.d2-3104803376 .stroke-B5{stroke:#EDF0FD;}
+		.d2-3104803376 .stroke-B6{stroke:#F7F8FE;}
+		.d2-3104803376 .stroke-AA2{stroke:#4A6FF3;}
+		.d2-3104803376 .stroke-AA4{stroke:#EDF0FD;}
+		.d2-3104803376 .stroke-AA5{stroke:#F7F8FE;}
+		.d2-3104803376 .stroke-AB4{stroke:#EDF0FD;}
+		.d2-3104803376 .stroke-AB5{stroke:#F7F8FE;}
+		.d2-3104803376 .background-color-N1{background-color:#0A0F25;}
+		.d2-3104803376 .background-color-N2{background-color:#676C7E;}
+		.d2-3104803376 .background-color-N3{background-color:#9499AB;}
+		.d2-3104803376 .background-color-N4{background-color:#CFD2DD;}
+		.d2-3104803376 .background-color-N5{background-color:#DEE1EB;}
+		.d2-3104803376 .background-color-N6{background-color:#EEF1F8;}
+		.d2-3104803376 .background-color-N7{background-color:#FFFFFF;}
+		.d2-3104803376 .background-color-B1{background-color:#0D32B2;}
+		.d2-3104803376 .background-color-B2{background-color:#0D32B2;}
+		.d2-3104803376 .background-color-B3{background-color:#E3E9FD;}
+		.d2-3104803376 .background-color-B4{background-color:#E3E9FD;}
+		.d2-3104803376 .background-color-B5{background-color:#EDF0FD;}
+		.d2-3104803376 .background-color-B6{background-color:#F7F8FE;}
+		.d2-3104803376 .background-color-AA2{background-color:#4A6FF3;}
+		.d2-3104803376 .background-color-AA4{background-color:#EDF0FD;}
+		.d2-3104803376 .background-color-AA5{background-color:#F7F8FE;}
+		.d2-3104803376 .background-color-AB4{background-color:#EDF0FD;}
+		.d2-3104803376 .background-color-AB5{background-color:#F7F8FE;}
+		.d2-3104803376 .color-N1{color:#0A0F25;}
+		.d2-3104803376 .color-N2{color:#676C7E;}
+		.d2-3104803376 .color-N3{color:#9499AB;}
+		.d2-3104803376 .color-N4{color:#CFD2DD;}
+		.d2-3104803376 .color-N5{color:#DEE1EB;}
+		.d2-3104803376 .color-N6{color:#EEF1F8;}
+		.d2-3104803376 .color-N7{color:#FFFFFF;}
+		.d2-3104803376 .color-B1{color:#0D32B2;}
+		.d2-3104803376 .color-B2{color:#0D32B2;}
+		.d2-3104803376 .color-B3{color:#E3E9FD;}
+		.d2-3104803376 .color-B4{color:#E3E9FD;}
+		.d2-3104803376 .color-B5{color:#EDF0FD;}
+		.d2-3104803376 .color-B6{color:#F7F8FE;}
+		.d2-3104803376 .color-AA2{color:#4A6FF3;}
+		.d2-3104803376 .color-AA4{color:#EDF0FD;}
+		.d2-3104803376 .color-AA5{color:#F7F8FE;}
+		.d2-3104803376 .color-AB4{color:#EDF0FD;}
+		.d2-3104803376 .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}]]></style><g id="main"><g class="shape" ><rect x="12.000000" y="12.000000" width="154.000000" height="438.000000" class=" stroke-B1 fill-B4" style="stroke-width:2;" /></g><text x="89.000000" y="45.000000" class="text fill-N1" style="text-anchor:middle;font-size:28px">main</text></g><g id="root"><g class="shape" ><rect x="186.000000" y="12.000000" width="154.000000" height="438.000000" class=" stroke-B1 fill-B4" style="stroke-width:2;" /></g><text x="263.000000" y="45.000000" class="text fill-N1" style="text-anchor:middle;font-size:28px">root</text></g><g id="main.x"><g class="shape" ><rect x="62.000000" y="62.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="88.500000" y="100.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">x</text></g><g id="main.y"><g class="shape" ><rect x="62.000000" y="198.000000" width="54.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="89.000000" y="236.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">y</text></g><g id="main.z"><g class="shape" ><rect x="63.000000" y="334.000000" width="52.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="89.000000" y="372.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">z</text></g><g id="root.x"><g class="shape" ><rect x="236.000000" y="62.000000" width="53.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="262.500000" y="100.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">x</text></g><g id="root.y"><g class="shape" ><rect x="236.000000" y="198.000000" width="54.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="263.000000" y="236.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">y</text></g><g id="root.z"><g class="shape" ><rect x="237.000000" y="334.000000" width="52.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="263.000000" y="372.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">z</text></g><g id="main.(x -&gt; y)[0]"><marker id="mk-3488378134" markerWidth="10.000000" markerHeight="12.000000" refX="7.000000" refY="6.000000" viewBox="0.000000 0.000000 10.000000 12.000000" orient="auto" markerUnits="userSpaceOnUse"> <polygon points="0.000000,0.000000 10.000000,6.000000 0.000000,12.000000" class="connection fill-B1" stroke-width="2" /> </marker><path d="M 89.000000 130.000000 L 89.000000 194.000000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-3488378134)" mask="url(#d2-3104803376)" /></g><g id="main.(y &lt;- z)[0]"><marker id="mk-2451250203" markerWidth="10.000000" markerHeight="12.000000" refX="3.000000" refY="6.000000" viewBox="0.000000 0.000000 10.000000 12.000000" orient="auto" markerUnits="userSpaceOnUse"> <polygon points="10.000000,0.000000 0.000000,6.000000 10.000000,12.000000" class="connection fill-B1" stroke-width="2" /> </marker><path d="M 89.000000 268.000000 L 89.000000 332.000000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-start="url(#mk-2451250203)" mask="url(#d2-3104803376)" /></g><g id="root.(x -&gt; y)[0]"><path d="M 263.000000 130.000000 L 263.000000 194.000000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-3488378134)" mask="url(#d2-3104803376)" /></g><g id="root.(y &lt;- z)[0]"><path d="M 263.000000 268.000000 L 263.000000 332.000000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-start="url(#mk-2451250203)" mask="url(#d2-3104803376)" /></g><mask id="d2-3104803376" maskUnits="userSpaceOnUse" x="11" y="11" width="330" height="440">
+<rect x="11" y="11" width="330" height="440" fill="white"></rect>
+
+</mask></svg></svg>
\ No newline at end of file