From a804a5e2fa0a9e018df60cf22165519eecc33139 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Mon, 1 Aug 2022 09:59:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=96=E6=8B=BD=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=97=B6=E4=B8=BA=E9=9A=90=E8=97=8F=E6=A6=82=E8=A6=81?= =?UTF-8?q?=E5=86=85=E5=AE=B9=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/Node.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/simple-mind-map/src/Node.js b/simple-mind-map/src/Node.js index 687d0c88..081fd9c7 100644 --- a/simple-mind-map/src/Node.js +++ b/simple-mind-map/src/Node.js @@ -719,6 +719,7 @@ class Node { */ hide() { this.group.hide() + this.hideGeneralization() if (this.parent) { let index = this.parent.children.indexOf(this) this.parent._lines[index].hide() @@ -744,6 +745,7 @@ class Node { return; } this.group.show() + this.showGeneralization() if (this.parent) { let index = this.parent.children.indexOf(this) this.parent._lines[index].show() @@ -883,6 +885,36 @@ class Node { } } + /** + * javascript comment + * @Author: 王林25 + * @Date: 2022-08-01 09:56:46 + * @Desc: 隐藏概要节点 + */ + hideGeneralization() { + if (this._generalizationLine) { + this._generalizationLine.hide() + } + if (this._generalizationNode) { + this._generalizationNode.hide() + } + } + + /** + * javascript comment + * @Author: 王林25 + * @Date: 2022-08-01 09:57:42 + * @Desc: 显示概要节点 + */ + showGeneralization() { + if (this._generalizationLine) { + this._generalizationLine.show() + } + if (this._generalizationNode) { + this._generalizationNode.show() + } + } + /** * @Author: 王林 * @Date: 2021-07-10 17:59:14