()
| 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 |
nothing calls this directly
no test coverage detected