From d24d5c8281e74fff8ed3746edd0c40edf9bf236d Mon Sep 17 00:00:00 2001 From: wanglin25 Date: Tue, 13 Sep 2022 10:34:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8A=82=E7=82=B9=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E6=94=B6=E8=B5=B7=E7=9A=84bug&=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- simple-mind-map/src/Node.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 0f06adea..3a8f0d3d 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -一个简单的web思维导图实现
\ No newline at end of file +一个简单的web思维导图实现
\ No newline at end of file diff --git a/simple-mind-map/src/Node.js b/simple-mind-map/src/Node.js index 99add85d..fd7b113c 100644 --- a/simple-mind-map/src/Node.js +++ b/simple-mind-map/src/Node.js @@ -1016,7 +1016,6 @@ class Node { * @Desc: 创建或更新展开收缩按钮内容 */ updateExpandBtnNode() { - if (this.children.length === 0) return if (this._expandBtn) { this._expandBtn.clear() } @@ -1031,7 +1030,7 @@ class Node { node.x(0).y(-this.expandBtnSize / 2) fillNode.x(0).y(-this.expandBtnSize / 2) this.style.iconBtn(node, fillNode) - this._expandBtn.add(fillNode).add(node) + if (this._expandBtn) this._expandBtn.add(fillNode).add(node) } /**