diff --git a/src/contentview.ts b/src/contentview.ts index 12704da..f8f3095 100644 --- a/src/contentview.ts +++ b/src/contentview.ts @@ -199,7 +199,8 @@ export abstract class ContentView { let child = this.children[i] if (child.parent == this && children.indexOf(child) < 0) child.destroy() } - this.children.splice(from, to - from, ...children) + if (children.length < 250) this.children.splice(from, to - from, ...children) + else this.children = ([] as ContentView[]).concat(this.children.slice(0, from), children, this.children.slice(to)) for (let i = 0; i < children.length; i++) children[i].setParent(this) }