This commit is contained in:
Alexander Wang 2023-02-10 13:38:31 -08:00
parent 563c6999d0
commit 4229f52f1f
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE

View file

@ -372,10 +372,9 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
} }
if isSrcDesc && isDstDesc { if isSrcDesc && isDstDesc {
stepSize := float64(*obj.LabelHeight) stepSize := float64(*obj.LabelHeight)
// Container self edges don't work right now, but when they do, this should be uncommented if e.Src != obj || e.Dst != obj {
// if e.Src != obj || e.Dst != obj { stepSize /= 2.
// stepSize /= 2. }
// }
movedEdges[e] = struct{}{} movedEdges[e] = struct{}{}
for _, p := range e.Route { for _, p := range e.Route {
p.Y += stepSize p.Y += stepSize