MCPcopy
hub / github.com/mathuo/dockview / addChild

Method addChild

packages/dockview-core/src/gridview/branchNode.ts:302–314  ·  view source on GitHub ↗
(
        node: Node,
        size: number | Sizing,
        index: number,
        skipLayout?: boolean
    )

Source from the content-addressed store, hash-verified

300 }
301
302 public addChild(
303 node: Node,
304 size: number | Sizing,
305 index: number,
306 skipLayout?: boolean
307 ): void {
308 if (index < 0 || index > this.children.length) {
309 throw new Error('Invalid index');
310 }
311
312 this.splitview.addView(node, size, index, skipLayout);
313 this._addChild(node, index);
314 }
315
316 getChildCachedVisibleSize(index: number): number | undefined {
317 if (index < 0 || index >= this.children.length) {

Callers 5

cloneNodeFunction · 0.95
flipNodeFunction · 0.95
addViewMethod · 0.95
removeViewMethod · 0.80

Calls 2

_addChildMethod · 0.95
addViewMethod · 0.45

Tested by

no test coverage detected