mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 00:52:17 +03:00
Add zoom icons to timeline (#20717)
* add icons to zoom timeline * fix current zoom level handling * ensure mobile buttons don't stay selected * remove icons on event review timeline * add tooltips
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
MotionData,
|
||||
ReviewSegment,
|
||||
TimelineZoomDirection,
|
||||
ZoomLevel,
|
||||
} from "@/types/review";
|
||||
import ReviewTimeline from "./ReviewTimeline";
|
||||
import { useMotionSegmentUtils } from "@/hooks/use-motion-segment-utils";
|
||||
@@ -47,6 +48,9 @@ export type MotionReviewTimelineProps = {
|
||||
isZooming: boolean;
|
||||
zoomDirection: TimelineZoomDirection;
|
||||
alwaysShowMotionLine?: boolean;
|
||||
onZoomChange?: (newZoomLevel: number) => void;
|
||||
possibleZoomLevels?: ZoomLevel[];
|
||||
currentZoomLevel?: number;
|
||||
};
|
||||
|
||||
export function MotionReviewTimeline({
|
||||
@@ -77,6 +81,9 @@ export function MotionReviewTimeline({
|
||||
isZooming,
|
||||
zoomDirection,
|
||||
alwaysShowMotionLine = false,
|
||||
onZoomChange,
|
||||
possibleZoomLevels,
|
||||
currentZoomLevel,
|
||||
}: MotionReviewTimelineProps) {
|
||||
const internalTimelineRef = useRef<HTMLDivElement>(null);
|
||||
const selectedTimelineRef = timelineRef || internalTimelineRef;
|
||||
@@ -206,6 +213,9 @@ export function MotionReviewTimeline({
|
||||
isZooming={isZooming}
|
||||
zoomDirection={zoomDirection}
|
||||
getRecordingAvailability={getRecordingAvailability}
|
||||
onZoomChange={onZoomChange}
|
||||
possibleZoomLevels={possibleZoomLevels}
|
||||
currentZoomLevel={currentZoomLevel}
|
||||
>
|
||||
<VirtualizedMotionSegments
|
||||
ref={virtualizedSegmentsRef}
|
||||
|
||||
Reference in New Issue
Block a user