From 4e7d59b32875c5f281f9d5a14cfb7e5d88ea6e58 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: Wed, 24 Jul 2024 17:13:49 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E6=82=AC=E6=B5=AE=E8=8A=82=E7=82=B9=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=B1=95=E5=BC=80=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E6=8C=89=E9=92=AE=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/node/nodeExpandBtn.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/simple-mind-map/src/core/render/node/nodeExpandBtn.js b/simple-mind-map/src/core/render/node/nodeExpandBtn.js index 4f4dee14..931a252f 100644 --- a/simple-mind-map/src/core/render/node/nodeExpandBtn.js +++ b/simple-mind-map/src/core/render/node/nodeExpandBtn.js @@ -10,9 +10,7 @@ function createExpandNodeContent() { // 根据配置判断是否显示数量按钮 if (this.mindMap.opt.isShowExpandNum) { // 展开的节点 - this._openExpandNode = SVG() - .text() - .size(this.expandBtnSize, this.expandBtnSize) + this._openExpandNode = SVG().text() // 文本垂直居中 this._openExpandNode.attr({ 'text-anchor': 'middle', @@ -126,11 +124,7 @@ function renderExpandBtn() { this._expandBtn.on('click', e => { e.stopPropagation() // 展开收缩 - this.mindMap.execCommand( - 'SET_NODE_EXPAND', - this, - !this.getData('expand') - ) + this.mindMap.execCommand('SET_NODE_EXPAND', this, !this.getData('expand')) this.mindMap.emit('expand_btn_click', this) }) this._expandBtn.on('dblclick', e => {