mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
rebase
This commit is contained in:
parent
b50ad87d34
commit
93b6d11292
@ -1,4 +1,5 @@
|
||||
import { useCallback, useEffect } from "react";
|
||||
import scrollIntoView from "scroll-into-view-if-needed";
|
||||
import { isMobile } from "react-device-detect";
|
||||
|
||||
type DragHandlerProps = {
|
||||
@ -80,6 +81,10 @@ function useDraggableHandler({
|
||||
minute: "2-digit",
|
||||
...(segmentDuration < 60 && { second: "2-digit" }),
|
||||
});
|
||||
scrollIntoView(thumb, {
|
||||
behavior: "smooth",
|
||||
block: "center",
|
||||
});
|
||||
}
|
||||
});
|
||||
if (setHandlebarTime) {
|
||||
@ -181,11 +186,6 @@ function useDraggableHandler({
|
||||
scrolled;
|
||||
|
||||
updateHandlebarPosition(newHandlePosition - segmentHeight, handlebarTime);
|
||||
|
||||
scrollTimeRef.current.scrollIntoView({
|
||||
behavior: "smooth",
|
||||
block: "center",
|
||||
});
|
||||
}
|
||||
// we know that these deps are correct
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
Loading…
Reference in New Issue
Block a user