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