Merge pull request #1631 from gavin-ts/simple_edges_across_diagrams
Simple edges across nested diagrams
This commit is contained in:
commit
c49bc8e847
23 changed files with 25691 additions and 130 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
#### Improvements 🧹
|
#### Improvements 🧹
|
||||||
|
|
||||||
- Grid cells can now contain nested edges [#1629](https://github.com/terrastruct/d2/pull/1629)
|
- Grid cells can now contain nested edges [#1629](https://github.com/terrastruct/d2/pull/1629)
|
||||||
|
- Edges can now go across constant nears, sequence diagrams, and grids including nested ones. [#1631](https://github.com/terrastruct/d2/pull/1631)
|
||||||
|
|
||||||
#### Bugfixes ⛑️
|
#### Bugfixes ⛑️
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1068,20 +1068,13 @@ func (c *compiler) validateNear(g *d2graph.Graph) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, edge := range g.Edges {
|
for _, edge := range g.Edges {
|
||||||
srcNearContainer := edge.Src.OuterNearContainer()
|
if edge.Src.IsConstantNear() && edge.Dst.IsDescendantOf(edge.Src) {
|
||||||
dstNearContainer := edge.Dst.OuterNearContainer()
|
c.errorf(edge.GetAstEdge(), "edge from constant near %#v cannot enter itself", edge.Src.AbsID())
|
||||||
|
continue
|
||||||
var isSrcNearConst, isDstNearConst bool
|
|
||||||
|
|
||||||
if srcNearContainer != nil {
|
|
||||||
_, isSrcNearConst = d2graph.NearConstants[d2graph.Key(srcNearContainer.NearKey)[0]]
|
|
||||||
}
|
}
|
||||||
if dstNearContainer != nil {
|
if edge.Dst.IsConstantNear() && edge.Src.IsDescendantOf(edge.Dst) {
|
||||||
_, isDstNearConst = d2graph.NearConstants[d2graph.Key(dstNearContainer.NearKey)[0]]
|
c.errorf(edge.GetAstEdge(), "edge from constant near %#v cannot enter itself", edge.Dst.AbsID())
|
||||||
}
|
continue
|
||||||
|
|
||||||
if (isSrcNearConst || isDstNearConst) && srcNearContainer != dstNearContainer {
|
|
||||||
c.errorf(edge.References[0].Edge, "cannot connect objects from within a container, that has near constant set, to objects outside that container")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1101,47 +1094,22 @@ func (c *compiler) validateEdges(g *d2graph.Graph) {
|
||||||
c.errorf(edge.GetAstEdge(), "edge from grid diagram %#v cannot enter itself", edge.Dst.AbsID())
|
c.errorf(edge.GetAstEdge(), "edge from grid diagram %#v cannot enter itself", edge.Dst.AbsID())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if edge.Src.Parent.IsGridDiagram() && edge.Dst.IsDescendantOf(edge.Src) {
|
||||||
srcGrid := edge.Src.Parent.ClosestGridDiagram()
|
c.errorf(edge.GetAstEdge(), "edge from grid cell %#v cannot enter itself", edge.Src.AbsID())
|
||||||
dstGrid := edge.Dst.Parent.ClosestGridDiagram()
|
|
||||||
if srcGrid != nil || dstGrid != nil {
|
|
||||||
if srcGrid != dstGrid {
|
|
||||||
// valid: a -> grid
|
|
||||||
// invalid: a -> grid.child
|
|
||||||
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
|
continue
|
||||||
}
|
}
|
||||||
|
if edge.Dst.Parent.IsGridDiagram() && edge.Src.IsDescendantOf(edge.Dst) {
|
||||||
srcCell := edge.Src.ClosestGridCell()
|
c.errorf(edge.GetAstEdge(), "edge from grid cell %#v cannot enter itself", edge.Dst.AbsID())
|
||||||
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
|
continue
|
||||||
}
|
}
|
||||||
|
if edge.Src.IsSequenceDiagram() && edge.Dst.IsDescendantOf(edge.Src) {
|
||||||
if srcCell != dstCell && (!srcIsGridCell || !dstIsGridCell) {
|
c.errorf(edge.GetAstEdge(), "edge from sequence diagram %#v cannot enter itself", edge.Src.AbsID())
|
||||||
c.errorf(edge.GetAstEdge(), "edge cannot exit grid cell %#v", srcCell.AbsID())
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if edge.Dst.IsSequenceDiagram() && edge.Src.IsDescendantOf(edge.Dst) {
|
||||||
|
c.errorf(edge.GetAstEdge(), "edge from sequence diagram %#v cannot enter itself", edge.Dst.AbsID())
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1616,7 +1616,7 @@ d2/testdata/d2compiler/TestCompile/near-invalid.d2:14:9: near keys cannot be set
|
||||||
}
|
}
|
||||||
x -> y
|
x -> y
|
||||||
`,
|
`,
|
||||||
expErr: `d2/testdata/d2compiler/TestCompile/near_bad_connected.d2:5:5: cannot connect objects from within a container, that has near constant set, to objects outside that container`,
|
expErr: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "near_descendant_connect_to_outside",
|
name: "near_descendant_connect_to_outside",
|
||||||
|
|
@ -1627,7 +1627,7 @@ d2/testdata/d2compiler/TestCompile/near-invalid.d2:14:9: near keys cannot be set
|
||||||
}
|
}
|
||||||
x.y -> z
|
x.y -> z
|
||||||
`,
|
`,
|
||||||
expErr: "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2:6:5: cannot connect objects from within a container, that has near constant set, to objects outside that container",
|
expErr: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "nested_near_constant",
|
name: "nested_near_constant",
|
||||||
|
|
@ -2040,7 +2040,7 @@ b
|
||||||
}
|
}
|
||||||
b -> x.a
|
b -> x.a
|
||||||
`,
|
`,
|
||||||
expErr: `d2/testdata/d2compiler/TestCompile/leaky_sequence.d2:5:1: connections within sequence diagrams can connect only to other objects within the same sequence diagram`,
|
expErr: ``,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "sequence_scoping",
|
name: "sequence_scoping",
|
||||||
|
|
@ -2484,9 +2484,7 @@ hey -> hey.a
|
||||||
|
|
||||||
hey -> c: ok
|
hey -> c: ok
|
||||||
`,
|
`,
|
||||||
expErr: `d2/testdata/d2compiler/TestCompile/grid_edge.d2:5:1: edge cannot enter grid diagram "hey"
|
expErr: `d2/testdata/d2compiler/TestCompile/grid_edge.d2:7:1: edge from grid diagram "hey" cannot enter itself`,
|
||||||
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",
|
name: "grid_deeper_edge",
|
||||||
|
|
@ -2506,19 +2504,47 @@ d2/testdata/d2compiler/TestCompile/grid_edge.d2:7:1: edge from grid diagram "hey
|
||||||
g -> h: ok
|
g -> h: ok
|
||||||
g -> h.h: ok
|
g -> h.h: ok
|
||||||
}
|
}
|
||||||
e -> f.i: not ok
|
e -> f.i: ok now
|
||||||
e.g -> f.i: not ok
|
e.g -> f.i: ok now
|
||||||
}
|
}
|
||||||
a -> b.c: not yet
|
a -> b.c: ok now
|
||||||
a.e -> b.c: also not yet
|
a.e -> b.c: ok now
|
||||||
a -> a.e: not ok
|
a -> a.e: not ok
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
expErr: `d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:17:3: grid cell "hey.a.e" can only connect to another grid cell
|
expErr: `d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:22:2: edge from grid diagram "hey.a" cannot enter itself`,
|
||||||
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"
|
name: "parent_graph_edge_to_descendant",
|
||||||
d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:22:2: edge from grid diagram "hey.a" cannot enter itself`,
|
text: `tl: {
|
||||||
|
near: top-left
|
||||||
|
a.b
|
||||||
|
}
|
||||||
|
grid: {
|
||||||
|
grid-rows: 1
|
||||||
|
cell.c.d
|
||||||
|
}
|
||||||
|
seq: {
|
||||||
|
shape: sequence_diagram
|
||||||
|
e.f
|
||||||
|
}
|
||||||
|
tl -> tl.a: no
|
||||||
|
tl -> tl.a.b: no
|
||||||
|
grid-> grid.cell: no
|
||||||
|
grid-> grid.cell.c: no
|
||||||
|
grid.cell -> grid.cell.c: no
|
||||||
|
grid.cell -> grid.cell.c.d: no
|
||||||
|
seq -> seq.e: no
|
||||||
|
seq -> seq.e.f: no
|
||||||
|
`,
|
||||||
|
expErr: `d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:13:1: edge from constant near "tl" cannot enter itself
|
||||||
|
d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:14:1: edge from constant near "tl" cannot enter itself
|
||||||
|
d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:17:1: edge from grid cell "grid.cell" cannot enter itself
|
||||||
|
d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:18:1: edge from grid cell "grid.cell" cannot enter itself
|
||||||
|
d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:15:1: edge from grid diagram "grid" cannot enter itself
|
||||||
|
d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:16:1: edge from grid diagram "grid" cannot enter itself
|
||||||
|
d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:19:1: edge from sequence diagram "seq" cannot enter itself
|
||||||
|
d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:20:1: edge from sequence diagram "seq" cannot enter itself`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "grid_nested",
|
name: "grid_nested",
|
||||||
|
|
|
||||||
|
|
@ -1225,10 +1225,6 @@ func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label
|
||||||
src := obj.ensureChildEdge(srcID)
|
src := obj.ensureChildEdge(srcID)
|
||||||
dst := obj.ensureChildEdge(dstID)
|
dst := obj.ensureChildEdge(dstID)
|
||||||
|
|
||||||
if src.OuterSequenceDiagram() != dst.OuterSequenceDiagram() {
|
|
||||||
return nil, errors.New("connections within sequence diagrams can connect only to other objects within the same sequence diagram")
|
|
||||||
}
|
|
||||||
|
|
||||||
e := &Edge{
|
e := &Edge{
|
||||||
Attributes: Attributes{
|
Attributes: Attributes{
|
||||||
Label: Scalar{
|
Label: Scalar{
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,9 @@ import (
|
||||||
"oss.terrastruct.com/d2/d2layouts/d2near"
|
"oss.terrastruct.com/d2/d2layouts/d2near"
|
||||||
"oss.terrastruct.com/d2/d2layouts/d2sequence"
|
"oss.terrastruct.com/d2/d2layouts/d2sequence"
|
||||||
"oss.terrastruct.com/d2/lib/geo"
|
"oss.terrastruct.com/d2/lib/geo"
|
||||||
|
"oss.terrastruct.com/d2/lib/label"
|
||||||
"oss.terrastruct.com/d2/lib/log"
|
"oss.terrastruct.com/d2/lib/log"
|
||||||
|
"oss.terrastruct.com/util-go/go2"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DiagramType string
|
type DiagramType string
|
||||||
|
|
@ -80,6 +82,7 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
|
||||||
// Before we can layout these nodes, we need to handle all nested diagrams first.
|
// Before we can layout these nodes, we need to handle all nested diagrams first.
|
||||||
extracted := make(map[string]*d2graph.Graph)
|
extracted := make(map[string]*d2graph.Graph)
|
||||||
var extractedOrder []string
|
var extractedOrder []string
|
||||||
|
var extractedEdges []*d2graph.Edge
|
||||||
|
|
||||||
var constantNears []*d2graph.Graph
|
var constantNears []*d2graph.Graph
|
||||||
restoreOrder := SaveOrder(g)
|
restoreOrder := SaveOrder(g)
|
||||||
|
|
@ -100,7 +103,7 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
|
||||||
if isGridCellContainer && gi.isDefault() {
|
if isGridCellContainer && gi.isDefault() {
|
||||||
// if we are in a grid diagram, and our children have descendants
|
// if we are in a grid diagram, and our children have descendants
|
||||||
// we need to run layout on them first, even if they are not special diagram types
|
// we need to run layout on them first, even if they are not special diagram types
|
||||||
nestedGraph := ExtractSubgraph(curr, true)
|
nestedGraph, externalEdges := ExtractSubgraph(curr, true)
|
||||||
id := curr.AbsID()
|
id := curr.AbsID()
|
||||||
err := LayoutNested(ctx, nestedGraph, GraphInfo{}, coreLayout)
|
err := LayoutNested(ctx, nestedGraph, GraphInfo{}, coreLayout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -108,6 +111,7 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
|
||||||
}
|
}
|
||||||
|
|
||||||
InjectNested(g.Root, nestedGraph, false)
|
InjectNested(g.Root, nestedGraph, false)
|
||||||
|
g.Edges = append(g.Edges, externalEdges...)
|
||||||
restoreOrder()
|
restoreOrder()
|
||||||
|
|
||||||
// need to update curr *Object incase layout changed it
|
// need to update curr *Object incase layout changed it
|
||||||
|
|
@ -138,7 +142,8 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
|
||||||
}
|
}
|
||||||
|
|
||||||
// now we keep the descendants out until after grid layout
|
// now we keep the descendants out until after grid layout
|
||||||
nestedGraph = ExtractSubgraph(curr, false)
|
nestedGraph, externalEdges = ExtractSubgraph(curr, false)
|
||||||
|
extractedEdges = append(extractedEdges, externalEdges...)
|
||||||
|
|
||||||
extracted[id] = nestedGraph
|
extracted[id] = nestedGraph
|
||||||
extractedOrder = append(extractedOrder, id)
|
extractedOrder = append(extractedOrder, id)
|
||||||
|
|
@ -152,7 +157,8 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
|
||||||
}
|
}
|
||||||
|
|
||||||
// There is a nested diagram here, so extract its contents and process in the same way
|
// There is a nested diagram here, so extract its contents and process in the same way
|
||||||
nestedGraph := ExtractSubgraph(curr, gi.IsConstantNear)
|
nestedGraph, externalEdges := ExtractSubgraph(curr, gi.IsConstantNear)
|
||||||
|
extractedEdges = append(extractedEdges, externalEdges...)
|
||||||
|
|
||||||
log.Info(ctx, "layout nested", slog.F("level", curr.Level()), slog.F("child", curr.AbsID()), slog.F("gi", gi))
|
log.Info(ctx, "layout nested", slog.F("level", curr.Level()), slog.F("child", curr.AbsID()), slog.F("gi", gi))
|
||||||
nestedInfo := gi
|
nestedInfo := gi
|
||||||
|
|
@ -228,24 +234,51 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idToObj := make(map[string]*d2graph.Object)
|
||||||
|
for _, o := range g.Objects {
|
||||||
|
idToObj[o.AbsID()] = o
|
||||||
|
}
|
||||||
|
|
||||||
// With the layout set, inject all the extracted graphs
|
// With the layout set, inject all the extracted graphs
|
||||||
for _, id := range extractedOrder {
|
for _, id := range extractedOrder {
|
||||||
nestedGraph := extracted[id]
|
nestedGraph := extracted[id]
|
||||||
// we have to find the object by ID because coreLayout can replace the Objects in graph
|
// we have to find the object by ID because coreLayout can replace the Objects in graph
|
||||||
var obj *d2graph.Object
|
obj, exists := idToObj[id]
|
||||||
for _, o := range g.Objects {
|
if !exists {
|
||||||
if o.AbsID() == id {
|
|
||||||
obj = o
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if obj == nil {
|
|
||||||
return fmt.Errorf("could not find object %#v after layout", id)
|
return fmt.Errorf("could not find object %#v after layout", id)
|
||||||
}
|
}
|
||||||
InjectNested(obj, nestedGraph, true)
|
InjectNested(obj, nestedGraph, true)
|
||||||
PositionNested(obj, nestedGraph)
|
PositionNested(obj, nestedGraph)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update map with injected objects
|
||||||
|
for _, o := range g.Objects {
|
||||||
|
idToObj[o.AbsID()] = o
|
||||||
|
}
|
||||||
|
|
||||||
|
// Restore cross-graph edges and route them
|
||||||
|
g.Edges = append(g.Edges, extractedEdges...)
|
||||||
|
for _, e := range extractedEdges {
|
||||||
|
// update object references
|
||||||
|
src, exists := idToObj[e.Src.AbsID()]
|
||||||
|
if !exists {
|
||||||
|
return fmt.Errorf("could not find object %#v after layout", e.Src.AbsID())
|
||||||
|
}
|
||||||
|
e.Src = src
|
||||||
|
dst, exists := idToObj[e.Dst.AbsID()]
|
||||||
|
if !exists {
|
||||||
|
return fmt.Errorf("could not find object %#v after layout", e.Dst.AbsID())
|
||||||
|
}
|
||||||
|
e.Dst = dst
|
||||||
|
|
||||||
|
// simple straight line edge routing when going across graphs
|
||||||
|
e.Route = []*geo.Point{e.Src.Center(), e.Dst.Center()}
|
||||||
|
e.TraceToShape(e.Route, 0, 1)
|
||||||
|
if e.Label.Value != "" {
|
||||||
|
e.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.Debug(ctx, "done", slog.F("rootlevel", g.RootLevel), slog.F("shapes", g.PrintString()))
|
log.Debug(ctx, "done", slog.F("rootlevel", g.RootLevel), slog.F("shapes", g.PrintString()))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -262,10 +295,10 @@ func NestedGraphInfo(obj *d2graph.Object) (gi GraphInfo) {
|
||||||
return gi
|
return gi
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExtractSubgraph(container *d2graph.Object, includeSelf bool) *d2graph.Graph {
|
func ExtractSubgraph(container *d2graph.Object, includeSelf bool) (nestedGraph *d2graph.Graph, externalEdges []*d2graph.Edge) {
|
||||||
// includeSelf: when we have a constant near or a grid cell that is a container,
|
// includeSelf: when we have a constant near or a grid cell that is a container,
|
||||||
// we want to include itself in the nested graph, not just its descendants,
|
// we want to include itself in the nested graph, not just its descendants,
|
||||||
nestedGraph := d2graph.NewGraph()
|
nestedGraph = d2graph.NewGraph()
|
||||||
nestedGraph.RootLevel = int(container.Level())
|
nestedGraph.RootLevel = int(container.Level())
|
||||||
if includeSelf {
|
if includeSelf {
|
||||||
nestedGraph.RootLevel--
|
nestedGraph.RootLevel--
|
||||||
|
|
@ -284,11 +317,24 @@ func ExtractSubgraph(container *d2graph.Object, includeSelf bool) *d2graph.Graph
|
||||||
g := container.Graph
|
g := container.Graph
|
||||||
remainingEdges := make([]*d2graph.Edge, 0, len(g.Edges))
|
remainingEdges := make([]*d2graph.Edge, 0, len(g.Edges))
|
||||||
for _, edge := range g.Edges {
|
for _, edge := range g.Edges {
|
||||||
if isNestedObject(edge.Src) && isNestedObject(edge.Dst) {
|
srcIsNested := isNestedObject(edge.Src)
|
||||||
|
if d2sequence.IsLifelineEnd(edge.Dst) {
|
||||||
|
// special handling for lifelines since their edge.Dst is a special Object
|
||||||
|
if srcIsNested {
|
||||||
nestedGraph.Edges = append(nestedGraph.Edges, edge)
|
nestedGraph.Edges = append(nestedGraph.Edges, edge)
|
||||||
} else {
|
} else {
|
||||||
remainingEdges = append(remainingEdges, edge)
|
remainingEdges = append(remainingEdges, edge)
|
||||||
}
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
dstIsNested := isNestedObject(edge.Dst)
|
||||||
|
if srcIsNested && dstIsNested {
|
||||||
|
nestedGraph.Edges = append(nestedGraph.Edges, edge)
|
||||||
|
} else if srcIsNested || dstIsNested {
|
||||||
|
externalEdges = append(externalEdges, edge)
|
||||||
|
} else {
|
||||||
|
remainingEdges = append(remainingEdges, edge)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
g.Edges = remainingEdges
|
g.Edges = remainingEdges
|
||||||
|
|
||||||
|
|
@ -333,7 +379,7 @@ func ExtractSubgraph(container *d2graph.Object, includeSelf bool) *d2graph.Graph
|
||||||
container.ChildrenArray = nil
|
container.ChildrenArray = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return nestedGraph
|
return nestedGraph, externalEdges
|
||||||
}
|
}
|
||||||
|
|
||||||
func InjectNested(container *d2graph.Object, nestedGraph *d2graph.Graph, isRoot bool) {
|
func InjectNested(container *d2graph.Object, nestedGraph *d2graph.Graph, isRoot bool) {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"oss.terrastruct.com/util-go/go2"
|
"oss.terrastruct.com/util-go/go2"
|
||||||
|
|
@ -411,6 +412,25 @@ func (sd *sequenceDiagram) addLifelineEdges() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IsLifelineEnd(obj *d2graph.Object) bool {
|
||||||
|
// lifeline ends only have ID and no graph parent or box set
|
||||||
|
if obj.Graph != nil || obj.Parent != nil || obj.Box != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if !strings.Contains(obj.ID, "-lifeline-end-") {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
parts := strings.Split(obj.ID, "-lifeline-end-")
|
||||||
|
if len(parts) > 1 {
|
||||||
|
hash := parts[len(parts)-1]
|
||||||
|
actorID := strings.Join(parts[:len(parts)-1], "-lifeline-end-")
|
||||||
|
if strconv.Itoa(go2.StringToIntHash(actorID+"-lifeline-end")) == hash {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func (sd *sequenceDiagram) placeNotes() {
|
func (sd *sequenceDiagram) placeNotes() {
|
||||||
rankToX := make(map[int]float64)
|
rankToX := make(map[int]float64)
|
||||||
for _, actor := range sd.actors {
|
for _, actor := range sd.actors {
|
||||||
|
|
|
||||||
|
|
@ -2837,6 +2837,8 @@ y: profits {
|
||||||
loadFromFile(t, "grid_nested_simple_edges"),
|
loadFromFile(t, "grid_nested_simple_edges"),
|
||||||
loadFromFile(t, "nested_diagram_types"),
|
loadFromFile(t, "nested_diagram_types"),
|
||||||
loadFromFile(t, "grid_outside_labels"),
|
loadFromFile(t, "grid_outside_labels"),
|
||||||
|
loadFromFile(t, "grid_edge_across_cell"),
|
||||||
|
loadFromFile(t, "nesting_power"),
|
||||||
}
|
}
|
||||||
|
|
||||||
runa(t, tcs)
|
runa(t, tcs)
|
||||||
|
|
|
||||||
17
e2etests/testdata/files/grid_edge_across_cell.d2
vendored
Normal file
17
e2etests/testdata/files/grid_edge_across_cell.d2
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
classes.red.style.stroke: red
|
||||||
|
grid: {
|
||||||
|
grid-columns: 2
|
||||||
|
grid-gap: 10
|
||||||
|
|
||||||
|
cell 1.a -> cell 2.b -> cell 3.c.d: {
|
||||||
|
class: red
|
||||||
|
}
|
||||||
|
|
||||||
|
cell 3: {
|
||||||
|
c -> e
|
||||||
|
c.d -> f.g
|
||||||
|
}
|
||||||
|
cell 3.f.g -> cell 1.a: {
|
||||||
|
class: red
|
||||||
|
}
|
||||||
|
}
|
||||||
267
e2etests/testdata/files/nesting_power.d2
vendored
Normal file
267
e2etests/testdata/files/nesting_power.d2
vendored
Normal file
|
|
@ -0,0 +1,267 @@
|
||||||
|
l: Left Constant Near {
|
||||||
|
direction: right
|
||||||
|
near: center-left
|
||||||
|
|
||||||
|
default -> layout -> here
|
||||||
|
default: {
|
||||||
|
direction: right
|
||||||
|
dagre -- elk -- tala: or
|
||||||
|
}
|
||||||
|
default.* -> layout: runs this
|
||||||
|
|
||||||
|
here: {
|
||||||
|
grid-columns: 3
|
||||||
|
|
||||||
|
this -> is
|
||||||
|
|
||||||
|
this: {
|
||||||
|
grid-rows: 5
|
||||||
|
row 1 -> row 2 -> row 3 -> row 4 -> row 5
|
||||||
|
}
|
||||||
|
|
||||||
|
is -> grid: A {style.font-size: 24}
|
||||||
|
|
||||||
|
grid: {
|
||||||
|
shape: sequence_diagram
|
||||||
|
|
||||||
|
with -> a -> sequence diagram.x -> you can
|
||||||
|
|
||||||
|
you can: {
|
||||||
|
grid-rows: 2
|
||||||
|
grid-columns: 2
|
||||||
|
grid-gap: 0
|
||||||
|
|
||||||
|
have
|
||||||
|
another
|
||||||
|
grid: {
|
||||||
|
grid-rows: 3
|
||||||
|
horizontal-gap: 10
|
||||||
|
vertical-gap: 20
|
||||||
|
1 -> 2 -> 3
|
||||||
|
}
|
||||||
|
|
||||||
|
here and: {
|
||||||
|
shape: sequence_diagram
|
||||||
|
continue -> nesting
|
||||||
|
}
|
||||||
|
}
|
||||||
|
you can.here and.nesting -> sequence diagram.x: {class: green}
|
||||||
|
}
|
||||||
|
this.row 2 -> is.child of is.grandchild: {class: green}
|
||||||
|
# this.row 2 -> grid.you can
|
||||||
|
}
|
||||||
|
here.this.row 5 -> default.dagre: straight edge across {class: green}
|
||||||
|
here.this.row 1 <- default.tala: straight edge across nested types {class: green}
|
||||||
|
}
|
||||||
|
|
||||||
|
center -> directions: default layout
|
||||||
|
|
||||||
|
center: {
|
||||||
|
rectangle: {shape: "rectangle"}
|
||||||
|
square: {shape: "square"}
|
||||||
|
page: {shape: "page"}
|
||||||
|
parallelogram: {shape: "parallelogram"}
|
||||||
|
document: {shape: "document"}
|
||||||
|
cylinder: {shape: "cylinder"}
|
||||||
|
queue: {shape: "queue"}
|
||||||
|
package: {shape: "package"}
|
||||||
|
step: {shape: "step"}
|
||||||
|
callout: {shape: "callout"}
|
||||||
|
stored_data: {shape: "stored_data"}
|
||||||
|
person: {shape: "person"}
|
||||||
|
diamond: {shape: "diamond"}
|
||||||
|
oval: {shape: "oval"}
|
||||||
|
circle: {shape: "circle"}
|
||||||
|
hexagon: {shape: "hexagon"}
|
||||||
|
cloud: {shape: "cloud"}
|
||||||
|
|
||||||
|
rectangle -> square -> page
|
||||||
|
parallelogram -> document -> cylinder
|
||||||
|
queue -> package -> step
|
||||||
|
callout -> stored_data -> person
|
||||||
|
diamond -> oval -> circle
|
||||||
|
hexagon -> cloud
|
||||||
|
|
||||||
|
*.style.multiple: true
|
||||||
|
}
|
||||||
|
|
||||||
|
directions: {
|
||||||
|
grid-rows: 3
|
||||||
|
|
||||||
|
r: right {
|
||||||
|
direction: right
|
||||||
|
1 -> 2 -> 3
|
||||||
|
2 -> 4
|
||||||
|
}
|
||||||
|
l: left {
|
||||||
|
direction: left
|
||||||
|
1 -> 2 -> 3
|
||||||
|
2 -> 4
|
||||||
|
}
|
||||||
|
v: "" {
|
||||||
|
grid-columns: 2
|
||||||
|
grid-gap: 0
|
||||||
|
u: up {
|
||||||
|
direction: up
|
||||||
|
1 -> 2 -> 3
|
||||||
|
2 -> 4
|
||||||
|
}
|
||||||
|
d: down {
|
||||||
|
direction: down
|
||||||
|
1 -> 2 -> 3
|
||||||
|
2 -> 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# center -> tl
|
||||||
|
r: Right Constant Near {
|
||||||
|
near: center-right
|
||||||
|
|
||||||
|
grid-columns: 5
|
||||||
|
|
||||||
|
is -> constant.n -> and -> also.a -> grid: {class: green}
|
||||||
|
constant.n: near
|
||||||
|
}
|
||||||
|
|
||||||
|
center -> seq: default layout
|
||||||
|
|
||||||
|
seq: {
|
||||||
|
shape: sequence_diagram
|
||||||
|
scorer: {
|
||||||
|
style.stroke: red
|
||||||
|
style.stroke-width: 5
|
||||||
|
}
|
||||||
|
|
||||||
|
scorer.abc: {
|
||||||
|
style.fill: yellow
|
||||||
|
style.stroke-width: 7
|
||||||
|
}
|
||||||
|
|
||||||
|
scorer -> itemResponse.a: {
|
||||||
|
style.stroke-width: 10
|
||||||
|
}
|
||||||
|
itemResponse.a -> item.a.b
|
||||||
|
item.a.b -> essayRubric.a.b.c
|
||||||
|
essayRubric.a.b.c -> concept.a.b.c.d
|
||||||
|
item.a -> essayRubric.a.b
|
||||||
|
concept.a.b.c.d -> itemOutcome.a.b.c.d.e
|
||||||
|
|
||||||
|
scorer.abc -> item.a
|
||||||
|
|
||||||
|
itemOutcome.a.b.c.d.e -> scorer
|
||||||
|
scorer -> itemResponse.c
|
||||||
|
}
|
||||||
|
|
||||||
|
center -> more: default layout
|
||||||
|
|
||||||
|
more: {
|
||||||
|
grid-rows: 2
|
||||||
|
stylish: {
|
||||||
|
grid-columns: 2
|
||||||
|
horizontal-gap: 100
|
||||||
|
x: {
|
||||||
|
style: {
|
||||||
|
opacity: 0.6
|
||||||
|
fill: orange
|
||||||
|
stroke: "#53C0D8"
|
||||||
|
stroke-width: 5
|
||||||
|
shadow: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
y: {
|
||||||
|
style: {
|
||||||
|
stroke-dash: 5
|
||||||
|
opacity: 0.6
|
||||||
|
fill: red
|
||||||
|
3d: true
|
||||||
|
stroke: black
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
x -> y: in style {
|
||||||
|
style: {
|
||||||
|
stroke: purple
|
||||||
|
stroke-width: 2
|
||||||
|
stroke-dash: 5
|
||||||
|
fill: lavender
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stylish.y -> container.a_sequence: {class: green}
|
||||||
|
|
||||||
|
container: {
|
||||||
|
a_shape.shape: circle
|
||||||
|
a_sequence: {
|
||||||
|
shape: sequence_diagram
|
||||||
|
|
||||||
|
scorer.t -> itemResponse.t: getItem()
|
||||||
|
scorer.t <- itemResponse.t: item
|
||||||
|
|
||||||
|
scorer.t -> item.t1: getRubric()
|
||||||
|
scorer.t <- item.t1: rubric
|
||||||
|
|
||||||
|
scorer.t -> essayRubric.t: applyTo(essayResp)
|
||||||
|
itemResponse -> essayRubric.t.c
|
||||||
|
essayRubric.t.c -> concept.t: match(essayResponse)
|
||||||
|
scorer <- essayRubric.t: score
|
||||||
|
}
|
||||||
|
|
||||||
|
a_shape -> a_sequence
|
||||||
|
a_sequence -> sequence
|
||||||
|
a_shape -- finally
|
||||||
|
|
||||||
|
finally: {
|
||||||
|
shape: queue
|
||||||
|
sequence: {
|
||||||
|
shape: sequence_diagram
|
||||||
|
# items appear in this order
|
||||||
|
scorer: {
|
||||||
|
style.stroke: red
|
||||||
|
style.stroke-dash: 2
|
||||||
|
}
|
||||||
|
concept: {
|
||||||
|
style.stroke-width: 6
|
||||||
|
}
|
||||||
|
essayRubric
|
||||||
|
item
|
||||||
|
itemOutcome
|
||||||
|
itemResponse
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally -- sequence
|
||||||
|
|
||||||
|
# full path edges
|
||||||
|
finally.sequence.itemResponse.a -> finally.sequence.item.a.b
|
||||||
|
finally.sequence.item.a.b -> finally.sequence.essayRubric.a.b.c
|
||||||
|
finally.sequence.essayRubric.a.b.c -> finally.sequence.concept.a.b.c.d
|
||||||
|
finally.sequence.item.a -> finally.sequence.essayRubric.a.b
|
||||||
|
finally.sequence.concept.a.b.c.d -> finally.sequence.itemOutcome.a.b.c.d.e
|
||||||
|
finally.sequence.scorer.abc -> finally.sequence.item.a
|
||||||
|
finally.sequence.itemOutcome.a.b.c.d.e -> finally.sequence.scorer
|
||||||
|
finally.sequence.scorer -> finally.sequence.itemResponse.c
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
more.container.a_sequence -> directions.v.d.4: {class: green}
|
||||||
|
directions.l.2 -> center.step: {class: green}
|
||||||
|
center.step -> more.stylish.x: {class: green}
|
||||||
|
directions.l.1 -> seq.item.a.b: to inside sequence diagram {class: green}
|
||||||
|
directions.l.1 -> seq.itemResponse.a: to inside sequence diagram {class: green}
|
||||||
|
directions.v.d.2 -> seq.scorer.abc: to inside sequence diagram {class: green}
|
||||||
|
|
||||||
|
center.cloud -> more.stylish: {class: green}
|
||||||
|
more.container.a_shape -> r.is: to constant near {class: green}
|
||||||
|
l.here.this.row 5 -> directions.v.u.1: from within constant near {class: green}
|
||||||
|
|
||||||
|
bl: Bottom Left Constant Near {
|
||||||
|
near: bottom-left
|
||||||
|
a.b
|
||||||
|
}
|
||||||
|
bl.a.b.from one constant near -> l.default.dagre: to another {class: green}
|
||||||
|
|
||||||
|
classes.green.style: {
|
||||||
|
stroke: green
|
||||||
|
stroke-width: 5
|
||||||
|
}
|
||||||
729
e2etests/testdata/stable/grid_edge_across_cell/dagre/board.exp.json
generated
vendored
Normal file
729
e2etests/testdata/stable/grid_edge_across_cell/dagre/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,729 @@
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"isFolderOnly": false,
|
||||||
|
"fontFamily": "SourceSansPro",
|
||||||
|
"shapes": [
|
||||||
|
{
|
||||||
|
"id": "grid",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"width": 424,
|
||||||
|
"height": 550,
|
||||||
|
"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": "grid",
|
||||||
|
"fontSize": 28,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 44,
|
||||||
|
"labelHeight": 36,
|
||||||
|
"labelPosition": "INSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 1",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 10,
|
||||||
|
"y": 82
|
||||||
|
},
|
||||||
|
"width": 113,
|
||||||
|
"height": 206,
|
||||||
|
"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": "cell 1",
|
||||||
|
"fontSize": 24,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 50,
|
||||||
|
"labelHeight": 31,
|
||||||
|
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 1.a",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 40,
|
||||||
|
"y": 112
|
||||||
|
},
|
||||||
|
"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": "a",
|
||||||
|
"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": "grid.cell 2",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 10,
|
||||||
|
"y": 334
|
||||||
|
},
|
||||||
|
"width": 113,
|
||||||
|
"height": 206,
|
||||||
|
"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": "cell 2",
|
||||||
|
"fontSize": 24,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 50,
|
||||||
|
"labelHeight": 31,
|
||||||
|
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 2.b",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 40,
|
||||||
|
"y": 364
|
||||||
|
},
|
||||||
|
"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": "b",
|
||||||
|
"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": "grid.cell 3",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 133,
|
||||||
|
"y": 82
|
||||||
|
},
|
||||||
|
"width": 280,
|
||||||
|
"height": 458,
|
||||||
|
"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": "cell 3",
|
||||||
|
"fontSize": 24,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 50,
|
||||||
|
"labelHeight": 31,
|
||||||
|
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.c",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 163,
|
||||||
|
"y": 118
|
||||||
|
},
|
||||||
|
"width": 154,
|
||||||
|
"height": 126,
|
||||||
|
"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": "c",
|
||||||
|
"fontSize": 20,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 9,
|
||||||
|
"labelHeight": 26,
|
||||||
|
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.c.d",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 233,
|
||||||
|
"y": 148
|
||||||
|
},
|
||||||
|
"width": 54,
|
||||||
|
"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": "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": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.e",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 166,
|
||||||
|
"y": 414
|
||||||
|
},
|
||||||
|
"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": "grid.cell 3.f",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 269,
|
||||||
|
"y": 384
|
||||||
|
},
|
||||||
|
"width": 114,
|
||||||
|
"height": 126,
|
||||||
|
"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": 20,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 7,
|
||||||
|
"labelHeight": 26,
|
||||||
|
"labelPosition": "OUTSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.f.g",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 299,
|
||||||
|
"y": 414
|
||||||
|
},
|
||||||
|
"width": 54,
|
||||||
|
"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": "g",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": true,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 9,
|
||||||
|
"labelHeight": 21,
|
||||||
|
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connections": [
|
||||||
|
{
|
||||||
|
"id": "grid.(cell 1.a -> cell 2.b)[0]",
|
||||||
|
"classes": [
|
||||||
|
"red"
|
||||||
|
],
|
||||||
|
"src": "grid.cell 1.a",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 2.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": 66.5,
|
||||||
|
"y": 178
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 66.5,
|
||||||
|
"y": 364
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"animated": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"icon": null,
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.(cell 2.b -> cell 3.c.d)[0]",
|
||||||
|
"classes": [
|
||||||
|
"red"
|
||||||
|
],
|
||||||
|
"src": "grid.cell 2.b",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 3.c.d",
|
||||||
|
"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": 93.25,
|
||||||
|
"y": 367
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 233.25,
|
||||||
|
"y": 211
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"animated": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"icon": null,
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.(c -> e)[0]",
|
||||||
|
"src": "grid.cell 3.c",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 3.e",
|
||||||
|
"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": 193,
|
||||||
|
"y": 244
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 193,
|
||||||
|
"y": 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 193,
|
||||||
|
"y": 374
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 193,
|
||||||
|
"y": 414
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isCurve": true,
|
||||||
|
"animated": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"icon": null,
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.(c.d -> f.g)[0]",
|
||||||
|
"src": "grid.cell 3.c.d",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 3.f.g",
|
||||||
|
"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": 286.5,
|
||||||
|
"y": 214
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 318.5,
|
||||||
|
"y": 254
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 326.5,
|
||||||
|
"y": 274
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 326.5,
|
||||||
|
"y": 289
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 326.5,
|
||||||
|
"y": 304
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 326.5,
|
||||||
|
"y": 374
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 326.5,
|
||||||
|
"y": 414
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"isCurve": true,
|
||||||
|
"animated": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"icon": null,
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.(cell 3.f.g -> cell 1.a)[0]",
|
||||||
|
"classes": [
|
||||||
|
"red"
|
||||||
|
],
|
||||||
|
"src": "grid.cell 3.f.g",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 1.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": 299.5,
|
||||||
|
"y": 416
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 92.5,
|
||||||
|
"y": 176
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
112
e2etests/testdata/stable/grid_edge_across_cell/dagre/sketch.exp.svg
vendored
Normal file
112
e2etests/testdata/stable/grid_edge_across_cell/dagre/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 19 KiB |
707
e2etests/testdata/stable/grid_edge_across_cell/elk/board.exp.json
generated
vendored
Normal file
707
e2etests/testdata/stable/grid_edge_across_cell/elk/board.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,707 @@
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"isFolderOnly": false,
|
||||||
|
"fontFamily": "SourceSansPro",
|
||||||
|
"shapes": [
|
||||||
|
{
|
||||||
|
"id": "grid",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 12,
|
||||||
|
"y": 12
|
||||||
|
},
|
||||||
|
"width": 510,
|
||||||
|
"height": 578,
|
||||||
|
"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": "grid",
|
||||||
|
"fontSize": 28,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 44,
|
||||||
|
"labelHeight": 36,
|
||||||
|
"labelPosition": "INSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 1",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 22,
|
||||||
|
"y": 58
|
||||||
|
},
|
||||||
|
"width": 153,
|
||||||
|
"height": 256,
|
||||||
|
"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": "cell 1",
|
||||||
|
"fontSize": 24,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 50,
|
||||||
|
"labelHeight": 31,
|
||||||
|
"labelPosition": "INSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 1.a",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 72,
|
||||||
|
"y": 108
|
||||||
|
},
|
||||||
|
"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": "a",
|
||||||
|
"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": "grid.cell 2",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 22,
|
||||||
|
"y": 324
|
||||||
|
},
|
||||||
|
"width": 153,
|
||||||
|
"height": 256,
|
||||||
|
"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": "cell 2",
|
||||||
|
"fontSize": 24,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 50,
|
||||||
|
"labelHeight": 31,
|
||||||
|
"labelPosition": "INSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 2.b",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 72,
|
||||||
|
"y": 374
|
||||||
|
},
|
||||||
|
"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": "b",
|
||||||
|
"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": "grid.cell 3",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 185,
|
||||||
|
"y": 58
|
||||||
|
},
|
||||||
|
"width": 327,
|
||||||
|
"height": 522,
|
||||||
|
"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": "cell 3",
|
||||||
|
"fontSize": 24,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 50,
|
||||||
|
"labelHeight": 31,
|
||||||
|
"labelPosition": "INSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.c",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 251,
|
||||||
|
"y": 108
|
||||||
|
},
|
||||||
|
"width": 154,
|
||||||
|
"height": 166,
|
||||||
|
"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": "c",
|
||||||
|
"fontSize": 20,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 9,
|
||||||
|
"labelHeight": 26,
|
||||||
|
"labelPosition": "INSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.c.d",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 301,
|
||||||
|
"y": 158
|
||||||
|
},
|
||||||
|
"width": 54,
|
||||||
|
"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": "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": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.e",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 235,
|
||||||
|
"y": 364
|
||||||
|
},
|
||||||
|
"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": "grid.cell 3.f",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 308,
|
||||||
|
"y": 364
|
||||||
|
},
|
||||||
|
"width": 154,
|
||||||
|
"height": 166,
|
||||||
|
"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": 20,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": false,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 7,
|
||||||
|
"labelHeight": 26,
|
||||||
|
"labelPosition": "INSIDE_TOP_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.f.g",
|
||||||
|
"type": "rectangle",
|
||||||
|
"pos": {
|
||||||
|
"x": 358,
|
||||||
|
"y": 414
|
||||||
|
},
|
||||||
|
"width": 54,
|
||||||
|
"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": "g",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontFamily": "DEFAULT",
|
||||||
|
"language": "",
|
||||||
|
"color": "N1",
|
||||||
|
"italic": false,
|
||||||
|
"bold": true,
|
||||||
|
"underline": false,
|
||||||
|
"labelWidth": 9,
|
||||||
|
"labelHeight": 21,
|
||||||
|
"labelPosition": "INSIDE_MIDDLE_CENTER",
|
||||||
|
"zIndex": 0,
|
||||||
|
"level": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"connections": [
|
||||||
|
{
|
||||||
|
"id": "grid.(cell 1.a -> cell 2.b)[0]",
|
||||||
|
"classes": [
|
||||||
|
"red"
|
||||||
|
],
|
||||||
|
"src": "grid.cell 1.a",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 2.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": 98.5,
|
||||||
|
"y": 174
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 98.5,
|
||||||
|
"y": 374
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"animated": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"icon": null,
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.(cell 2.b -> cell 3.c.d)[0]",
|
||||||
|
"classes": [
|
||||||
|
"red"
|
||||||
|
],
|
||||||
|
"src": "grid.cell 2.b",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 3.c.d",
|
||||||
|
"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": 125.25,
|
||||||
|
"y": 382
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 301.25,
|
||||||
|
"y": 216
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"animated": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"icon": null,
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.(c -> e)[0]",
|
||||||
|
"src": "grid.cell 3.c",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 3.e",
|
||||||
|
"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": 261.5,
|
||||||
|
"y": 274
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 261.5,
|
||||||
|
"y": 364
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"animated": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"icon": null,
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.cell 3.(c.d -> f.g)[0]",
|
||||||
|
"src": "grid.cell 3.c.d",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 3.f.g",
|
||||||
|
"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": 328.25,
|
||||||
|
"y": 224
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 328.25,
|
||||||
|
"y": 319
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 385,
|
||||||
|
"y": 319
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 385,
|
||||||
|
"y": 414
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"animated": false,
|
||||||
|
"tooltip": "",
|
||||||
|
"icon": null,
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "grid.(cell 3.f.g -> cell 1.a)[0]",
|
||||||
|
"classes": [
|
||||||
|
"red"
|
||||||
|
],
|
||||||
|
"src": "grid.cell 3.f.g",
|
||||||
|
"srcArrow": "none",
|
||||||
|
"dst": "grid.cell 1.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": 358.5,
|
||||||
|
"y": 418
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 124.5,
|
||||||
|
"y": 169
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
112
e2etests/testdata/stable/grid_edge_across_cell/elk/sketch.exp.svg
vendored
Normal file
112
e2etests/testdata/stable/grid_edge_across_cell/elk/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 19 KiB |
11108
e2etests/testdata/stable/nesting_power/dagre/board.exp.json
generated
vendored
Normal file
11108
e2etests/testdata/stable/nesting_power/dagre/board.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
252
e2etests/testdata/stable/nesting_power/dagre/sketch.exp.svg
vendored
Normal file
252
e2etests/testdata/stable/nesting_power/dagre/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 116 KiB |
10831
e2etests/testdata/stable/nesting_power/elk/board.exp.json
generated
vendored
Normal file
10831
e2etests/testdata/stable/nesting_power/elk/board.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
252
e2etests/testdata/stable/nesting_power/elk/sketch.exp.svg
vendored
Normal file
252
e2etests/testdata/stable/nesting_power/elk/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 117 KiB |
18
testdata/d2compiler/TestCompile/grid_deeper_edge.exp.json
generated
vendored
18
testdata/d2compiler/TestCompile/grid_deeper_edge.exp.json
generated
vendored
|
|
@ -3,23 +3,7 @@
|
||||||
"err": {
|
"err": {
|
||||||
"errs": [
|
"errs": [
|
||||||
{
|
{
|
||||||
"range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,16:2:199-16:10:207",
|
"range": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2,21:1:279-21:9:287",
|
||||||
"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,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"
|
"errmsg": "d2/testdata/d2compiler/TestCompile/grid_deeper_edge.d2:22:2: edge from grid diagram \"hey.a\" cannot enter itself"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
8
testdata/d2compiler/TestCompile/grid_edge.exp.json
generated
vendored
8
testdata/d2compiler/TestCompile/grid_edge.exp.json
generated
vendored
|
|
@ -2,14 +2,6 @@
|
||||||
"graph": null,
|
"graph": null,
|
||||||
"err": {
|
"err": {
|
||||||
"errs": [
|
"errs": [
|
||||||
{
|
|
||||||
"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: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:0:57-6:12:69",
|
"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"
|
"errmsg": "d2/testdata/d2compiler/TestCompile/grid_edge.d2:7:1: edge from grid diagram \"hey\" cannot enter itself"
|
||||||
|
|
|
||||||
407
testdata/d2compiler/TestCompile/leaky_sequence.exp.json
generated
vendored
407
testdata/d2compiler/TestCompile/leaky_sequence.exp.json
generated
vendored
|
|
@ -1,11 +1,408 @@
|
||||||
{
|
{
|
||||||
"graph": null,
|
"graph": {
|
||||||
"err": {
|
"name": "",
|
||||||
"errs": [
|
"isFolderOnly": false,
|
||||||
|
"ast": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,0:0:0-5:0:46",
|
||||||
|
"nodes": [
|
||||||
{
|
{
|
||||||
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:0:37-4:8:45",
|
"map_key": {
|
||||||
"errmsg": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2:5:1: connections within sequence diagrams can connect only to other objects within the same sequence diagram"
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,0:0:0-3:1:36",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,0:0:0-0:1:1",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,0:0:0-0:1:1",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"map": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,0:3:3-3:1:36",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,1:2:7-1:25:30",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,1:2:7-1:7:12",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,1:2:7-1:7:12",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "shape",
|
||||||
|
"raw_string": "shape"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,1:9:14-1:25:30",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "sequence_diagram",
|
||||||
|
"raw_string": "sequence_diagram"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,2:2:33-2:3:34",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,2:2:33-2:3:34",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,2:2:33-2:3:34",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:0:37-4:8:45",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:0:37-4:8:45",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:0:37-4:1:38",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:0:37-4:1:38",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:5:42-4:8:45",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:5:42-4:6:43",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:7:44-4:8:45",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"id": "",
|
||||||
|
"id_val": "",
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"index": 0,
|
||||||
|
"isCurve": false,
|
||||||
|
"src_arrow": false,
|
||||||
|
"dst_arrow": true,
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"objects": [
|
||||||
|
{
|
||||||
|
"id": "x",
|
||||||
|
"id_val": "x",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,0:0:0-0:1:1",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,0:0:0-0:1:1",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": -1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:5:42-4:8:45",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:5:42-4:6:43",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:7:44-4:8:45",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "x"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "sequence_diagram"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "a",
|
||||||
|
"id_val": "a",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,2:2:33-2:3:34",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,2:2:33-2:3:34",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": -1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:5:42-4:8:45",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:5:42-4:6:43",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:7:44-4:8:45",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "a",
|
||||||
|
"raw_string": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 1,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "a"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "b",
|
||||||
|
"id_val": "b",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:0:37-4:1:38",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/leaky_sequence.d2,4:0:37-4:1:38",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "b",
|
||||||
|
"raw_string": "b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "b"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"err": null
|
||||||
|
}
|
||||||
|
|
|
||||||
301
testdata/d2compiler/TestCompile/near_bad_connected.exp.json
generated
vendored
301
testdata/d2compiler/TestCompile/near_bad_connected.exp.json
generated
vendored
|
|
@ -1,11 +1,302 @@
|
||||||
{
|
{
|
||||||
"graph": null,
|
"graph": {
|
||||||
"err": {
|
"name": "",
|
||||||
"errs": [
|
"isFolderOnly": false,
|
||||||
|
"ast": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,0:0:0-5:3:52",
|
||||||
|
"nodes": [
|
||||||
{
|
{
|
||||||
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:4:42-4:10:48",
|
"map_key": {
|
||||||
"errmsg": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2:5:5: cannot connect objects from within a container, that has near constant set, to objects outside that container"
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,1:4:5-3:5:37",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,1:4:5-1:5:6",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,1:4:5-1:5:6",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"map": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,1:7:8-3:5:37",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,2:5:15-2:21:31",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,2:5:15-2:9:19",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,2:5:15-2:9:19",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "near",
|
||||||
|
"raw_string": "near"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,2:11:21-2:21:31",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "top-center",
|
||||||
|
"raw_string": "top-center"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:4:42-4:10:48",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:4:42-4:10:48",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:4:42-4:5:43",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:4:42-4:5:43",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:9:47-4:10:48",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:9:47-4:10:48",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "y",
|
||||||
|
"raw_string": "y"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"id": "",
|
||||||
|
"id_val": "",
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"index": 0,
|
||||||
|
"isCurve": false,
|
||||||
|
"src_arrow": false,
|
||||||
|
"dst_arrow": true,
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"objects": [
|
||||||
|
{
|
||||||
|
"id": "x",
|
||||||
|
"id_val": "x",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,1:4:5-1:5:6",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,1:4:5-1:5:6",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": -1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:4:42-4:5:43",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:4:42-4:5:43",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "x"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,2:11:21-2:21:31",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": ",0:0:0-0:10:10",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "top-center",
|
||||||
|
"raw_string": "top-center"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "y",
|
||||||
|
"id_val": "y",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:9:47-4:10:48",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_bad_connected.d2,4:9:47-4:10:48",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "y",
|
||||||
|
"raw_string": "y"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "y"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"err": null
|
||||||
|
}
|
||||||
|
|
|
||||||
422
testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.exp.json
generated
vendored
422
testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.exp.json
generated
vendored
|
|
@ -1,11 +1,423 @@
|
||||||
{
|
{
|
||||||
"graph": null,
|
"graph": {
|
||||||
"err": {
|
"name": "",
|
||||||
"errs": [
|
"isFolderOnly": false,
|
||||||
|
"ast": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,0:0:0-6:3:59",
|
||||||
|
"nodes": [
|
||||||
{
|
{
|
||||||
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:12:55",
|
"map_key": {
|
||||||
"errmsg": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2:6:5: cannot connect objects from within a container, that has near constant set, to objects outside that container"
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,1:4:5-4:5:42",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,1:4:5-1:5:6",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,1:4:5-1:5:6",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"map": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,1:7:8-4:5:42",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,2:5:15-2:19:29",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,2:5:15-2:9:19",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,2:5:15-2:9:19",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "near",
|
||||||
|
"raw_string": "near"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,2:11:21-2:19:29",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "top-left",
|
||||||
|
"raw_string": "top-left"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,3:5:35-3:6:36",
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,3:5:35-3:6:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,3:5:35-3:6:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "y",
|
||||||
|
"raw_string": "y"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"map_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:12:55",
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:12:55",
|
||||||
|
"src": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:7:50",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:5:48",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:6:49-5:7:50",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "y",
|
||||||
|
"raw_string": "y"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"src_arrow": "",
|
||||||
|
"dst": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:11:54-5:12:55",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:11:54-5:12:55",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "z",
|
||||||
|
"raw_string": "z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dst_arrow": ">"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"primary": {},
|
||||||
|
"value": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"id": "",
|
||||||
|
"id_val": "",
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"index": 0,
|
||||||
|
"isCurve": false,
|
||||||
|
"src_arrow": false,
|
||||||
|
"dst_arrow": true,
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"objects": [
|
||||||
|
{
|
||||||
|
"id": "x",
|
||||||
|
"id_val": "x",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,1:4:5-1:5:6",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,1:4:5-1:5:6",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": -1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:7:50",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:5:48",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:6:49-5:7:50",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "y",
|
||||||
|
"raw_string": "y"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "x"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,2:11:21-2:19:29",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": ",0:0:0-0:8:8",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "top-left",
|
||||||
|
"raw_string": "top-left"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "y",
|
||||||
|
"id_val": "y",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,3:5:35-3:6:36",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,3:5:35-3:6:36",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "y",
|
||||||
|
"raw_string": "y"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": -1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:7:50",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:4:47-5:5:48",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "x",
|
||||||
|
"raw_string": "x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:6:49-5:7:50",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "y",
|
||||||
|
"raw_string": "y"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 1,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "y"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "z",
|
||||||
|
"id_val": "z",
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"key": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:11:54-5:12:55",
|
||||||
|
"path": [
|
||||||
|
{
|
||||||
|
"unquoted_string": {
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/near_descendant_connect_to_outside.d2,5:11:54-5:12:55",
|
||||||
|
"value": [
|
||||||
|
{
|
||||||
|
"string": "z",
|
||||||
|
"raw_string": "z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"key_path_index": 0,
|
||||||
|
"map_key_edge_index": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attributes": {
|
||||||
|
"label": {
|
||||||
|
"value": "z"
|
||||||
|
},
|
||||||
|
"labelDimensions": {
|
||||||
|
"width": 0,
|
||||||
|
"height": 0
|
||||||
|
},
|
||||||
|
"style": {},
|
||||||
|
"near_key": null,
|
||||||
|
"shape": {
|
||||||
|
"value": "rectangle"
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"constraint": null
|
||||||
|
},
|
||||||
|
"zIndex": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"err": null
|
||||||
|
}
|
||||||
|
|
|
||||||
39
testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.exp.json
generated
vendored
Normal file
39
testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.exp.json
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
"graph": null,
|
||||||
|
"err": {
|
||||||
|
"errs": [
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2,12:0:102-12:10:112",
|
||||||
|
"errmsg": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:13:1: edge from constant near \"tl\" cannot enter itself"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2,13:0:117-13:12:129",
|
||||||
|
"errmsg": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:14:1: edge from constant near \"tl\" cannot enter itself"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2,16:0:178-16:24:202",
|
||||||
|
"errmsg": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:17:1: edge from grid cell \"grid.cell\" cannot enter itself"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2,17:0:207-17:26:233",
|
||||||
|
"errmsg": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:18:1: edge from grid cell \"grid.cell\" cannot enter itself"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2,14:0:134-14:16:150",
|
||||||
|
"errmsg": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:15:1: edge from grid diagram \"grid\" cannot enter itself"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2,15:0:155-15:18:173",
|
||||||
|
"errmsg": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:16:1: edge from grid diagram \"grid\" cannot enter itself"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2,18:0:238-18:12:250",
|
||||||
|
"errmsg": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:19:1: edge from sequence diagram \"seq\" cannot enter itself"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"range": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2,19:0:255-19:14:269",
|
||||||
|
"errmsg": "d2/testdata/d2compiler/TestCompile/parent_graph_edge_to_descendant.d2:20:1: edge from sequence diagram \"seq\" cannot enter itself"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue