From 9b55d051dca8507fb70b50e80231f16ea51cb6f2 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: Mon, 8 Jul 2024 16:52:53 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=BF=87=E8=8A=82=E7=82=B9=E6=96=87=E6=9C=AC=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=86=8D=E4=BD=BF=E7=94=A8=E6=BB=9A=E8=BD=AE=E6=88=96?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=E7=BC=A9=E6=94=BE=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E6=97=B6=E4=B8=8A=E6=AC=A1=E8=A2=AB=E7=BC=96=E8=BE=91=E7=9A=84?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E4=BC=9A=E8=BF=9B=E5=85=A5=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=8A=B6=E6=80=81=EF=BC=8C=E4=BB=A5=E5=8F=8A=E6=80=9D=E7=BB=B4?= =?UTF-8?q?=E5=AF=BC=E5=9B=BE=E5=BF=AB=E6=8D=B7=E9=94=AE=E4=BC=9A=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E7=9A=84=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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/simple-mind-map/src/core/render/TextEdit.js b/simple-mind-map/src/core/render/TextEdit.js index e8a9ee79..ffa72563 100644 --- a/simple-mind-map/src/core/render/TextEdit.js +++ b/simple-mind-map/src/core/render/TextEdit.js @@ -187,7 +187,8 @@ export default class TextEdit { // 处理画布缩放 onScale() { - if (!this.currentNode) return + const node = this.getCurrentEditNode() + if (!node) return if (this.mindMap.richText) { this.mindMap.richText.cacheEditingText = this.mindMap.richText.getEditText() @@ -197,7 +198,7 @@ export default class TextEdit { this.showTextEdit = false } this.show({ - node: this.currentNode, + node, isFromScale: true }) }