fix
This commit is contained in:
parent
3b53bc5ff1
commit
c9d5003343
1 changed files with 4 additions and 1 deletions
|
|
@ -122,10 +122,13 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
|
|||
}
|
||||
curr = obj
|
||||
|
||||
// position nested graph relative to curr
|
||||
// position nested graph (excluding curr) relative to curr
|
||||
dx := 0 - curr.TopLeft.X
|
||||
dy := 0 - curr.TopLeft.Y
|
||||
for _, o := range nestedGraph.Objects {
|
||||
if o.AbsID() == curr.AbsID() {
|
||||
continue
|
||||
}
|
||||
o.TopLeft.X += dx
|
||||
o.TopLeft.Y += dy
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue