summaryrefslogtreecommitdiff
path: root/apps/web/src/stores
diff options
context:
space:
mode:
authorAnwarul Islam <anwaarulislaam@gmail.com>2025-07-15 06:59:46 +0600
committerAnwarul Islam <anwaarulislaam@gmail.com>2025-07-15 06:59:46 +0600
commit9cc77b4499023fa48b9a1abcb05a59c94fcfc4c5 (patch)
treef8be01fb87e23a5997c2915b5683350355cab638 /apps/web/src/stores
parent59f4098f752ff9f992f622e2984278d7b1ba91a4 (diff)
downloadopencut-9cc77b4499023fa48b9a1abcb05a59c94fcfc4c5.tar.gz
feat: enforce non-negative snap threshold and minimum grid interval in timeline store
Diffstat (limited to 'apps/web/src/stores')
-rw-r--r--apps/web/src/stores/timeline-store.ts4
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 b45f5507..2734903a 100644
--- a/apps/web/src/stores/timeline-store.ts
+++ b/apps/web/src/stores/timeline-store.ts
@@ -996,11 +996,11 @@ export const useTimelineStore = create<TimelineStore>((set, get) => {
},
setSnapThreshold: (threshold) => {
- set({ snapThreshold: threshold });
+ set({ snapThreshold: Math.max(0, threshold) }); // Ensure non-negative threshold
},
setGridInterval: (interval) => {
- set({ gridInterval: interval });
+ set({ gridInterval: Math.max(0.1, interval) }); // Ensure minimum interval
},
};
});