Feat:新增单个节点内容布局完成事件

This commit is contained in:
街角小林
2024-06-13 14:43:17 +08:00
parent a55401de23
commit d14fb0b666
3 changed files with 6 additions and 3 deletions

View File

@@ -13,4 +13,4 @@ if (fs.existsSync(src)) {
fs.unlinkSync(src)
}
console.warn('请检查手绘风格选项是否开启')
console.warn('请检查手绘风格、标记插件是否启用')

View File

@@ -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()

View File

@@ -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()