(start: number, end: number)
| 69 | |
| 70 | // Calculate effective available width based on whether we'll show arrows |
| 71 | function getEffectiveWidth(start: number, end: number): number { |
| 72 | let width = availableWidth |
| 73 | if (start > 0) width -= arrowWidth // left arrow |
| 74 | if (end < totalItems) width -= arrowWidth // right arrow |
| 75 | return width |
| 76 | } |
| 77 | |
| 78 | // Edge-based scrolling: Start from the beginning and only scroll when necessary |
| 79 | // First, calculate how many items fit starting from index 0 |
no outgoing calls
no test coverage detected