wip
This commit is contained in:
parent
b7791c83ea
commit
37351436a4
2 changed files with 36 additions and 34 deletions
|
|
@ -171,7 +171,7 @@ func NestedGraphInfo(obj *d2graph.Object) (gi GraphInfo) {
|
||||||
func ExtractSelf(container *d2graph.Object) *d2graph.Graph {
|
func ExtractSelf(container *d2graph.Object) *d2graph.Graph {
|
||||||
nestedGraph := d2graph.NewGraph()
|
nestedGraph := d2graph.NewGraph()
|
||||||
nestedGraph.RootLevel = int(container.Level()) - 1
|
nestedGraph.RootLevel = int(container.Level()) - 1
|
||||||
// nestedGraph.Root.Box = &geo.Box{}
|
nestedGraph.Root.Box = &geo.Box{}
|
||||||
|
|
||||||
// separate out nested edges
|
// separate out nested edges
|
||||||
g := container.Graph
|
g := container.Graph
|
||||||
|
|
@ -217,6 +217,7 @@ func ExtractSelf(container *d2graph.Object) *d2graph.Graph {
|
||||||
func ExtractDescendants(container *d2graph.Object) *d2graph.Graph {
|
func ExtractDescendants(container *d2graph.Object) *d2graph.Graph {
|
||||||
nestedGraph := d2graph.NewGraph()
|
nestedGraph := d2graph.NewGraph()
|
||||||
nestedGraph.RootLevel = int(container.Level())
|
nestedGraph.RootLevel = int(container.Level())
|
||||||
|
nestedGraph.Root.Attributes = container.Attributes
|
||||||
nestedGraph.Root.Box = &geo.Box{}
|
nestedGraph.Root.Box = &geo.Box{}
|
||||||
|
|
||||||
// separate out nested edges
|
// separate out nested edges
|
||||||
|
|
|
||||||
67
e2etests/testdata/files/nested_diagram_types.d2
vendored
67
e2etests/testdata/files/nested_diagram_types.d2
vendored
|
|
@ -1,47 +1,48 @@
|
||||||
a
|
a
|
||||||
b
|
# b
|
||||||
c
|
# c
|
||||||
|
|
||||||
a: {
|
a: {
|
||||||
grid-rows: 3
|
grid-rows: 3
|
||||||
|
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
3: {
|
3
|
||||||
shape: sequence_diagram
|
# 3: {
|
||||||
x
|
# shape: sequence_diagram
|
||||||
y
|
# x
|
||||||
# TODO x -> y
|
# y
|
||||||
}
|
# # TODO x -> y
|
||||||
|
# }
|
||||||
|
|
||||||
near: top-right
|
near: top-right
|
||||||
}
|
}
|
||||||
|
|
||||||
b: {
|
# b: {
|
||||||
shape: sequence_diagram
|
# shape: sequence_diagram
|
||||||
1 -> 2
|
# 1 -> 2
|
||||||
|
|
||||||
# TODO This should work
|
# # TODO This should work
|
||||||
near: bottom-right
|
# near: bottom-right
|
||||||
#
|
# #
|
||||||
|
|
||||||
2: {
|
# 2: {
|
||||||
# TODO compile error grid on sequence actor
|
# # TODO compile error grid on sequence actor
|
||||||
# grid-rows: 3
|
# # grid-rows: 3
|
||||||
x
|
# x
|
||||||
y
|
# y
|
||||||
z
|
# z
|
||||||
}
|
# }
|
||||||
|
|
||||||
1: {
|
# 1: {
|
||||||
x: {
|
# x: {
|
||||||
# TODO compile error grid in sequence (anywhere)
|
# # TODO compile error grid in sequence (anywhere)
|
||||||
# grid-rows: 3
|
# # grid-rows: 3
|
||||||
u
|
# u
|
||||||
v
|
# v
|
||||||
w
|
# w
|
||||||
}
|
# }
|
||||||
y
|
# y
|
||||||
z
|
# z
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue