join constraints with comma

This commit is contained in:
satoqz 2023-06-03 13:54:06 +02:00
parent 870ede1e1e
commit 430ff4cab9
No known key found for this signature in database
4 changed files with 6 additions and 6 deletions

View file

@ -1037,7 +1037,7 @@ func (obj *Object) GetDefaultSize(mtexts []*d2target.MText, ruler *textmeasure.R
maxTypeWidth = go2.Max(maxTypeWidth, typeDims.Width)
if l := len(c.Constraint); l > 0 {
// 60 covers UNQ constraint with padding, 40 for further constraints covers UNQ + space
// 60 covers UNQ constraint with padding, 40 for further constraints covers UNQ + comma + space
if newWidth := 60 + 40*(l-1); newWidth > constraintWidth {
constraintWidth = newWidth
}

View file

@ -60,5 +60,5 @@ func (c SQLColumn) ConstraintAbbr() string {
abbrs = append(abbrs, abbr)
}
return strings.Join(abbrs, " ")
return strings.Join(abbrs, ", ")
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB