This commit is contained in:
Alexander Wang 2023-02-10 14:30:05 -08:00
parent 2e5612697f
commit 0877c349ad
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE

View file

@ -394,6 +394,8 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
q = q[1:] q = q[1:]
stepSize := subtract 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 { if curr != obj {
stepSize /= 2. stepSize /= 2.
} }