From 4332abce4d69e75a5f375dc4541ad50d882af47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Fri, 27 Dec 2024 16:53:06 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E4=BC=98=E5=8C=96=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E5=8E=9F=E5=9C=B0=E7=BC=96=E8=BE=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E4=B8=94=E4=B8=8D=E4=BD=BF=E7=94=A8=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=ACtext=E7=BC=96=E8=BE=91=E6=97=B6=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E5=AE=9A=E4=BD=8D=E4=BC=9A=E6=8A=96=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/core/render/TextEdit.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/simple-mind-map/src/core/render/TextEdit.js b/simple-mind-map/src/core/render/TextEdit.js index e66018ea..5fc86167 100644 --- a/simple-mind-map/src/core/render/TextEdit.js +++ b/simple-mind-map/src/core/render/TextEdit.js @@ -374,8 +374,8 @@ export default class TextEdit { this.textEditNode.style.minWidth = rect.width + this.textNodePaddingX * 2 + 'px' this.textEditNode.style.minHeight = rect.height + 'px' - this.textEditNode.style.left = rect.left + 'px' - this.textEditNode.style.top = rect.top + 'px' + this.textEditNode.style.left = Math.floor(rect.left) + 'px' + this.textEditNode.style.top = Math.floor(rect.top) + 'px' this.textEditNode.style.display = 'block' this.textEditNode.style.maxWidth = textAutoWrapWidth * scale + 'px' if (isMultiLine) { @@ -413,8 +413,8 @@ export default class TextEdit { rect.width + this.textNodePaddingX * 2 + 'px' this.textEditNode.style.minHeight = rect.height + this.textNodePaddingY * 2 + 'px' - this.textEditNode.style.left = rect.left + 'px' - this.textEditNode.style.top = rect.top + 'px' + this.textEditNode.style.left = Math.floor(rect.left) + 'px' + this.textEditNode.style.top = Math.floor(rect.top) + 'px' } // 获取编辑区域的背景填充