* Iterate leaves (they are layout units) if dimIdx === this.dimIdx. * Iterate levels if dimIdx !== this.dimIdx.
(
it: ListIterator<MatrixCellLayoutInfo> | NullUndefined,
dimIdx: number,
startLocator?: MatrixXYLocator | NullUndefined,
count?: number | NullUndefined,
)
| 369 | * Iterate levels if dimIdx !== this.dimIdx. |
| 370 | */ |
| 371 | resetLayoutIterator( |
| 372 | it: ListIterator<MatrixCellLayoutInfo> | NullUndefined, |
| 373 | dimIdx: number, |
| 374 | startLocator?: MatrixXYLocator | NullUndefined, |
| 375 | count?: number | NullUndefined, |
| 376 | ): ListIterator<MatrixCellLayoutInfo> { |
| 377 | it = it || new ListIterator<MatrixCellLayoutInfo>(); |
| 378 | if (dimIdx === this.dimIdx) { |
| 379 | const len = this._leavesCount; |
| 380 | const startIdx = startLocator != null ? Math.max(0, startLocator) : 0; |
| 381 | count = count != null ? Math.min(count, len) : len; |
| 382 | it.reset(this._cells, startIdx, startIdx + count); |
| 383 | } |
| 384 | else { |
| 385 | const len = this._levels.length; |
| 386 | // Corner locator is from `-this._levels.length` to `-1`. |
| 387 | const startIdx = startLocator != null ? Math.max(0, startLocator + len) : 0; |
| 388 | count = count != null ? Math.min(count, len) : len; |
| 389 | it.reset(this._levels, startIdx, startIdx + count); |
| 390 | } |
| 391 | return it; |
| 392 | } |
| 393 | |
| 394 | resetCellIterator( |
| 395 | it?: ListIterator<MatrixDimensionCell> |
no test coverage detected