From 0877c349ad1aeca3a4800ca74b091f83fef54912 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 10 Feb 2023 14:30:05 -0800 Subject: [PATCH] comments --- d2layouts/d2dagrelayout/layout.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/d2layouts/d2dagrelayout/layout.go b/d2layouts/d2dagrelayout/layout.go index fd2423644..e7776d0b7 100644 --- a/d2layouts/d2dagrelayout/layout.go +++ b/d2layouts/d2dagrelayout/layout.go @@ -394,6 +394,8 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err q = q[1:] stepSize := subtract + // The object itself needs to move down the height it was just subtracted + // all descendents move half, to maintain vertical padding if curr != obj { stepSize /= 2. }