From 54e854d1bfe367173a11ef2956bafa675ee7fa12 Mon Sep 17 00:00:00 2001 From: dongqing Date: Thu, 5 Dec 2019 14:13:39 +0800 Subject: [PATCH] fix --- lib/pen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pen.js b/lib/pen.js index 47f8c1f..b47d573 100644 --- a/lib/pen.js +++ b/lib/pen.js @@ -204,7 +204,7 @@ export default class Painter { for (let i = 0; i < textArray.length; ++i) { const textLength = this.ctx.measureText(textArray[i]).width; let partWidth = view.css.width ? view.css.width.toPx(false, this.style.width) - paddings[1] - paddings[3] : textLength; - partWidth = partWidth > fontSize ? partWidth - partWidth % fontSize + fontSize : fontSize + // partWidth = partWidth > fontSize ? partWidth - partWidth % fontSize + fontSize : fontSize const calLines = Math.ceil(textLength / partWidth); // 取最长的作为 width width = partWidth > width ? partWidth : width;