diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md
index 8f10656d9..335e222ee 100644
--- a/ci/release/changelogs/next.md
+++ b/ci/release/changelogs/next.md
@@ -2,6 +2,8 @@
#### Improvements 🧹
+- Grid cells can now contain nested edges [#1629](https://github.com/terrastruct/d2/pull/1629)
+
#### Bugfixes ⛑️
- Grid layout now accounts for each cell's outside labels and icons [#1624](https://github.com/terrastruct/d2/pull/1624)
diff --git a/d2compiler/compile.go b/d2compiler/compile.go
index 9a9337585..0675ebf34 100644
--- a/d2compiler/compile.go
+++ b/d2compiler/compile.go
@@ -1089,34 +1089,59 @@ func (c *compiler) validateNear(g *d2graph.Graph) {
func (c *compiler) validateEdges(g *d2graph.Graph) {
for _, edge := range g.Edges {
+ // edges from a grid to something outside is ok
+ // grid -> outside : ok
+ // grid -> grid.cell : not ok
+ // grid -> grid.cell.inner : not ok
+ if edge.Src.IsGridDiagram() && edge.Dst.IsDescendantOf(edge.Src) {
+ c.errorf(edge.GetAstEdge(), "edge from grid diagram %#v cannot enter itself", edge.Src.AbsID())
+ continue
+ }
+ if edge.Dst.IsGridDiagram() && edge.Src.IsDescendantOf(edge.Dst) {
+ c.errorf(edge.GetAstEdge(), "edge from grid diagram %#v cannot enter itself", edge.Dst.AbsID())
+ continue
+ }
+
srcGrid := edge.Src.Parent.ClosestGridDiagram()
dstGrid := edge.Dst.Parent.ClosestGridDiagram()
if srcGrid != nil || dstGrid != nil {
- if top := srcGrid.TopGridDiagram(); srcGrid != top {
- // valid: grid.child1 -> grid.child2
- // invalid: grid.childGrid.child1 -> grid.childGrid.child2
- c.errorf(edge.GetAstEdge(), "edge must be on direct child of grid diagram %#v", top.AbsID())
- continue
- }
- if top := dstGrid.TopGridDiagram(); dstGrid != top {
- // valid: grid.child1 -> grid.child2
- // invalid: grid.childGrid.child1 -> grid.childGrid.child2
- c.errorf(edge.GetAstEdge(), "edge must be on direct child of grid diagram %#v", top.AbsID())
- continue
- }
if srcGrid != dstGrid {
// valid: a -> grid
// invalid: a -> grid.child
- c.errorf(edge.GetAstEdge(), "edges into grid diagrams are not supported yet")
+ if dstGrid != nil && !(srcGrid != nil && srcGrid.IsDescendantOf(dstGrid)) {
+ c.errorf(edge.GetAstEdge(), "edge cannot enter grid diagram %#v", dstGrid.AbsID())
+ } else {
+ c.errorf(edge.GetAstEdge(), "edge cannot exit grid diagram %#v", srcGrid.AbsID())
+ }
continue
}
- if srcGrid != edge.Src.Parent || dstGrid != edge.Dst.Parent {
- // valid: grid.child1 -> grid.child2
- // invalid: grid.child1 -> grid.child2.child1
- c.errorf(edge.GetAstEdge(), "grid diagrams can only have edges between children right now")
+
+ srcCell := edge.Src.ClosestGridCell()
+ dstCell := edge.Dst.ClosestGridCell()
+ // edges within a grid cell are ok now
+ // grid.cell.a -> grid.cell.b : ok
+ // grid.cell.a.c -> grid.cell.b.d : ok
+ // edges between grid cells themselves are ok
+ // grid.cell -> grid.cell2 : ok
+ // grid.cell -> grid.cell.inside : not ok
+ // grid.cell -> grid.cell2.inside : not ok
+ srcIsGridCell := edge.Src == srcCell
+ dstIsGridCell := edge.Dst == dstCell
+ if srcIsGridCell != dstIsGridCell {
+ if srcIsGridCell {
+ c.errorf(edge.GetAstEdge(), "grid cell %#v can only connect to another grid cell", edge.Src.AbsID())
+ } else {
+ c.errorf(edge.GetAstEdge(), "grid cell %#v can only connect to another grid cell", edge.Dst.AbsID())
+ }
+ continue
+ }
+
+ if srcCell != dstCell && (!srcIsGridCell || !dstIsGridCell) {
+ c.errorf(edge.GetAstEdge(), "edge cannot exit grid cell %#v", srcCell.AbsID())
continue
}
}
+
}
}
diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go
index bf90f58c2..942da6970 100644
--- a/d2compiler/compile_test.go
+++ b/d2compiler/compile_test.go
@@ -2478,15 +2478,15 @@ d2/testdata/d2compiler/TestCompile/grid_gap_negative.d2:3:16: vertical-gap must
grid-rows: 1
a -> b: ok
}
- c -> hey.b
- hey.a -> c
- hey -> hey.a
+c -> hey.b
+hey.a -> c
+hey -> hey.a
- hey -> c: ok
+hey -> c: ok
`,
- expErr: `d2/testdata/d2compiler/TestCompile/grid_edge.d2:5:2: edges into grid diagrams are not supported yet
-d2/testdata/d2compiler/TestCompile/grid_edge.d2:6:2: edges into grid diagrams are not supported yet
-d2/testdata/d2compiler/TestCompile/grid_edge.d2:7:2: edges into grid diagrams are not supported yet`,
+ expErr: `d2/testdata/d2compiler/TestCompile/grid_edge.d2:5:1: edge cannot enter grid diagram "hey"
+d2/testdata/d2compiler/TestCompile/grid_edge.d2:6:1: edge cannot exit grid diagram "hey"
+d2/testdata/d2compiler/TestCompile/grid_edge.d2:7:1: edge from grid diagram "hey" cannot enter itself`,
},
{
name: "grid_deeper_edge",
@@ -2494,16 +2494,31 @@ d2/testdata/d2compiler/TestCompile/grid_edge.d2:7:2: edges into grid diagrams ar
grid-rows: 1
a -> b: ok
b: {
- c -> d: not yet
+ c -> d: ok now
+ c.e -> c.f.g: ok
+ c.e -> d.h: ok
+ c -> d.h: ok
}
a: {
grid-columns: 1
- e -> f: also not yet
+ e -> f: also ok now
+ e: {
+ g -> h: ok
+ g -> h.h: ok
+ }
+ e -> f.i: not ok
+ e.g -> f.i: not ok
}
+ a -> b.c: not yet
+ a.e -> b.c: also not yet
+ a -> a.e: not ok
}
`,
- expErr: `d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:9:3: edge must be on direct child of grid diagram "hey"
-d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:5:3: grid diagrams can only have edges between children right now`,
+ expErr: `d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:17:3: grid cell "hey.a.e" can only connect to another grid cell
+d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:18:3: edge cannot exit grid cell "hey.a.e"
+d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:20:2: grid cell "hey.a" can only connect to another grid cell
+d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:21:2: edge cannot exit grid diagram "hey.a"
+d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:22:2: edge from grid diagram "hey.a" cannot enter itself`,
},
{
name: "grid_nested",
diff --git a/d2graph/grid_diagram.go b/d2graph/grid_diagram.go
index 62659df59..46f1f034d 100644
--- a/d2graph/grid_diagram.go
+++ b/d2graph/grid_diagram.go
@@ -15,6 +15,17 @@ func (obj *Object) ClosestGridDiagram() *Object {
return obj.Parent.ClosestGridDiagram()
}
+func (obj *Object) ClosestGridCell() *Object {
+ if obj == nil {
+ return nil
+ }
+ // grid cells can be a nested grid diagram
+ if obj.Parent.IsGridDiagram() {
+ return obj
+ }
+ return obj.Parent.ClosestGridCell()
+}
+
// TopGridDiagram returns the least nested (outermost) grid diagram
func (obj *Object) TopGridDiagram() *Object {
if obj == nil {
diff --git a/d2layouts/d2layouts.go b/d2layouts/d2layouts.go
index dddba2d44..8464146ce 100644
--- a/d2layouts/d2layouts.go
+++ b/d2layouts/d2layouts.go
@@ -106,6 +106,7 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
if err != nil {
return err
}
+
InjectNested(g.Root, nestedGraph, false)
restoreOrder()
@@ -122,15 +123,25 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
}
curr = obj
- dx := -curr.TopLeft.X
- dy := -curr.TopLeft.Y
+ // position nested graph (excluding curr) relative to curr
+ dx := 0 - curr.TopLeft.X
+ dy := 0 - curr.TopLeft.Y
for _, o := range nestedGraph.Objects {
+ if o.AbsID() == curr.AbsID() {
+ continue
+ }
o.TopLeft.X += dx
o.TopLeft.Y += dy
}
for _, e := range nestedGraph.Edges {
e.Move(dx, dy)
}
+
+ // now we keep the descendants out until after grid layout
+ nestedGraph = ExtractSubgraph(curr, false)
+
+ extracted[id] = nestedGraph
+ extractedOrder = append(extractedOrder, id)
continue
}
@@ -326,7 +337,6 @@ func ExtractSubgraph(container *d2graph.Object, includeSelf bool) *d2graph.Graph
}
func InjectNested(container *d2graph.Object, nestedGraph *d2graph.Graph, isRoot bool) {
- // TODO restore order of objects
g := container.Graph
for _, obj := range nestedGraph.Root.ChildrenArray {
obj.Parent = container
@@ -358,6 +368,9 @@ func PositionNested(container *d2graph.Object, nestedGraph *d2graph.Graph) {
// Note: assumes nestedGraph's layout has contents positioned relative to 0,0
dx := container.TopLeft.X //- tl.X
dy := container.TopLeft.Y //- tl.Y
+ if dx == 0 && dy == 0 {
+ return
+ }
for _, o := range nestedGraph.Objects {
o.TopLeft.X += dx
o.TopLeft.Y += dy
diff --git a/e2etests/testdata/files/grid_nested_simple_edges.d2 b/e2etests/testdata/files/grid_nested_simple_edges.d2
index 8148fffed..fecdaafe0 100644
--- a/e2etests/testdata/files/grid_nested_simple_edges.d2
+++ b/e2etests/testdata/files/grid_nested_simple_edges.d2
@@ -8,18 +8,18 @@ outer-grid: {
container: {
label.near: top-left
- # edges not yet supported here since they must be direct grid children
- a
- b
- c
+ (** -> **)[*].class: red
+ # edges on grid descendant now supported
+ a -> b -> c -> a
+ d -> e -> g.h.i
+ d -> f -> g.h
+ b -> g
}
inner-grid: {
grid-rows: 1
- 1
- 2
- 3
- # edges here are not supported yet since this is inside another grid
+ # edges inside another grid now supported
+ 1 -> 2 -> 3: {class: red}
}
}
@@ -41,3 +41,5 @@ outer-container: {
}
}
}
+
+classes.red.style.stroke: red
diff --git a/e2etests/testdata/stable/grid_nested_simple_edges/dagre/board.exp.json b/e2etests/testdata/stable/grid_nested_simple_edges/dagre/board.exp.json
index c7cfb758d..45b186a93 100644
--- a/e2etests/testdata/stable/grid_nested_simple_edges/dagre/board.exp.json
+++ b/e2etests/testdata/stable/grid_nested_simple_edges/dagre/board.exp.json
@@ -10,8 +10,8 @@
"x": 0,
"y": 0
},
- "width": 478,
- "height": 589,
+ "width": 554,
+ "height": 1081,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -48,8 +48,8 @@
"id": "outer-container",
"type": "rectangle",
"pos": {
- "x": 598,
- "y": 218
+ "x": 674,
+ "y": 464
},
"width": 1038,
"height": 459,
@@ -92,7 +92,7 @@
"x": 60,
"y": 60
},
- "width": 358,
+ "width": 434,
"height": 186,
"opacity": 1,
"strokeDash": 0,
@@ -133,8 +133,8 @@
"x": 60,
"y": 286
},
- "width": 358,
- "height": 137,
+ "width": 434,
+ "height": 629,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -172,9 +172,9 @@
"type": "rectangle",
"pos": {
"x": 60,
- "y": 463
+ "y": 955
},
- "width": 358,
+ "width": 434,
"height": 66,
"opacity": 1,
"strokeDash": 0,
@@ -212,7 +212,7 @@
"id": "outer-grid.container.a",
"type": "rectangle",
"pos": {
- "x": 90,
+ "x": 135,
"y": 327
},
"width": 53,
@@ -253,8 +253,8 @@
"id": "outer-grid.container.b",
"type": "rectangle",
"pos": {
- "x": 203,
- "y": 327
+ "x": 187,
+ "y": 493
},
"width": 53,
"height": 66,
@@ -294,8 +294,8 @@
"id": "outer-grid.container.c",
"type": "rectangle",
"pos": {
- "x": 316,
- "y": 327
+ "x": 90,
+ "y": 759
},
"width": 53,
"height": 66,
@@ -331,6 +331,252 @@
"zIndex": 0,
"level": 3
},
+ {
+ "id": "outer-grid.container.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 342,
+ "y": 327
+ },
+ "width": 54,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "d",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 9,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "outer-grid.container.e",
+ "type": "rectangle",
+ "pos": {
+ "x": 411,
+ "y": 493
+ },
+ "width": 53,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "e",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 8,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "outer-grid.container.g",
+ "type": "rectangle",
+ "pos": {
+ "x": 241,
+ "y": 698
+ },
+ "width": 169,
+ "height": 187,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "g",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 10,
+ "labelHeight": 26,
+ "labelPosition": "OUTSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "outer-grid.container.g.h",
+ "type": "rectangle",
+ "pos": {
+ "x": 271,
+ "y": 729
+ },
+ "width": 109,
+ "height": 126,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": "h",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 7,
+ "labelHeight": 21,
+ "labelPosition": "OUTSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 4
+ },
+ {
+ "id": "outer-grid.container.g.h.i",
+ "type": "rectangle",
+ "pos": {
+ "x": 301,
+ "y": 759
+ },
+ "width": 49,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": "i",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 4,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 5
+ },
+ {
+ "id": "outer-grid.container.f",
+ "type": "rectangle",
+ "pos": {
+ "x": 300,
+ "y": 493
+ },
+ "width": 51,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "f",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 6,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
{
"id": "outer-grid.inner-grid.1",
"type": "rectangle",
@@ -458,8 +704,8 @@
"id": "outer-container.grid",
"type": "rectangle",
"pos": {
- "x": 628,
- "y": 248
+ "x": 704,
+ "y": 494
},
"width": 358,
"height": 186,
@@ -499,8 +745,8 @@
"id": "outer-container.container",
"type": "rectangle",
"pos": {
- "x": 1106,
- "y": 319
+ "x": 1182,
+ "y": 565
},
"width": 500,
"height": 338,
@@ -540,8 +786,8 @@
"id": "outer-container.grid.1",
"type": "rectangle",
"pos": {
- "x": 688,
- "y": 308
+ "x": 764,
+ "y": 554
},
"width": 52,
"height": 66,
@@ -581,8 +827,8 @@
"id": "outer-container.grid.2",
"type": "rectangle",
"pos": {
- "x": 780,
- "y": 308
+ "x": 856,
+ "y": 554
},
"width": 53,
"height": 66,
@@ -622,8 +868,8 @@
"id": "outer-container.grid.3",
"type": "rectangle",
"pos": {
- "x": 873,
- "y": 308
+ "x": 949,
+ "y": 554
},
"width": 53,
"height": 66,
@@ -663,8 +909,8 @@
"id": "outer-container.container.4",
"type": "rectangle",
"pos": {
- "x": 1136,
- "y": 349
+ "x": 1212,
+ "y": 595
},
"width": 54,
"height": 66,
@@ -704,8 +950,8 @@
"id": "outer-container.container.5",
"type": "rectangle",
"pos": {
- "x": 1340,
- "y": 349
+ "x": 1416,
+ "y": 595
},
"width": 53,
"height": 66,
@@ -745,8 +991,8 @@
"id": "outer-container.container.6",
"type": "rectangle",
"pos": {
- "x": 1493,
- "y": 349
+ "x": 1569,
+ "y": 595
},
"width": 53,
"height": 66,
@@ -786,8 +1032,8 @@
"id": "outer-container.container.nested container",
"type": "rectangle",
"pos": {
- "x": 1310,
- "y": 501
+ "x": 1386,
+ "y": 747
},
"width": 266,
"height": 126,
@@ -827,8 +1073,8 @@
"id": "outer-container.container.nested container.7",
"type": "rectangle",
"pos": {
- "x": 1340,
- "y": 531
+ "x": 1416,
+ "y": 777
},
"width": 53,
"height": 66,
@@ -868,8 +1114,8 @@
"id": "outer-container.container.nested container.8",
"type": "rectangle",
"pos": {
- "x": 1493,
- "y": 531
+ "x": 1569,
+ "y": 777
},
"width": 53,
"height": 66,
@@ -932,20 +1178,20 @@
"labelPercentage": 0,
"route": [
{
- "x": 478,
- "y": 340.5
+ "x": 554,
+ "y": 586.5
},
{
- "x": 518,
- "y": 340.5
+ "x": 594,
+ "y": 586.5
},
{
- "x": 542,
- "y": 340.5
+ "x": 618,
+ "y": 586.5
},
{
- "x": 598,
- "y": 340.5
+ "x": 674,
+ "y": 586.5
}
],
"isCurve": true,
@@ -979,11 +1225,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 239,
+ "x": 277,
"y": 245.5
},
{
- "x": 239,
+ "x": 277,
"y": 286.5
}
],
@@ -1017,12 +1263,554 @@
"labelPercentage": 0,
"route": [
{
- "x": 239,
- "y": 423
+ "x": 277,
+ "y": 915
},
{
- "x": 239,
- "y": 463
+ "x": 277,
+ "y": 955
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(a -> b)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.a",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.b",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 182,
+ "y": 393
+ },
+ {
+ "x": 206.8000030517578,
+ "y": 433
+ },
+ {
+ "x": 213,
+ "y": 453
+ },
+ {
+ "x": 213,
+ "y": 493
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(b -> c)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.b",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.c",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 187.75,
+ "y": 559
+ },
+ {
+ "x": 157.35000610351562,
+ "y": 599
+ },
+ {
+ "x": 149.75,
+ "y": 619
+ },
+ {
+ "x": 149.75,
+ "y": 634
+ },
+ {
+ "x": 149.75,
+ "y": 649
+ },
+ {
+ "x": 145.75,
+ "y": 719
+ },
+ {
+ "x": 129.75,
+ "y": 759
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(c -> a)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.c",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.a",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 107.25,
+ "y": 759
+ },
+ {
+ "x": 96.05000305175781,
+ "y": 719
+ },
+ {
+ "x": 93.25,
+ "y": 699
+ },
+ {
+ "x": 93.25,
+ "y": 684
+ },
+ {
+ "x": 93.25,
+ "y": 669
+ },
+ {
+ "x": 93.25,
+ "y": 649
+ },
+ {
+ "x": 93.25,
+ "y": 634
+ },
+ {
+ "x": 93.25,
+ "y": 619
+ },
+ {
+ "x": 93.25,
+ "y": 592.4000244140625
+ },
+ {
+ "x": 93.25,
+ "y": 567.5
+ },
+ {
+ "x": 93.25,
+ "y": 542.5999755859375
+ },
+ {
+ "x": 101.5,
+ "y": 432.8919982910156
+ },
+ {
+ "x": 134.5,
+ "y": 392.4639892578125
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(d -> e)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.d",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.e",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 396,
+ "y": 393
+ },
+ {
+ "x": 428.79998779296875,
+ "y": 433
+ },
+ {
+ "x": 437,
+ "y": 453
+ },
+ {
+ "x": 437,
+ "y": 493
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(e -> g.h.i)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.e",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.g.h.i",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 437,
+ "y": 559
+ },
+ {
+ "x": 437,
+ "y": 599
+ },
+ {
+ "x": 437,
+ "y": 619
+ },
+ {
+ "x": 437,
+ "y": 634
+ },
+ {
+ "x": 437,
+ "y": 649
+ },
+ {
+ "x": 419.6000061035156,
+ "y": 721.7999877929688
+ },
+ {
+ "x": 350,
+ "y": 773
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(d -> f)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.d",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.f",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 351,
+ "y": 393
+ },
+ {
+ "x": 330.20001220703125,
+ "y": 433
+ },
+ {
+ "x": 325,
+ "y": 453
+ },
+ {
+ "x": 325,
+ "y": 493
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(f -> g.h)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.f",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.g.h",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 325,
+ "y": 559
+ },
+ {
+ "x": 325,
+ "y": 599
+ },
+ {
+ "x": 325,
+ "y": 667.7999877929688
+ },
+ {
+ "x": 325,
+ "y": 703
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(b -> g)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.b",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.g",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 231,
+ "y": 559
+ },
+ {
+ "x": 253.39999389648438,
+ "y": 599
+ },
+ {
+ "x": 259,
+ "y": 626.7999877929688
+ },
+ {
+ "x": 259,
+ "y": 698
+ }
+ ],
+ "isCurve": true,
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.inner-grid.(1 -> 2)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.inner-grid.1",
+ "srcArrow": "none",
+ "dst": "outer-grid.inner-grid.2",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 171.5,
+ "y": 153
+ },
+ {
+ "x": 212.5,
+ "y": 153
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.inner-grid.(2 -> 3)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.inner-grid.2",
+ "srcArrow": "none",
+ "dst": "outer-grid.inner-grid.3",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 264.5,
+ "y": 153
+ },
+ {
+ "x": 305.5,
+ "y": 153
}
],
"animated": false,
@@ -1055,20 +1843,20 @@
"labelPercentage": 0,
"route": [
{
- "x": 986,
- "y": 381.5
+ "x": 1062,
+ "y": 627.5
},
{
- "x": 1026,
- "y": 381.5
+ "x": 1102,
+ "y": 627.5
},
{
- "x": 1050,
- "y": 381.5
+ "x": 1126,
+ "y": 627.5
},
{
- "x": 1106,
- "y": 381.5
+ "x": 1182,
+ "y": 627.5
}
],
"isCurve": true,
@@ -1102,12 +1890,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 739.5,
- "y": 341
+ "x": 815.5,
+ "y": 587
},
{
- "x": 780.5,
- "y": 341
+ "x": 856.5,
+ "y": 587
}
],
"animated": false,
@@ -1140,12 +1928,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 832.5,
- "y": 341
+ "x": 908.5,
+ "y": 587
},
{
- "x": 873.5,
- "y": 341
+ "x": 949.5,
+ "y": 587
}
],
"animated": false,
@@ -1178,20 +1966,20 @@
"labelPercentage": 0,
"route": [
{
- "x": 1190,
- "y": 381.5
+ "x": 1266,
+ "y": 627.5
},
{
- "x": 1230,
- "y": 381.5
+ "x": 1306,
+ "y": 627.5
},
{
- "x": 1300,
- "y": 381.5
+ "x": 1376,
+ "y": 627.5
},
{
- "x": 1340,
- "y": 381.5
+ "x": 1416,
+ "y": 627.5
}
],
"isCurve": true,
@@ -1225,20 +2013,20 @@
"labelPercentage": 0,
"route": [
{
- "x": 1393,
- "y": 381.5
+ "x": 1469,
+ "y": 627.5
},
{
- "x": 1433,
- "y": 381.5
+ "x": 1509,
+ "y": 627.5
},
{
- "x": 1453,
- "y": 381.5
+ "x": 1529,
+ "y": 627.5
},
{
- "x": 1493,
- "y": 381.5
+ "x": 1569,
+ "y": 627.5
}
],
"isCurve": true,
@@ -1272,20 +2060,20 @@
"labelPercentage": 0,
"route": [
{
- "x": 1393,
- "y": 563.5
+ "x": 1469,
+ "y": 809.5
},
{
- "x": 1433,
- "y": 563.5
+ "x": 1509,
+ "y": 809.5
},
{
- "x": 1453,
- "y": 563.5
+ "x": 1529,
+ "y": 809.5
},
{
- "x": 1493,
- "y": 563.5
+ "x": 1569,
+ "y": 809.5
}
],
"isCurve": true,
diff --git a/e2etests/testdata/stable/grid_nested_simple_edges/dagre/sketch.exp.svg b/e2etests/testdata/stable/grid_nested_simple_edges/dagre/sketch.exp.svg
index 139f7da1d..72541ac4f 100644
--- a/e2etests/testdata/stable/grid_nested_simple_edges/dagre/sketch.exp.svg
+++ b/e2etests/testdata/stable/grid_nested_simple_edges/dagre/sketch.exp.svg
@@ -1,17 +1,17 @@
-
\ No newline at end of file
diff --git a/e2etests/testdata/stable/grid_nested_simple_edges/elk/board.exp.json b/e2etests/testdata/stable/grid_nested_simple_edges/elk/board.exp.json
index 5e210cd4f..1a40e7989 100644
--- a/e2etests/testdata/stable/grid_nested_simple_edges/elk/board.exp.json
+++ b/e2etests/testdata/stable/grid_nested_simple_edges/elk/board.exp.json
@@ -10,8 +10,8 @@
"x": 12,
"y": 12
},
- "width": 478,
- "height": 618,
+ "width": 550,
+ "height": 1120,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -48,8 +48,8 @@
"id": "outer-container",
"type": "rectangle",
"pos": {
- "x": 560,
- "y": 95
+ "x": 632,
+ "y": 346
},
"width": 1150,
"height": 452,
@@ -92,7 +92,7 @@
"x": 72,
"y": 72
},
- "width": 358,
+ "width": 430,
"height": 186,
"opacity": 1,
"strokeDash": 0,
@@ -133,8 +133,8 @@
"x": 72,
"y": 298
},
- "width": 358,
- "height": 166,
+ "width": 430,
+ "height": 668,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
@@ -172,9 +172,9 @@
"type": "rectangle",
"pos": {
"x": 72,
- "y": 504
+ "y": 1006
},
- "width": 358,
+ "width": 430,
"height": 66,
"opacity": 1,
"strokeDash": 0,
@@ -212,7 +212,7 @@
"id": "outer-grid.container.a",
"type": "rectangle",
"pos": {
- "x": 122,
+ "x": 136,
"y": 348
},
"width": 53,
@@ -253,10 +253,10 @@
"id": "outer-grid.container.b",
"type": "rectangle",
"pos": {
- "x": 195,
- "y": 348
+ "x": 163,
+ "y": 494
},
- "width": 53,
+ "width": 80,
"height": 66,
"opacity": 1,
"strokeDash": 0,
@@ -294,8 +294,8 @@
"id": "outer-grid.container.c",
"type": "rectangle",
"pos": {
- "x": 268,
- "y": 348
+ "x": 129,
+ "y": 645
},
"width": 53,
"height": 66,
@@ -331,6 +331,252 @@
"zIndex": 0,
"level": 3
},
+ {
+ "id": "outer-grid.container.d",
+ "type": "rectangle",
+ "pos": {
+ "x": 322,
+ "y": 348
+ },
+ "width": 80,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "d",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 9,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "outer-grid.container.e",
+ "type": "rectangle",
+ "pos": {
+ "x": 300,
+ "y": 494
+ },
+ "width": 53,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "e",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 8,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "outer-grid.container.g",
+ "type": "rectangle",
+ "pos": {
+ "x": 202,
+ "y": 645
+ },
+ "width": 249,
+ "height": 271,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "g",
+ "fontSize": 20,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 10,
+ "labelHeight": 26,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
+ {
+ "id": "outer-grid.container.g.h",
+ "type": "rectangle",
+ "pos": {
+ "x": 252,
+ "y": 700
+ },
+ "width": 149,
+ "height": 166,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": "h",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": false,
+ "underline": false,
+ "labelWidth": 7,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_TOP_CENTER",
+ "zIndex": 0,
+ "level": 4
+ },
+ {
+ "id": "outer-grid.container.g.h.i",
+ "type": "rectangle",
+ "pos": {
+ "x": 302,
+ "y": 750
+ },
+ "width": 49,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "N7",
+ "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": "i",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 4,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 5
+ },
+ {
+ "id": "outer-grid.container.f",
+ "type": "rectangle",
+ "pos": {
+ "x": 373,
+ "y": 494
+ },
+ "width": 51,
+ "height": 66,
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "borderRadius": 0,
+ "fill": "B6",
+ "stroke": "B1",
+ "shadow": false,
+ "3d": false,
+ "multiple": false,
+ "double-border": false,
+ "tooltip": "",
+ "link": "",
+ "icon": null,
+ "iconPosition": "",
+ "blend": false,
+ "fields": null,
+ "methods": null,
+ "columns": null,
+ "label": "f",
+ "fontSize": 16,
+ "fontFamily": "DEFAULT",
+ "language": "",
+ "color": "N1",
+ "italic": false,
+ "bold": true,
+ "underline": false,
+ "labelWidth": 6,
+ "labelHeight": 21,
+ "labelPosition": "INSIDE_MIDDLE_CENTER",
+ "zIndex": 0,
+ "level": 3
+ },
{
"id": "outer-grid.inner-grid.1",
"type": "rectangle",
@@ -458,8 +704,8 @@
"id": "outer-container.grid",
"type": "rectangle",
"pos": {
- "x": 610,
- "y": 228
+ "x": 682,
+ "y": 479
},
"width": 358,
"height": 186,
@@ -499,8 +745,8 @@
"id": "outer-container.container",
"type": "rectangle",
"pos": {
- "x": 1038,
- "y": 145
+ "x": 1110,
+ "y": 396
},
"width": 622,
"height": 352,
@@ -540,8 +786,8 @@
"id": "outer-container.grid.1",
"type": "rectangle",
"pos": {
- "x": 670,
- "y": 288
+ "x": 742,
+ "y": 539
},
"width": 52,
"height": 66,
@@ -581,8 +827,8 @@
"id": "outer-container.grid.2",
"type": "rectangle",
"pos": {
- "x": 762,
- "y": 288
+ "x": 834,
+ "y": 539
},
"width": 53,
"height": 66,
@@ -622,8 +868,8 @@
"id": "outer-container.grid.3",
"type": "rectangle",
"pos": {
- "x": 855,
- "y": 288
+ "x": 927,
+ "y": 539
},
"width": 53,
"height": 66,
@@ -663,8 +909,8 @@
"id": "outer-container.container.4",
"type": "rectangle",
"pos": {
- "x": 1310,
- "y": 195
+ "x": 1382,
+ "y": 446
},
"width": 54,
"height": 66,
@@ -704,8 +950,8 @@
"id": "outer-container.container.5",
"type": "rectangle",
"pos": {
- "x": 1434,
- "y": 195
+ "x": 1506,
+ "y": 446
},
"width": 53,
"height": 66,
@@ -745,8 +991,8 @@
"id": "outer-container.container.6",
"type": "rectangle",
"pos": {
- "x": 1557,
- "y": 195
+ "x": 1629,
+ "y": 446
},
"width": 53,
"height": 66,
@@ -786,8 +1032,8 @@
"id": "outer-container.container.nested container",
"type": "rectangle",
"pos": {
- "x": 1088,
- "y": 281
+ "x": 1160,
+ "y": 532
},
"width": 276,
"height": 166,
@@ -827,8 +1073,8 @@
"id": "outer-container.container.nested container.7",
"type": "rectangle",
"pos": {
- "x": 1138,
- "y": 331
+ "x": 1210,
+ "y": 582
},
"width": 53,
"height": 66,
@@ -868,8 +1114,8 @@
"id": "outer-container.container.nested container.8",
"type": "rectangle",
"pos": {
- "x": 1261,
- "y": 331
+ "x": 1333,
+ "y": 582
},
"width": 53,
"height": 66,
@@ -932,12 +1178,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 490,
- "y": 321
+ "x": 562,
+ "y": 572
},
{
- "x": 560,
- "y": 321
+ "x": 632,
+ "y": 572
}
],
"animated": false,
@@ -970,11 +1216,11 @@
"labelPercentage": 0,
"route": [
{
- "x": 251,
+ "x": 287,
"y": 258
},
{
- "x": 251,
+ "x": 287,
"y": 298
}
],
@@ -1008,12 +1254,486 @@
"labelPercentage": 0,
"route": [
{
- "x": 251,
- "y": 464
+ "x": 287,
+ "y": 966
},
{
- "x": 251,
- "y": 504
+ "x": 287,
+ "y": 1006
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(a -> b)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.a",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.b",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 171.33299255371094,
+ "y": 414
+ },
+ {
+ "x": 171.33299255371094,
+ "y": 454
+ },
+ {
+ "x": 203,
+ "y": 454
+ },
+ {
+ "x": 203,
+ "y": 494
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(b -> c)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.b",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.c",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 189.66600036621094,
+ "y": 560
+ },
+ {
+ "x": 189.66600036621094,
+ "y": 600
+ },
+ {
+ "x": 164.66600036621094,
+ "y": 600
+ },
+ {
+ "x": 164.66600036621094,
+ "y": 645
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(c -> a)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.c",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.a",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 147,
+ "y": 645
+ },
+ {
+ "x": 147,
+ "y": 600
+ },
+ {
+ "x": 122,
+ "y": 600
+ },
+ {
+ "x": 122,
+ "y": 454
+ },
+ {
+ "x": 153.66600036621094,
+ "y": 454
+ },
+ {
+ "x": 153.66600036621094,
+ "y": 414
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(d -> e)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.d",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.e",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 349.5,
+ "y": 414
+ },
+ {
+ "x": 349.5,
+ "y": 454
+ },
+ {
+ "x": 326.8330078125,
+ "y": 454
+ },
+ {
+ "x": 326.8330078125,
+ "y": 494
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(e -> g.h.i)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.e",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.g.h.i",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 326.8330078125,
+ "y": 560
+ },
+ {
+ "x": 326.8330078125,
+ "y": 750
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(d -> f)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.d",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.f",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 376.1659851074219,
+ "y": 414
+ },
+ {
+ "x": 376.1659851074219,
+ "y": 454
+ },
+ {
+ "x": 398.8330078125,
+ "y": 454
+ },
+ {
+ "x": 398.8330078125,
+ "y": 494
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(f -> g.h)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.f",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.g.h",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 398.8330078125,
+ "y": 560
+ },
+ {
+ "x": 398.8330078125,
+ "y": 600
+ },
+ {
+ "x": 336.8330078125,
+ "y": 600
+ },
+ {
+ "x": 336.8330078125,
+ "y": 700
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.container.(b -> g)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.container.b",
+ "srcArrow": "none",
+ "dst": "outer-grid.container.g",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 216.33299255371094,
+ "y": 560
+ },
+ {
+ "x": 216.33299255371094,
+ "y": 600
+ },
+ {
+ "x": 316.8330078125,
+ "y": 600
+ },
+ {
+ "x": 316.8330078125,
+ "y": 645
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.inner-grid.(1 -> 2)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.inner-grid.1",
+ "srcArrow": "none",
+ "dst": "outer-grid.inner-grid.2",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 183.5,
+ "y": 165
+ },
+ {
+ "x": 224.5,
+ "y": 165
+ }
+ ],
+ "animated": false,
+ "tooltip": "",
+ "icon": null,
+ "zIndex": 0
+ },
+ {
+ "id": "outer-grid.inner-grid.(2 -> 3)[0]",
+ "classes": [
+ "red"
+ ],
+ "src": "outer-grid.inner-grid.2",
+ "srcArrow": "none",
+ "dst": "outer-grid.inner-grid.3",
+ "dstArrow": "triangle",
+ "opacity": 1,
+ "strokeDash": 0,
+ "strokeWidth": 2,
+ "stroke": "red",
+ "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": 276.5,
+ "y": 165
+ },
+ {
+ "x": 317.5,
+ "y": 165
}
],
"animated": false,
@@ -1046,12 +1766,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 968,
- "y": 321
+ "x": 1040,
+ "y": 572
},
{
- "x": 1038,
- "y": 321
+ "x": 1110,
+ "y": 572
}
],
"animated": false,
@@ -1084,12 +1804,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 721.5,
- "y": 321
+ "x": 793.5,
+ "y": 572
},
{
- "x": 762.5,
- "y": 321
+ "x": 834.5,
+ "y": 572
}
],
"animated": false,
@@ -1122,12 +1842,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 814.5,
- "y": 321
+ "x": 886.5,
+ "y": 572
},
{
- "x": 855.5,
- "y": 321
+ "x": 927.5,
+ "y": 572
}
],
"animated": false,
@@ -1160,12 +1880,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 1364,
- "y": 228
+ "x": 1436,
+ "y": 479
},
{
- "x": 1434,
- "y": 228
+ "x": 1506,
+ "y": 479
}
],
"animated": false,
@@ -1198,12 +1918,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 1487,
- "y": 228
+ "x": 1559,
+ "y": 479
},
{
- "x": 1557,
- "y": 228
+ "x": 1629,
+ "y": 479
}
],
"animated": false,
@@ -1236,12 +1956,12 @@
"labelPercentage": 0,
"route": [
{
- "x": 1191,
- "y": 364
+ "x": 1263,
+ "y": 615
},
{
- "x": 1261,
- "y": 364
+ "x": 1333,
+ "y": 615
}
],
"animated": false,
diff --git a/e2etests/testdata/stable/grid_nested_simple_edges/elk/sketch.exp.svg b/e2etests/testdata/stable/grid_nested_simple_edges/elk/sketch.exp.svg
index a4eb85d78..b41c3057e 100644
--- a/e2etests/testdata/stable/grid_nested_simple_edges/elk/sketch.exp.svg
+++ b/e2etests/testdata/stable/grid_nested_simple_edges/elk/sketch.exp.svg
@@ -1,17 +1,17 @@
-outer-gridouter-containerinner-gridcontaineretcgridcontainerabc123123456nested container78
-
-
-
-
+ .d2-1249027147 .fill-N1{fill:#0A0F25;}
+ .d2-1249027147 .fill-N2{fill:#676C7E;}
+ .d2-1249027147 .fill-N3{fill:#9499AB;}
+ .d2-1249027147 .fill-N4{fill:#CFD2DD;}
+ .d2-1249027147 .fill-N5{fill:#DEE1EB;}
+ .d2-1249027147 .fill-N6{fill:#EEF1F8;}
+ .d2-1249027147 .fill-N7{fill:#FFFFFF;}
+ .d2-1249027147 .fill-B1{fill:#0D32B2;}
+ .d2-1249027147 .fill-B2{fill:#0D32B2;}
+ .d2-1249027147 .fill-B3{fill:#E3E9FD;}
+ .d2-1249027147 .fill-B4{fill:#E3E9FD;}
+ .d2-1249027147 .fill-B5{fill:#EDF0FD;}
+ .d2-1249027147 .fill-B6{fill:#F7F8FE;}
+ .d2-1249027147 .fill-AA2{fill:#4A6FF3;}
+ .d2-1249027147 .fill-AA4{fill:#EDF0FD;}
+ .d2-1249027147 .fill-AA5{fill:#F7F8FE;}
+ .d2-1249027147 .fill-AB4{fill:#EDF0FD;}
+ .d2-1249027147 .fill-AB5{fill:#F7F8FE;}
+ .d2-1249027147 .stroke-N1{stroke:#0A0F25;}
+ .d2-1249027147 .stroke-N2{stroke:#676C7E;}
+ .d2-1249027147 .stroke-N3{stroke:#9499AB;}
+ .d2-1249027147 .stroke-N4{stroke:#CFD2DD;}
+ .d2-1249027147 .stroke-N5{stroke:#DEE1EB;}
+ .d2-1249027147 .stroke-N6{stroke:#EEF1F8;}
+ .d2-1249027147 .stroke-N7{stroke:#FFFFFF;}
+ .d2-1249027147 .stroke-B1{stroke:#0D32B2;}
+ .d2-1249027147 .stroke-B2{stroke:#0D32B2;}
+ .d2-1249027147 .stroke-B3{stroke:#E3E9FD;}
+ .d2-1249027147 .stroke-B4{stroke:#E3E9FD;}
+ .d2-1249027147 .stroke-B5{stroke:#EDF0FD;}
+ .d2-1249027147 .stroke-B6{stroke:#F7F8FE;}
+ .d2-1249027147 .stroke-AA2{stroke:#4A6FF3;}
+ .d2-1249027147 .stroke-AA4{stroke:#EDF0FD;}
+ .d2-1249027147 .stroke-AA5{stroke:#F7F8FE;}
+ .d2-1249027147 .stroke-AB4{stroke:#EDF0FD;}
+ .d2-1249027147 .stroke-AB5{stroke:#F7F8FE;}
+ .d2-1249027147 .background-color-N1{background-color:#0A0F25;}
+ .d2-1249027147 .background-color-N2{background-color:#676C7E;}
+ .d2-1249027147 .background-color-N3{background-color:#9499AB;}
+ .d2-1249027147 .background-color-N4{background-color:#CFD2DD;}
+ .d2-1249027147 .background-color-N5{background-color:#DEE1EB;}
+ .d2-1249027147 .background-color-N6{background-color:#EEF1F8;}
+ .d2-1249027147 .background-color-N7{background-color:#FFFFFF;}
+ .d2-1249027147 .background-color-B1{background-color:#0D32B2;}
+ .d2-1249027147 .background-color-B2{background-color:#0D32B2;}
+ .d2-1249027147 .background-color-B3{background-color:#E3E9FD;}
+ .d2-1249027147 .background-color-B4{background-color:#E3E9FD;}
+ .d2-1249027147 .background-color-B5{background-color:#EDF0FD;}
+ .d2-1249027147 .background-color-B6{background-color:#F7F8FE;}
+ .d2-1249027147 .background-color-AA2{background-color:#4A6FF3;}
+ .d2-1249027147 .background-color-AA4{background-color:#EDF0FD;}
+ .d2-1249027147 .background-color-AA5{background-color:#F7F8FE;}
+ .d2-1249027147 .background-color-AB4{background-color:#EDF0FD;}
+ .d2-1249027147 .background-color-AB5{background-color:#F7F8FE;}
+ .d2-1249027147 .color-N1{color:#0A0F25;}
+ .d2-1249027147 .color-N2{color:#676C7E;}
+ .d2-1249027147 .color-N3{color:#9499AB;}
+ .d2-1249027147 .color-N4{color:#CFD2DD;}
+ .d2-1249027147 .color-N5{color:#DEE1EB;}
+ .d2-1249027147 .color-N6{color:#EEF1F8;}
+ .d2-1249027147 .color-N7{color:#FFFFFF;}
+ .d2-1249027147 .color-B1{color:#0D32B2;}
+ .d2-1249027147 .color-B2{color:#0D32B2;}
+ .d2-1249027147 .color-B3{color:#E3E9FD;}
+ .d2-1249027147 .color-B4{color:#E3E9FD;}
+ .d2-1249027147 .color-B5{color:#EDF0FD;}
+ .d2-1249027147 .color-B6{color:#F7F8FE;}
+ .d2-1249027147 .color-AA2{color:#4A6FF3;}
+ .d2-1249027147 .color-AA4{color:#EDF0FD;}
+ .d2-1249027147 .color-AA5{color:#F7F8FE;}
+ .d2-1249027147 .color-AB4{color:#EDF0FD;}
+ .d2-1249027147 .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}]]>outer-gridouter-containerinner-gridcontaineretcgridcontainerabcdegf123123456nested containerh78i
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/testdata/d2compiler/TestCompile/grid_deeper_edge.exp.json b/testdata/d2compiler/TestCompile/grid_deeper_edge.exp.json
index abe81dc64..55eac24ae 100644
--- a/testdata/d2compiler/TestCompile/grid_deeper_edge.exp.json
+++ b/testdata/d2compiler/TestCompile/grid_deeper_edge.exp.json
@@ -3,12 +3,24 @@
"err": {
"errs": [
{
- "range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,8:2:86-8:8:92",
- "errmsg": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:9:3: edge must be on direct child of grid diagram \"hey\""
+ "range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,16:2:199-16:10:207",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:17:3: grid cell \"hey.a.e\" can only connect to another grid cell"
},
{
- "range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,4:2:41-4:8:47",
- "errmsg": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:5:3: grid diagrams can only have edges between children right now"
+ "range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,17:2:218-17:12:228",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:18:3: edge cannot exit grid cell \"hey.a.e\""
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,19:1:241-19:9:249",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:20:2: grid cell \"hey.a\" can only connect to another grid cell"
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,20:1:260-20:11:270",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:21:2: edge cannot exit grid diagram \"hey.a\""
+ },
+ {
+ "range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,21:1:286-21:9:294",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:22:2: edge from grid diagram \"hey.a\" cannot enter itself"
}
]
}
diff --git a/testdata/d2compiler/TestCompile/grid_edge.exp.json b/testdata/d2compiler/TestCompile/grid_edge.exp.json
index 01dc6d78b..ceaeca9c2 100644
--- a/testdata/d2compiler/TestCompile/grid_edge.exp.json
+++ b/testdata/d2compiler/TestCompile/grid_edge.exp.json
@@ -3,16 +3,16 @@
"err": {
"errs": [
{
- "range": "d2/testdata/d2compiler/TestCompile/grid_edge.d2,4:1:36-4:11:46",
- "errmsg": "d2/testdata/d2compiler/TestCompile/grid_edge.d2:5:2: edges into grid diagrams are not supported yet"
+ "range": "d2/testdata/d2compiler/TestCompile/grid_edge.d2,4:0:35-4:10:45",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/grid_edge.d2:5:1: edge cannot enter grid diagram \"hey\""
},
{
- "range": "d2/testdata/d2compiler/TestCompile/grid_edge.d2,5:1:48-5:11:58",
- "errmsg": "d2/testdata/d2compiler/TestCompile/grid_edge.d2:6:2: edges into grid diagrams are not supported yet"
+ "range": "d2/testdata/d2compiler/TestCompile/grid_edge.d2,5:0:46-5:10:56",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/grid_edge.d2:6:1: edge cannot exit grid diagram \"hey\""
},
{
- "range": "d2/testdata/d2compiler/TestCompile/grid_edge.d2,6:1:60-6:13:72",
- "errmsg": "d2/testdata/d2compiler/TestCompile/grid_edge.d2:7:2: edges into grid diagrams are not supported yet"
+ "range": "d2/testdata/d2compiler/TestCompile/grid_edge.d2,6:0:57-6:12:69",
+ "errmsg": "d2/testdata/d2compiler/TestCompile/grid_edge.d2:7:1: edge from grid diagram \"hey\" cannot enter itself"
}
]
}