From 768a1dbfbc629f3817cc872d02ca080ab7a091ec Mon Sep 17 00:00:00 2001 From: leimingsheng Date: Mon, 21 Jul 2025 19:22:27 +0800 Subject: feat: init timeline zoom --- apps/web/src/stores/timeline-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/web/src/stores/timeline-store.ts') diff --git a/apps/web/src/stores/timeline-store.ts b/apps/web/src/stores/timeline-store.ts index 00bbc743..89a81942 100644 --- a/apps/web/src/stores/timeline-store.ts +++ b/apps/web/src/stores/timeline-store.ts @@ -1173,8 +1173,8 @@ export const useTimelineStore = create((set, get) => { const requiredWidth = totalDuration * TIMELINE_CONSTANTS.PIXELS_PER_SECOND; const calculatedZoom = availableWidth / requiredWidth; - // Clamp between min and max zoom levels - return Math.max(0.1, Math.min(5, calculatedZoom)); + // Clamp between min and max zoom levels (0.3 to 5) + return Math.max(0.5, Math.min(5, calculatedZoom)); }, redo: () => { -- cgit v1.3.1