mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-26 16:34:43 +03:00
Timeline tweaks (#10693)
* make segment height static * fix timeline overscrolling * better alignment of motion timeline segments
This commit is contained in:
@@ -40,13 +40,9 @@ export function useTimelineUtils({
|
||||
|
||||
const getVisibleTimelineDuration = useCallback(() => {
|
||||
if (timelineRef?.current && timelineDuration) {
|
||||
const {
|
||||
scrollHeight: timelineHeight,
|
||||
clientHeight: visibleTimelineHeight,
|
||||
} = timelineRef.current;
|
||||
const { clientHeight: visibleTimelineHeight } = timelineRef.current;
|
||||
|
||||
const segmentHeight =
|
||||
timelineHeight / (timelineDuration / segmentDuration);
|
||||
const segmentHeight = 8;
|
||||
|
||||
const visibleTime =
|
||||
(visibleTimelineHeight / segmentHeight) * segmentDuration;
|
||||
|
||||
Reference in New Issue
Block a user