fix bug
This commit is contained in:
parent
14f88e2db9
commit
870ede1e1e
1 changed files with 5 additions and 3 deletions
|
|
@ -1036,9 +1036,11 @@ func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.R
|
|||
}
|
||||
maxTypeWidth = go2.Max(maxTypeWidth, typeDims.Width)
|
||||
|
||||
// 60 covers UNQ constraint with padding, 40 for further constraints covers UNQ + space
|
||||
if newWidth := 60 + 40*(len(c.Constraint)-1); newWidth > constraintWidth {
|
||||
constraintWidth = newWidth
|
||||
if l := len(c.Constraint); l > 0 {
|
||||
// 60 covers UNQ constraint with padding, 40 for further constraints covers UNQ + space
|
||||
if newWidth := 60 + 40*(l-1); newWidth > constraintWidth {
|
||||
constraintWidth = newWidth
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue