| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | export const bufferTop = ( |
||
| 2 | rowHeight, viewableIndex, viewableCount, bufferMultiplier, totalCount |
||
| 3 | ) => { |
||
| 4 | const spacerCount = Math.max( |
||
| 5 | viewableIndex - viewableCount * bufferMultiplier, |
||
| 6 | 0 |
||
| 7 | ); |
||
| 8 | |||
| 9 | // spacerCount can never be greater than ( |
||
| 10 | // totalCount - viewableCount * rowHeight) |
||
| 11 | return Math.min( |
||
| 12 | spacerCount * rowHeight, |
||
| 13 | totalCount - viewableCount * rowHeight |
||
| 14 | ); |
||
| 15 | }; |
||
| 16 | |||
| 27 |