Skip to content

Commit

Permalink
fix: trigger node.add event on mergeChildren
Browse files Browse the repository at this point in the history
  • Loading branch information
eightHundreds committed Dec 12, 2023
1 parent 6932c3b commit 3df7089
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/designer/src/document/node/node-children.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3df7089

Please sign in to comment.