From 6f114933102a39ffdb239c74c0764d656ef6f69f Mon Sep 17 00:00:00 2001 From: dongqing Date: Mon, 30 Dec 2019 18:56:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=80=E5=B0=8Fwidth=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pen.js b/lib/pen.js index aa290fa..9e3420b 100644 --- a/lib/pen.js +++ b/lib/pen.js @@ -222,7 +222,7 @@ export default class Painter { const linesArray = []; for (let i = 0; i < textArray.length; ++i) { const textLength = this.ctx.measureText(textArray[i]).width; - const minWidth = view.css.fontSize.toPx() + paddings[1] + paddings[3]; + const minWidth = view.css.fontSize.toPx(); let partWidth = view.css.width ? view.css.width.toPx(false, this.style.width) - paddings[1] - paddings[3] : textLength; if (partWidth < minWidth) { partWidth = minWidth;