mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-25 23:35:43 +00:00
feat(zoom): add auto/manual zoom mode type and default auto zoom depth
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user