fix: word break boundary error #521

This commit is contained in:
Hufe921
2024-04-22 21:42:43 +08:00
parent 07956caec2
commit 4d1a0b69f8
+5 -2
View File
@@ -1519,8 +1519,11 @@ export class Draw {
elementList,
i
)
curRowWidth += width
nextElement = endElement
// 单词宽度大于行可用宽度,无需折行
if (width <= availableWidth) {
curRowWidth += width
nextElement = endElement
}
}
// 标点符号
curRowWidth += this.textParticle.measurePunctuationWidth(