This commit is contained in:
Gavin Nishizawa 2023-09-18 17:20:59 -07:00
parent 37351436a4
commit e253ab80bb
No known key found for this signature in database
GPG key ID: AE3B177777CE55CD
2 changed files with 1 additions and 4 deletions

View file

@ -201,7 +201,6 @@ func Layout2(ctx context.Context, g *d2graph.Graph) error {
obj.TopLeft.X+float64(horizontalPadding),
obj.TopLeft.Y+float64(verticalPadding),
)
gd.cleanup(obj, g)
return nil
}

View file

@ -72,8 +72,6 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
if gi.IsConstantNear {
nearGraph = ExtractSelf(child)
child.TopLeft = geo.NewPoint(0, 0)
child.Width = nestedGraph.Root.Width
child.Width = nestedGraph.Root.Height
}
// if gi.IsConstantNear {
@ -282,7 +280,7 @@ func InjectNested(container *d2graph.Object, nestedGraph *d2graph.Graph) {
}
func PositionNested(container *d2graph.Object, nestedGraph *d2graph.Graph) {
// _, _ := boundingBox(nestedGraph)
// tl, _ := boundingBox(nestedGraph)
// Note: assumes nestedGraph's layout has contents positioned relative to 0,0
dx := container.TopLeft.X //- tl.X
dy := container.TopLeft.Y //- tl.Y