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

Method pop

src/layout/msWorkspace/portion.ts:170–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168 }
169
170 pop() {
171 // If this portion has less than 3 portions, it means that when
172 // want to delete one, this portion describes the space.
173 if (this.portionLength <= 2) {
174 this.children = [];
175 this.borders = [];
176
177 return;
178 }
179
180 const child = this.children[this.children.length - 1];
181
182 if (child) {
183 if (child.children.length) {
184 child.pop();
185 } else {
186 this.children.pop();
187 }
188 }
189
190 this.updateBorders();
191 }
192
193 /**
194 * rotate order of portions by one in next direction

Callers

nothing calls this directly

Calls 2

updateBordersMethod · 0.95
popMethod · 0.65

Tested by

no test coverage detected