This commit is contained in:
Júlio César Batista 2022-12-01 14:32:54 -08:00
parent 8b845ce285
commit c0e670bb2f
No known key found for this signature in database
GPG key ID: 10C4B861BF314878
2 changed files with 4 additions and 3 deletions

View file

@ -7,9 +7,9 @@ import (
"oss.terrastruct.com/d2/d2graph"
"oss.terrastruct.com/d2/lib/geo"
"oss.terrastruct.com/d2/lib/go2"
"oss.terrastruct.com/d2/lib/label"
"oss.terrastruct.com/d2/lib/shape"
"oss.terrastruct.com/util-go/go2"
)
type sequenceDiagram struct {

View file

@ -9,6 +9,7 @@ import (
"oss.terrastruct.com/d2/d2compiler"
"oss.terrastruct.com/d2/d2exporter"
"oss.terrastruct.com/d2/d2graph"
"oss.terrastruct.com/d2/d2layouts/d2sequence"
"oss.terrastruct.com/d2/d2target"
"oss.terrastruct.com/d2/lib/textmeasure"
)
@ -40,9 +41,9 @@ func Compile(ctx context.Context, input string, opts *CompileOptions) (*d2target
}
if layout, err := getLayout(opts); err != nil {
return nil, err
return nil, nil, err
} else if err := d2sequence.Layout(ctx, g, layout); err != nil {
return nil, err
return nil, nil, err
}
diagram, err := d2exporter.Export(ctx, g, opts.ThemeID)