This commit is contained in:
Gavin Nishizawa 2023-09-22 20:12:20 -07:00
parent cee6a92722
commit 31252e6752
No known key found for this signature in database
GPG key ID: AE3B177777CE55CD

View file

@ -163,7 +163,6 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
// We can now run layout with accurate sizes of nested layout containers // We can now run layout with accurate sizes of nested layout containers
// Layout according to the type of diagram // Layout according to the type of diagram
LayoutDiagram := func(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, coreLayout d2graph.LayoutGraph) error {
var err error var err error
switch graphInfo.DiagramType { switch graphInfo.DiagramType {
case GridDiagram: case GridDiagram:
@ -185,9 +184,6 @@ func LayoutNested(ctx context.Context, g *d2graph.Graph, graphInfo GraphInfo, co
return err return err
} }
} }
return nil
}
err := LayoutDiagram(ctx, g, graphInfo, coreLayout)
if len(constantNears) > 0 { if len(constantNears) > 0 {
err := d2near.Layout(ctx, g, constantNears) err := d2near.Layout(ctx, g, constantNears)