diff --git a/simple-mind-map/src/core/render/Render.js b/simple-mind-map/src/core/render/Render.js index 3a274fa5..897e7ca9 100644 --- a/simple-mind-map/src/core/render/Render.js +++ b/simple-mind-map/src/core/render/Render.js @@ -342,7 +342,7 @@ class Render { } }) }) - this.mindMap.emit('node_active', null, this.activeNodeList) + this.mindMap.emit('node_active', null, [...this.activeNodeList]) } // 清除当前激活的节点 @@ -854,7 +854,7 @@ class Render { } } } - this.mindMap.emit('node_active', null, this.activeNodeList) + this.mindMap.emit('node_active', null, [...this.activeNodeList]) this.mindMap.render() } @@ -886,7 +886,7 @@ class Render { let copyData = copyNodeTree({}, node, true) this.removeActiveNode(node) this.removeOneNode(node) - this.mindMap.emit('node_active', null, this.activeNodeList) + this.mindMap.emit('node_active', null, [...this.activeNodeList]) this.mindMap.render() if (callback && typeof callback === 'function') { callback(copyData) @@ -901,7 +901,7 @@ class Render { // let copyData = copyNodeTree({}, node, false, true) this.removeActiveNode(node) this.removeOneNode(node) - this.mindMap.emit('node_active', null, this.activeNodeList) + this.mindMap.emit('node_active', null, [...this.activeNodeList]) toNode.nodeData.children.push(node.nodeData) this.mindMap.render() if (toNode.isRoot) { diff --git a/simple-mind-map/src/core/render/node/Node.js b/simple-mind-map/src/core/render/node/Node.js index a9896812..2bc4408c 100644 --- a/simple-mind-map/src/core/render/node/Node.js +++ b/simple-mind-map/src/core/render/node/Node.js @@ -417,7 +417,7 @@ class Node { this.mindMap.emit( 'node_active', isActive ? null : this, - this.mindMap.renderer.activeNodeList + [...this.mindMap.renderer.activeNodeList] ) } this.mindMap.emit('node_mousedown', this, e) @@ -481,7 +481,7 @@ class Node { this.renderer.clearActive() this.mindMap.execCommand('SET_NODE_ACTIVE', this, true) this.renderer.addActiveNode(this) - this.mindMap.emit('node_active', this, this.renderer.activeNodeList) + this.mindMap.emit('node_active', this, [...this.renderer.activeNodeList]) } // 更新节点 diff --git a/simple-mind-map/src/plugins/Select.js b/simple-mind-map/src/plugins/Select.js index 329b4dc1..fe6d801d 100644 --- a/simple-mind-map/src/plugins/Select.js +++ b/simple-mind-map/src/plugins/Select.js @@ -95,7 +95,7 @@ class Select { this.mindMap.emit( 'node_active', null, - this.mindMap.renderer.activeNodeList + [...this.mindMap.renderer.activeNodeList] ) } }