ensure motion only checks both halves of segment

This commit is contained in:
Josh Hawkins 2024-12-26 18:10:59 -06:00
parent 550c3af2dd
commit b2fee81123

View File

@ -115,7 +115,14 @@ export function MotionReviewTimeline({
(item.start_time <= motionStart && (item.start_time <= motionStart &&
(item.end_time ?? timelineStart) >= motionEnd), (item.end_time ?? timelineStart) >= motionEnd),
); );
if (getMotionSegmentValue(segmentTime) && !overlappingReviewItems) { const firstHalfMotionValue = getMotionSegmentValue(motionStart);
const secondHalfMotionValue = getMotionSegmentValue(
motionStart + segmentDuration / 2,
);
const segmentMotion =
firstHalfMotionValue > 0 || secondHalfMotionValue > 0;
if (segmentMotion && !overlappingReviewItems) {
segments.push(segmentTime); segments.push(segmentTime);
} }
} }