fix: trigger node.add event on mergeChildren

This commit is contained in:
eightHundreds 2023-12-12 16:12:45 +08:00 committed by 刘菊萍(絮黎)
parent 73dacadaee
commit f483970aef

View File

@ -462,6 +462,9 @@ export class NodeChildren implements INodeChildren {
const node: INode = this.owner.document?.createNode(child);
this.children.push(node);
node.internalSetParent(this.owner);
/* istanbul ignore next */
const editor = node.document?.designer.editor;
editor?.eventBus.emit('node.add', { node });
});
changed = true;
}