MCPcopy Create free account
hub / github.com/material-shell/material-shell / insert

Method insert

src/layout/msWorkspace/portion.ts:103–115  ·  view source on GitHub ↗
(basis = 100, vertical: boolean | undefined)

Source from the content-addressed store, hash-verified

101 }
102
103 insert(basis = 100, vertical: boolean | undefined) {
104 if (vertical === undefined) {
105 vertical = !this.vertical;
106 }
107
108 if (this.children.length === 0) {
109 this.children.splice(0, 0, new Portion(basis, vertical));
110 }
111
112 this.children.splice(0, 0, new Portion(basis, vertical));
113
114 this.updateBorders();
115 }
116
117 insertVertical(basis = 100) {
118 this.insert(basis, true);

Callers 2

insertVerticalMethod · 0.95
insertHorizontalMethod · 0.95

Calls 2

updateBordersMethod · 0.95
spliceMethod · 0.65

Tested by

no test coverage detected