mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
move handlebar on click when handlebar is showing
This commit is contained in:
parent
28957004ba
commit
f7150aa43f
@ -97,6 +97,7 @@ export function EventReviewTimeline({
|
||||
minimapEndTime={minimapEndTime}
|
||||
severityType={severityType}
|
||||
contentRef={contentRef}
|
||||
setHandlebarTime={setHandlebarTime}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
@ -29,6 +29,7 @@ type EventSegmentProps = {
|
||||
minimapEndTime?: number;
|
||||
severityType: ReviewSeverity;
|
||||
contentRef: RefObject<HTMLDivElement>;
|
||||
setHandlebarTime?: React.Dispatch<React.SetStateAction<number>>;
|
||||
};
|
||||
|
||||
export function EventSegment({
|
||||
@ -41,6 +42,7 @@ export function EventSegment({
|
||||
minimapEndTime,
|
||||
severityType,
|
||||
contentRef,
|
||||
setHandlebarTime,
|
||||
}: EventSegmentProps) {
|
||||
const {
|
||||
getSeverity,
|
||||
@ -192,6 +194,10 @@ export function EventSegment({
|
||||
element.classList.add("outline-0", "shadow-none");
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
if (setHandlebarTime) {
|
||||
setHandlebarTime(startTimestamp);
|
||||
}
|
||||
}
|
||||
// we know that these deps are correct
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
Loading…
Reference in New Issue
Block a user