(ownerID, level, index)
| 335 | } |
| 336 | |
| 337 | removeAfter(ownerID, level, index) { |
| 338 | if ( |
| 339 | index === (level ? 1 << (level + SHIFT) : SIZE) || |
| 340 | this.array.length === 0 |
| 341 | ) { |
| 342 | return this; |
| 343 | } |
| 344 | const sizeIndex = ((index - 1) >>> level) & MASK; |
| 345 | if (sizeIndex >= this.array.length) { |
| 346 | return this; |
| 347 | } |
| 348 | |
| 349 | let newChild; |
| 350 | if (level > 0) { |
| 351 | const oldChild = this.array[sizeIndex]; |
| 352 | newChild = |
| 353 | oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); |
| 354 | if (newChild === oldChild && sizeIndex === this.array.length - 1) { |
| 355 | return this; |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | const editable = editableVNode(this, ownerID); |
| 360 | editable.array.splice(sizeIndex + 1); |
| 361 | if (newChild) { |
| 362 | editable.array[sizeIndex] = newChild; |
| 363 | } |
| 364 | return editable; |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | const DONE = {}; |
no test coverage detected