perf: Comment 元素不参与排序与渲染

This commit is contained in:
unanmed 2025-02-27 22:50:08 +08:00
parent 0b2db0270c
commit 4c898a7836

View File

@ -101,9 +101,9 @@ export class Container<E extends EContainerEvent = EContainerEvent>
} }
private sortChildren() { private sortChildren() {
this.sortedChildren = [...this.children].sort( this.sortedChildren = [...this.children]
(a, b) => a.zIndex - b.zIndex .filter(v => !v.isComment)
); .sort((a, b) => a.zIndex - b.zIndex);
this.update(); this.update();
} }