mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-17 14:04:47 +08:00
Feat:新增单个节点内容布局完成事件
This commit is contained in:
2
copy.js
2
copy.js
@@ -13,4 +13,4 @@ if (fs.existsSync(src)) {
|
||||
fs.unlinkSync(src)
|
||||
}
|
||||
|
||||
console.warn('请检查手绘风格选项是否开启!!!')
|
||||
console.warn('请检查手绘风格、标记插件是否启用!!!')
|
||||
@@ -466,7 +466,6 @@ class Render {
|
||||
// 渲染节点
|
||||
this.root.render(() => {
|
||||
this.isRendering = false
|
||||
this.mindMap.emit('node_tree_render_end')
|
||||
callback && callback()
|
||||
if (this.hasWaitRendering) {
|
||||
const params = this.waitRenderingParams
|
||||
@@ -486,6 +485,7 @@ class Render {
|
||||
this.mindMap.command.addHistory()
|
||||
}
|
||||
}
|
||||
this.mindMap.emit('node_tree_render_end')
|
||||
})
|
||||
})
|
||||
this.emitNodeActiveEvent()
|
||||
|
||||
@@ -493,6 +493,7 @@ class Node {
|
||||
)
|
||||
this.group.add(textContentNested)
|
||||
addHoverNode()
|
||||
this.mindMap.emit('node_layout_end', this)
|
||||
}
|
||||
|
||||
// 给节点绑定事件
|
||||
@@ -756,7 +757,9 @@ class Node {
|
||||
this.layout()
|
||||
this.update()
|
||||
} else {
|
||||
this.nodeDraw.add(this.group)
|
||||
if (!this.nodeDraw.has(this.group)) {
|
||||
this.nodeDraw.add(this.group)
|
||||
}
|
||||
if (this.needLayout) {
|
||||
this.needLayout = false
|
||||
this.layout()
|
||||
|
||||
Reference in New Issue
Block a user