mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-08 14:25:41 +03:00
fix setter function
This commit is contained in:
parent
082685b33d
commit
ee68752756
@ -235,18 +235,12 @@ function AnnotationSettings({
|
|||||||
: "mx-1 max-h-[75dvh] overflow-hidden rounded-t-2xl px-4 pb-4"
|
: "mx-1 max-h-[75dvh] overflow-hidden rounded-t-2xl px-4 pb-4"
|
||||||
}
|
}
|
||||||
{...(isDesktop ? { align: "end" } : {})}
|
{...(isDesktop ? { align: "end" } : {})}
|
||||||
|
data-annotation-popover
|
||||||
>
|
>
|
||||||
<AnnotationSettingsPane
|
<AnnotationSettingsPane
|
||||||
event={search as unknown as Event}
|
event={search as unknown as Event}
|
||||||
annotationOffset={annotationOffset}
|
annotationOffset={annotationOffset}
|
||||||
setAnnotationOffset={(value) => {
|
setAnnotationOffset={setAnnotationOffset}
|
||||||
if (typeof value === "function") {
|
|
||||||
const newValue = value(annotationOffset);
|
|
||||||
setAnnotationOffset(newValue);
|
|
||||||
} else {
|
|
||||||
setAnnotationOffset(value);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</Content>
|
</Content>
|
||||||
</Overlay>
|
</Overlay>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ export interface DetailStreamContextType {
|
|||||||
camera: string;
|
camera: string;
|
||||||
annotationOffset: number; // milliseconds
|
annotationOffset: number; // milliseconds
|
||||||
setSelectedObjectIds: React.Dispatch<React.SetStateAction<string[]>>;
|
setSelectedObjectIds: React.Dispatch<React.SetStateAction<string[]>>;
|
||||||
setAnnotationOffset: (ms: number) => void;
|
setAnnotationOffset: React.Dispatch<React.SetStateAction<number>>;
|
||||||
toggleObjectSelection: (id: string | undefined) => void;
|
toggleObjectSelection: (id: string | undefined) => void;
|
||||||
isDetailMode: boolean;
|
isDetailMode: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user