From 1820f222efcd17646f49270139b1f4ccedf8e29c Mon Sep 17 00:00:00 2001 From: ibs0d <53568938+ibs0d@users.noreply.github.com> Date: Mon, 9 Mar 2026 10:16:46 +1100 Subject: [PATCH] Revert "Add live zoom config and helpers for player/debug modes" --- web/src/views/live/liveZoom.ts | 61 ---------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 web/src/views/live/liveZoom.ts diff --git a/web/src/views/live/liveZoom.ts b/web/src/views/live/liveZoom.ts deleted file mode 100644 index 7ea189b02..000000000 --- a/web/src/views/live/liveZoom.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { type CSSProperties } from "react"; -import { ReactZoomPanPinchProps } from "react-zoom-pan-pinch"; - -export type LiveZoomMode = "player" | "debug"; - -export type LiveZoomWrapperProps = Pick< - ReactZoomPanPinchProps, - "minScale" | "wheel" | "disabled" ->; - -export type LiveZoomTransformStyles = { - wrapperStyle: CSSProperties; - contentStyle: CSSProperties; -}; - -export const LIVE_ZOOM_WHEEL_CONFIG: NonNullable< - ReactZoomPanPinchProps["wheel"] -> = { - smoothStep: 0.005, -}; - -const LIVE_ZOOM_TRANSFORM_STYLES: Record = - { - player: { - wrapperStyle: { - width: "100%", - height: "100%", - }, - contentStyle: { - position: "relative", - width: "100%", - height: "100%", - padding: "8px", - }, - }, - debug: { - wrapperStyle: { - width: "100%", - height: "100%", - }, - contentStyle: { - position: "relative", - width: "100%", - height: "100%", - }, - }, - }; - -export function createLiveZoomWrapperProps(disabled: boolean): LiveZoomWrapperProps { - return { - minScale: 1, - wheel: LIVE_ZOOM_WHEEL_CONFIG, - disabled, - }; -} - -export function getLiveZoomTransformStyles( - mode: LiveZoomMode, -): LiveZoomTransformStyles { - return LIVE_ZOOM_TRANSFORM_STYLES[mode]; -}