diff options
| author | leimingsheng <leimingsheng@58.com> | 2025-07-21 19:22:27 +0800 |
|---|---|---|
| committer | leimingsheng <leimingsheng@58.com> | 2025-07-21 19:22:27 +0800 |
| commit | 768a1dbfbc629f3817cc872d02ca080ab7a091ec (patch) | |
| tree | 91bf8de367b877c08a5419e9d147ab316e3dce68 /apps/web/src/stores | |
| parent | d6724e2552d14140017b194e7020252bda73751a (diff) | |
| download | opencut-768a1dbfbc629f3817cc872d02ca080ab7a091ec.tar.gz | |
feat: init timeline zoom
Diffstat (limited to 'apps/web/src/stores')
| -rw-r--r-- | apps/web/src/stores/timeline-store.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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<TimelineStore>((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: () => { |
