From 839c79405f09cbbbfd4d66323c8625c1b13b05ce Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Tue, 25 Jul 2023 09:25:42 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E7=BB=99?= =?UTF-8?q?=E6=A6=82=E8=A6=81=E8=8A=82=E7=82=B9=E8=AE=BE=E7=BD=AE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=A6=82=E8=A6=81=E8=8A=82=E7=82=B9=E4=BC=9A=E6=B6=88?= =?UTF-8?q?=E5=A4=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/core/render/node/nodeGeneralization.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/simple-mind-map/src/core/render/node/nodeGeneralization.js b/simple-mind-map/src/core/render/node/nodeGeneralization.js index ba204186..ec7f95aa 100644 --- a/simple-mind-map/src/core/render/node/nodeGeneralization.js +++ b/simple-mind-map/src/core/render/node/nodeGeneralization.js @@ -36,15 +36,14 @@ function createGeneralizationNode () { // 更新概要节点 function updateGeneralization () { + if (this.isGeneralization) return this.removeGeneralization() this.createGeneralizationNode() } // 渲染概要节点 function renderGeneralization () { - if (this.isGeneralization) { - return - } + if (this.isGeneralization) return if (!this.checkHasGeneralization()) { this.removeGeneralization() this._generalizationNodeWidth = 0 @@ -67,6 +66,7 @@ function renderGeneralization () { // 删除概要节点 function removeGeneralization () { + if (this.isGeneralization) return if (this._generalizationLine) { this._generalizationLine.remove() this._generalizationLine = null @@ -87,6 +87,7 @@ function removeGeneralization () { // 隐藏概要节点 function hideGeneralization () { + if (this.isGeneralization) return if (this._generalizationLine) { this._generalizationLine.hide() } @@ -97,6 +98,7 @@ function hideGeneralization () { // 显示概要节点 function showGeneralization () { + if (this.isGeneralization) return if (this._generalizationLine) { this._generalizationLine.show() }