From bff1e0b06626db4977835691e95f6529de9d8af2 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Mon, 18 Sep 2023 20:12:50 -0700 Subject: [PATCH] cleanup --- d2layouts/d2layouts.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/d2layouts/d2layouts.go b/d2layouts/d2layouts.go index f96e234c0..09dd0dde4 100644 --- a/d2layouts/d2layouts.go +++ b/d2layouts/d2layouts.go @@ -44,14 +44,7 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co // Iterate top-down from Root so all nested diagrams can process their own contents queue := make([]*d2graph.Object, 0, len(g.Root.ChildrenArray)) - if graphInfo.IsConstantNear { - near := g.Root.ChildrenArray[0] - if len(near.Children) > 0 { - queue = append(queue, near.ChildrenArray...) - } - } else { - queue = append(queue, g.Root.ChildrenArray...) - } + queue = append(queue, g.Root.ChildrenArray...) for _, child := range queue { if gi := NestedGraphInfo(child); !gi.isDefault() {