clean
This commit is contained in:
parent
939a5ca088
commit
ac960ae488
1 changed files with 1 additions and 9 deletions
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cdr.dev/slog"
|
"cdr.dev/slog"
|
||||||
|
|
@ -341,14 +340,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO probably don't need
|
for _, obj := range g.Objects {
|
||||||
byLevels := make([]*d2graph.Object, len(g.Objects))
|
|
||||||
copy(byLevels, g.Objects)
|
|
||||||
sort.SliceStable(byLevels, func(i, j int) bool {
|
|
||||||
return byLevels[i].Level() > byLevels[j].Level()
|
|
||||||
})
|
|
||||||
|
|
||||||
for _, obj := range byLevels {
|
|
||||||
if obj.LabelHeight == nil || len(obj.ChildrenArray) <= 0 {
|
if obj.LabelHeight == nil || len(obj.ChildrenArray) <= 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue