unless the dst is also on a container
This commit is contained in:
parent
4d1462473c
commit
454196be9b
1 changed files with 4 additions and 1 deletions
|
|
@ -367,8 +367,11 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
||||||
if e.Src == curr {
|
if e.Src == curr {
|
||||||
// Don't move src points on side of container
|
// Don't move src points on side of container
|
||||||
if almostEqual(e.Route[0].X, obj.TopLeft.X) || almostEqual(e.Route[0].X, obj.TopLeft.X+obj.Width) {
|
if almostEqual(e.Route[0].X, obj.TopLeft.X) || almostEqual(e.Route[0].X, obj.TopLeft.X+obj.Width) {
|
||||||
|
// Unless the dst is also on a container
|
||||||
|
if e.Dst.LabelHeight == nil || len(e.Dst.ChildrenArray) <= 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if shouldMove(e.Route[0]) {
|
if shouldMove(e.Route[0]) {
|
||||||
e.Route[0].Y += stepSize
|
e.Route[0].Y += stepSize
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue