fix: address final review findings (clip reset, codecs, paths, timeline)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-21 11:25:28 -04:00
parent 169d3d5592
commit 149ce3da21
9 changed files with 70 additions and 5 deletions

View File

@@ -17,6 +17,13 @@ export function computeZoom(
duration: number
): { visibleStart: number; visibleEnd: number; zoom: number } {
const currentRange = state.visibleEnd - state.visibleStart;
if (currentRange <= 0) {
return {
visibleStart: state.visibleStart,
visibleEnd: state.visibleEnd,
zoom: state.zoom,
};
}
const newRange = currentRange / factor;
const clampedRange = Math.max(MIN_VISIBLE_RANGE, Math.min(newRange, duration));