(index: number)
| 19 | initOrResetDerivedValues(); |
| 20 | |
| 21 | function cellPositioner(index: number): Position { |
| 22 | // Find the shortest column and use it. |
| 23 | let columnIndex = 0; |
| 24 | for (let i = 1; i < columnHeights.length; i++) { |
| 25 | if (columnHeights[i] < columnHeights[columnIndex]) { |
| 26 | columnIndex = i; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | const left = columnIndex * (columnWidth + spacer); |
| 31 | const top = columnHeights[columnIndex] || 0; |
| 32 | |
| 33 | columnHeights[columnIndex] = |
| 34 | top + cellMeasurerCache.getHeight(index) + spacer; |
| 35 | |
| 36 | return { |
| 37 | left, |
| 38 | top |
| 39 | }; |
| 40 | } |
| 41 | |
| 42 | function initOrResetDerivedValues(): void { |
| 43 | // Track the height of each column. |
no test coverage detected