(range: ZoomRange)
| 115 | let activeDragCleanup: (() => void) | null = null; |
| 116 | |
| 117 | const applyRangeToDom = (range: ZoomRange): void => { |
| 118 | const r = normalizeRange(range); |
| 119 | const span = clamp(r.end - r.start, 0, 100); |
| 120 | windowEl.style.left = `${r.start}%`; |
| 121 | windowEl.style.width = `${span}%`; |
| 122 | }; |
| 123 | |
| 124 | const getTrackWidthPx = (): number | null => { |
| 125 | // getBoundingClientRect() is robust even if the container is scaled. |
no test coverage detected