Feat:插入新节点时去除延时开启节点编辑的逻辑
This commit is contained in:
parent
67fec82c72
commit
25f0668a44
@ -136,10 +136,8 @@ class MindMap {
|
|||||||
this.associativeLineDraw.addClass('smm-associative-line-container')
|
this.associativeLineDraw.addClass('smm-associative-line-container')
|
||||||
}
|
}
|
||||||
// 画布
|
// 画布
|
||||||
this.svg = SVG()
|
this.svg = SVG().addTo(this.el).size(this.width, this.height)
|
||||||
.addTo(this.el)
|
|
||||||
.size(this.width, this.height)
|
|
||||||
|
|
||||||
// 容器
|
// 容器
|
||||||
this.draw = this.svg.group()
|
this.draw = this.svg.group()
|
||||||
this.draw.addClass('smm-container')
|
this.draw.addClass('smm-container')
|
||||||
|
|||||||
@ -782,9 +782,9 @@ class Node {
|
|||||||
if (this.nodeData.inserting) {
|
if (this.nodeData.inserting) {
|
||||||
delete this.nodeData.inserting
|
delete this.nodeData.inserting
|
||||||
this.active()
|
this.active()
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
this.mindMap.emit('node_dblclick', this, null, true)
|
this.mindMap.emit('node_dblclick', this, null, true)
|
||||||
}, 0)
|
// }, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1192,7 +1192,7 @@ class Node {
|
|||||||
...this.opt,
|
...this.opt,
|
||||||
uid: createUid()
|
uid: createUid()
|
||||||
})
|
})
|
||||||
Object.keys(this).forEach((item) => {
|
Object.keys(this).forEach(item => {
|
||||||
newNode[item] = this[item]
|
newNode[item] = this[item]
|
||||||
})
|
})
|
||||||
return newNode
|
return newNode
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user