fix dagre id registration
This commit is contained in:
parent
86b145856a
commit
09d6245269
1 changed files with 3 additions and 1 deletions
|
|
@ -140,9 +140,11 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
|
||||||
}
|
}
|
||||||
|
|
||||||
mapper := NewObjectMapper()
|
mapper := NewObjectMapper()
|
||||||
loadScript := ""
|
|
||||||
for _, obj := range g.Objects {
|
for _, obj := range g.Objects {
|
||||||
mapper.Register(obj)
|
mapper.Register(obj)
|
||||||
|
}
|
||||||
|
loadScript := ""
|
||||||
|
for _, obj := range g.Objects {
|
||||||
loadScript += mapper.generateAddNodeLine(obj, int(obj.Width), int(obj.Height))
|
loadScript += mapper.generateAddNodeLine(obj, int(obj.Width), int(obj.Height))
|
||||||
if obj.Parent != g.Root {
|
if obj.Parent != g.Root {
|
||||||
loadScript += mapper.generateAddParentLine(obj, obj.Parent)
|
loadScript += mapper.generateAddParentLine(obj, obj.Parent)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue