* Rebuild the position cache from measured heights
()
| 264 | * Rebuild the position cache from measured heights |
| 265 | */ |
| 266 | private rebuildPositionCache(): void { |
| 267 | this.positionCache = []; |
| 268 | let currentPosition = 0; |
| 269 | |
| 270 | for (let i = 0; i < this.items.length; i++) { |
| 271 | this.positionCache[i] = currentPosition; |
| 272 | currentPosition += this.getItemHeight(i); |
| 273 | } |
| 274 | |
| 275 | this.totalHeight = currentPosition; |
| 276 | this.updateSpacerHeight(); |
| 277 | } |
| 278 | |
| 279 | private getItemEntries(): VirtualScrollerItemEntry<T>[] { |
| 280 | return this.items.map((item, index) => ({ |
no test coverage detected