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 {
|
||||
nestedGraph := d2graph.NewGraph()
|
||||
nestedGraph.RootLevel = int(container.Level()) - 1
|
||||
// nestedGraph.Root.Box = &geo.Box{}
|
||||
nestedGraph.Root.Box = &geo.Box{}
|
||||
|
||||
// separate out nested edges
|
||||
g := container.Graph
|
||||
|
|
@ -217,6 +217,7 @@ func ExtractSelf(container *d2graph.Object) *d2graph.Graph {
|
|||
func ExtractDescendants(container *d2graph.Object) *d2graph.Graph {
|
||||
nestedGraph := d2graph.NewGraph()
|
||||
nestedGraph.RootLevel = int(container.Level())
|
||||
nestedGraph.Root.Attributes = container.Attributes
|
||||
nestedGraph.Root.Box = &geo.Box{}
|
||||
|
||||
// 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
|
||||
b
|
||||
c
|
||||
# b
|
||||
# c
|
||||
|
||||
a: {
|
||||
grid-rows: 3
|
||||
|
||||
1
|
||||
2
|
||||
3: {
|
||||
shape: sequence_diagram
|
||||
x
|
||||
y
|
||||
# TODO x -> y
|
||||
}
|
||||
3
|
||||
# 3: {
|
||||
# shape: sequence_diagram
|
||||
# x
|
||||
# y
|
||||
# # TODO x -> y
|
||||
# }
|
||||
|
||||
near: top-right
|
||||
}
|
||||
|
||||
b: {
|
||||
shape: sequence_diagram
|
||||
1 -> 2
|
||||
# b: {
|
||||
# shape: sequence_diagram
|
||||
# 1 -> 2
|
||||
|
||||
# TODO This should work
|
||||
near: bottom-right
|
||||
#
|
||||
# # TODO This should work
|
||||
# near: bottom-right
|
||||
# #
|
||||
|
||||
2: {
|
||||
# TODO compile error grid on sequence actor
|
||||
# grid-rows: 3
|
||||
x
|
||||
y
|
||||
z
|
||||
}
|
||||
# 2: {
|
||||
# # TODO compile error grid on sequence actor
|
||||
# # grid-rows: 3
|
||||
# x
|
||||
# y
|
||||
# z
|
||||
# }
|
||||
|
||||
1: {
|
||||
x: {
|
||||
# TODO compile error grid in sequence (anywhere)
|
||||
# grid-rows: 3
|
||||
u
|
||||
v
|
||||
w
|
||||
}
|
||||
y
|
||||
z
|
||||
}
|
||||
}
|
||||
# 1: {
|
||||
# x: {
|
||||
# # TODO compile error grid in sequence (anywhere)
|
||||
# # grid-rows: 3
|
||||
# u
|
||||
# v
|
||||
# w
|
||||
# }
|
||||
# y
|
||||
# z
|
||||
# }
|
||||
# }
|
||||
|
|
|
|||
Loading…
Reference in a new issue