This commit is contained in:
Júlio César Batista 2022-12-05 19:50:42 -08:00
parent 6272fec709
commit 662aef4660
No known key found for this signature in database
GPG key ID: 10C4B861BF314878

View file

@ -995,11 +995,13 @@ func Render(diagram *d2target.Diagram) ([]byte, error) {
markers := map[string]struct{}{}
for _, obj := range allObjects {
if c, is := obj.(d2target.Connection); is {
if labelMask := drawConnection(buf, c, markers, idToShape); labelMask != "" {
labelMask := drawConnection(buf, c, markers, idToShape)
if labelMask != "" {
labelMasks = append(labelMasks, labelMask)
}
} else if s, is := obj.(d2target.Shape); is {
if labelMask, err := drawShape(buf, s); err != nil {
labelMask, err := drawShape(buf, s)
if err != nil {
return nil, err
} else if labelMask != "" {
labelMasks = append(labelMasks, labelMask)