feat(zoom): add auto/manual zoom mode type and default auto zoom depth

This commit is contained in:
webadderall
2026-04-08 21:42:44 +10:00
parent aa3018ea1e
commit 6b58074c85
+4
View File
@@ -5,12 +5,15 @@ export interface ZoomFocus {
cy: number; // normalized vertical center (0-1)
}
export type ZoomMode = "auto" | "manual";
export interface ZoomRegion {
id: string;
startMs: number;
endMs: number;
depth: ZoomDepth;
focus: ZoomFocus;
mode?: ZoomMode;
}
export interface CursorTelemetryPoint {
@@ -369,6 +372,7 @@ export const ZOOM_DEPTH_SCALES: Record<ZoomDepth, number> = {
};
export const DEFAULT_ZOOM_DEPTH: ZoomDepth = 3;
export const DEFAULT_AUTO_ZOOM_DEPTH: ZoomDepth = 2;
export function clampFocusToDepth(focus: ZoomFocus, _depth: ZoomDepth): ZoomFocus {
return {