fix: address final review findings (clip reset, codecs, paths, timeline)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user