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

Method hasPortion

src/layout/msWorkspace/portion.ts:87–101  ·  view source on GitHub ↗
(portion: Portion)

Source from the content-addressed store, hash-verified

85 }
86
87 hasPortion(portion: Portion) {
88 for (let i = 0; i < this.children.length; i++) {
89 const possiblePortion = this.children[i];
90
91 if (
92 possiblePortion === portion ||
93 (possiblePortion.children.length > 0 &&
94 possiblePortion.hasPortion(portion))
95 ) {
96 return true;
97 }
98 }
99
100 return false;
101 }
102
103 insert(basis = 100, vertical: boolean | undefined) {
104 if (vertical === undefined) {

Callers 1

getRatioForPortionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected