mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Don't show minimap when view is not scrollable (#10062)
This commit is contained in:
parent
76ad91f9b5
commit
1dd904d89a
@ -86,6 +86,14 @@ export default function DesktopEventView({
|
|||||||
return current;
|
return current;
|
||||||
}, [reviewItems, severity]);
|
}, [reviewItems, severity]);
|
||||||
|
|
||||||
|
const showMinimap = useMemo(() => {
|
||||||
|
if (!contentRef.current) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return contentRef.current.scrollHeight > contentRef.current.clientHeight
|
||||||
|
}, [contentRef.current?.scrollHeight])
|
||||||
|
|
||||||
// review interaction
|
// review interaction
|
||||||
|
|
||||||
const pagingObserver = useRef<IntersectionObserver | null>();
|
const pagingObserver = useRef<IntersectionObserver | null>();
|
||||||
@ -310,7 +318,7 @@ export default function DesktopEventView({
|
|||||||
timestampSpread={15}
|
timestampSpread={15}
|
||||||
timelineStart={timeRange.before}
|
timelineStart={timeRange.before}
|
||||||
timelineEnd={timeRange.after}
|
timelineEnd={timeRange.after}
|
||||||
showMinimap
|
showMinimap={showMinimap}
|
||||||
minimapStartTime={minimapBounds.start}
|
minimapStartTime={minimapBounds.start}
|
||||||
minimapEndTime={minimapBounds.end}
|
minimapEndTime={minimapBounds.end}
|
||||||
events={reviewItems.all}
|
events={reviewItems.all}
|
||||||
|
Loading…
Reference in New Issue
Block a user