mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 12:45:25 +03:00
observe only when not showing minimap
This commit is contained in:
parent
a86accba31
commit
e4ae1112ef
@ -222,7 +222,7 @@ export function EventReviewTimeline({
|
|||||||
}, [isDragging, onHandlebarDraggingChange]);
|
}, [isDragging, onHandlebarDraggingChange]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (contentRef.current && segments) {
|
if (contentRef.current && segments && !showMinimap) {
|
||||||
observer.current = new IntersectionObserver(
|
observer.current = new IntersectionObserver(
|
||||||
(entries) => {
|
(entries) => {
|
||||||
entries.forEach((entry) => {
|
entries.forEach((entry) => {
|
||||||
@ -260,7 +260,7 @@ export function EventReviewTimeline({
|
|||||||
return () => {
|
return () => {
|
||||||
observer.current?.disconnect();
|
observer.current?.disconnect();
|
||||||
};
|
};
|
||||||
}, [contentRef, segments]);
|
}, [contentRef, segments, showMinimap]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user