Fix:修复节点被销毁时鼠标移入标志没有复位的问题
This commit is contained in:
parent
f3694d0c00
commit
6f7bb40c49
@ -165,6 +165,11 @@ class Node {
|
|||||||
this.top = 0
|
this.top = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 节点被删除时需要复位的数据
|
||||||
|
resetWhenDelete() {
|
||||||
|
this._isMouseenter = false
|
||||||
|
}
|
||||||
|
|
||||||
// 处理数据
|
// 处理数据
|
||||||
handleData(data) {
|
handleData(data) {
|
||||||
data.data.expand = data.data.expand === false ? false : true
|
data.data.expand = data.data.expand === false ? false : true
|
||||||
@ -694,6 +699,7 @@ class Node {
|
|||||||
// 销毁节点,不但会从画布删除,而且原节点直接置空,后续无法再插回画布
|
// 销毁节点,不但会从画布删除,而且原节点直接置空,后续无法再插回画布
|
||||||
destroy() {
|
destroy() {
|
||||||
if (!this.group) return
|
if (!this.group) return
|
||||||
|
this.resetWhenDelete()
|
||||||
this.group.remove()
|
this.group.remove()
|
||||||
this.removeGeneralization()
|
this.removeGeneralization()
|
||||||
this.removeLine()
|
this.removeLine()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user