Fix:修复批量删除的节点中如果存在根节点会出现删除异常的问题
This commit is contained in:
parent
46e11649b0
commit
3d9f3bd7a8
@ -552,29 +552,35 @@ class Render {
|
|||||||
if (this.activeNodeList.length <= 0) {
|
if (this.activeNodeList.length <= 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.activeNodeList.length; i++) {
|
let root = this.activeNodeList.find((node) => {
|
||||||
let node = this.activeNodeList[i]
|
return node.isRoot
|
||||||
if (node.isGeneralization) {
|
})
|
||||||
// 删除概要节点
|
if (root) {
|
||||||
this.setNodeData(node.generalizationBelongNode, {
|
this.clearActive()
|
||||||
generalization: null
|
root.children.forEach(child => {
|
||||||
})
|
child.remove()
|
||||||
node.generalizationBelongNode.update()
|
})
|
||||||
this.removeActiveNode(node)
|
root.children = []
|
||||||
i--
|
root.nodeData.children = []
|
||||||
} else if (node.isRoot) {
|
} else {
|
||||||
node.children.forEach(child => {
|
for (let i = 0; i < this.activeNodeList.length; i++) {
|
||||||
child.remove()
|
let node = this.activeNodeList[i]
|
||||||
})
|
if (node.isGeneralization) {
|
||||||
node.children = []
|
// 删除概要节点
|
||||||
node.nodeData.children = []
|
this.setNodeData(node.generalizationBelongNode, {
|
||||||
break
|
generalization: null
|
||||||
} else {
|
})
|
||||||
this.removeActiveNode(node)
|
node.generalizationBelongNode.update()
|
||||||
this.removeOneNode(node)
|
this.removeActiveNode(node)
|
||||||
i--
|
i--
|
||||||
|
} else {
|
||||||
|
this.removeActiveNode(node)
|
||||||
|
this.removeOneNode(node)
|
||||||
|
i--
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.activeNodeList = []
|
||||||
this.mindMap.emit('node_active', null, [])
|
this.mindMap.emit('node_active', null, [])
|
||||||
this.mindMap.render()
|
this.mindMap.render()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
## 0.3.4
|
## 0.3.4
|
||||||
|
|
||||||
New:1.Automatic line wrapping function is added to node text.
|
New:Automatic line wrapping function is added to node text.
|
||||||
|
|
||||||
|
Fix: Fix the problem of deletion exceptions if there are root nodes in the batch deleted nodes.
|
||||||
|
|
||||||
## 0.3.3
|
## 0.3.3
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<h1>Changelog</h1>
|
<h1>Changelog</h1>
|
||||||
<h2>0.3.4</h2>
|
<h2>0.3.4</h2>
|
||||||
<p>New:1.Automatic line wrapping function is added to node text.</p>
|
<p>New:Automatic line wrapping function is added to node text.</p>
|
||||||
|
<p>Fix: Fix the problem of deletion exceptions if there are root nodes in the batch deleted nodes.</p>
|
||||||
<h2>0.3.3</h2>
|
<h2>0.3.3</h2>
|
||||||
<p>Fix: The root node text cannot wrap.</p>
|
<p>Fix: The root node text cannot wrap.</p>
|
||||||
<h2>0.3.2</h2>
|
<h2>0.3.2</h2>
|
||||||
|
|||||||
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
## 0.3.4
|
## 0.3.4
|
||||||
|
|
||||||
New:1.节点文本增加自动换行功能。
|
New:节点文本增加自动换行功能。
|
||||||
|
|
||||||
|
Fix:修复批量删除的节点中如果存在根节点会出现删除异常的问题。
|
||||||
|
|
||||||
## 0.3.3
|
## 0.3.3
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<h1>Changelog</h1>
|
<h1>Changelog</h1>
|
||||||
<h2>0.3.4</h2>
|
<h2>0.3.4</h2>
|
||||||
<p>New:1.节点文本增加自动换行功能。</p>
|
<p>New:节点文本增加自动换行功能。</p>
|
||||||
|
<p>Fix:修复批量删除的节点中如果存在根节点会出现删除异常的问题。</p>
|
||||||
<h2>0.3.3</h2>
|
<h2>0.3.3</h2>
|
||||||
<p>修复:根节点文字无法换行的问题。</p>
|
<p>修复:根节点文字无法换行的问题。</p>
|
||||||
<h2>0.3.2</h2>
|
<h2>0.3.2</h2>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user