fix: word breaking when scaling the page #666

This commit is contained in:
Hufe921
2024-07-23 21:03:47 +08:00
parent 67c63f856f
commit 2bd1f34c15
+3 -2
View File
@@ -1573,8 +1573,9 @@ export class Draw {
i
)
// 单词宽度大于行可用宽度,无需折行
if (width <= availableWidth) {
curRowWidth += width
const wordWidth = width * scale
if (wordWidth <= availableWidth) {
curRowWidth += wordWidth
nextElement = endElement
}
}