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