forked from Github/frigate
Timeline tweaks (#10693)
* make segment height static * fix timeline overscrolling * better alignment of motion timeline segments
This commit is contained in:
@@ -82,7 +82,7 @@ export function useCameraMotionNextTimestamp(
|
||||
});
|
||||
|
||||
const noMotionRanges = useMemo(() => {
|
||||
if (!motionData || !reviewItems) {
|
||||
if (!motionData || !reviewItems || !motionData) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -100,8 +100,7 @@ export function useCameraMotionNextTimestamp(
|
||||
alignStartDateToTimeline(timeRangeSegmentEnd)) %
|
||||
segmentDuration;
|
||||
|
||||
const startIndex =
|
||||
offset > 0 ? Math.floor(offset / (segmentDuration / 15)) : 0;
|
||||
const startIndex = Math.abs(Math.floor(offset / 15));
|
||||
|
||||
for (
|
||||
let i = startIndex;
|
||||
|
||||
Reference in New Issue
Block a user