prs
This commit is contained in:
parent
4ed0ebc58b
commit
d90eb355d3
3 changed files with 5 additions and 6 deletions
|
|
@ -3,7 +3,6 @@ package d2exporter
|
|||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"oss.terrastruct.com/d2/d2graph"
|
||||
"oss.terrastruct.com/d2/d2target"
|
||||
|
|
@ -100,7 +99,7 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape {
|
|||
shape.Italic = text.IsItalic
|
||||
shape.FontSize = text.FontSize
|
||||
|
||||
if strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeSequenceDiagram) {
|
||||
if obj.IsSequenceDiagram() {
|
||||
shape.StrokeWidth = 0
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -343,12 +343,12 @@ func (obj *Object) GetFill(theme *d2themes.Theme) string {
|
|||
return theme.Colors.Neutrals.N7
|
||||
}
|
||||
|
||||
shape := obj.Attributes.Shape.Value
|
||||
|
||||
if strings.EqualFold(shape, d2target.ShapeSequenceDiagram) {
|
||||
if obj.IsSequenceDiagram() {
|
||||
return theme.Colors.Neutrals.N7
|
||||
}
|
||||
|
||||
shape := obj.Attributes.Shape.Value
|
||||
|
||||
if shape == "" || strings.EqualFold(shape, d2target.ShapeSquare) || strings.EqualFold(shape, d2target.ShapeCircle) || strings.EqualFold(shape, d2target.ShapeOval) || strings.EqualFold(shape, d2target.ShapeRectangle) {
|
||||
if level == 1 {
|
||||
if !obj.IsContainer() {
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ func cleanup(g *d2graph.Graph, sequenceDiagrams map[string]*sequenceDiagram, obj
|
|||
obj.ChildrenArray = append(obj.ChildrenArray, child)
|
||||
}
|
||||
for _, child := range sd.groups {
|
||||
if child.Parent == obj {
|
||||
if child.Parent.AbsID() == obj.AbsID() {
|
||||
obj.Children[child.ID] = child
|
||||
obj.ChildrenArray = append(obj.ChildrenArray, child)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue