(portion: Portion)
| 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) { |