mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
always use full resolution time when dragging (#10939)
This commit is contained in:
parent
fb6f415b27
commit
7a7ae81d50
@ -107,6 +107,7 @@ export function ReviewTimeline({
|
||||
showDraggableElement: showHandlebar,
|
||||
draggableElementTime: handlebarTime,
|
||||
setDraggableElementTime: setHandlebarTime,
|
||||
alignSetTimeToSegment: true,
|
||||
initialScrollIntoViewOnly: onlyInitialHandlebarScroll,
|
||||
timelineDuration,
|
||||
timelineCollapsed: timelineCollapsed,
|
||||
|
@ -323,22 +323,22 @@ function useDraggableElement({
|
||||
}
|
||||
}
|
||||
|
||||
const setTime = alignSetTimeToSegment
|
||||
? targetSegmentId
|
||||
: targetSegmentId + segmentDuration * (offset / segmentHeight);
|
||||
|
||||
updateDraggableElementPosition(
|
||||
newElementPosition,
|
||||
targetSegmentId,
|
||||
setTime,
|
||||
false,
|
||||
false,
|
||||
);
|
||||
|
||||
if (setDraggableElementTime) {
|
||||
if (alignSetTimeToSegment) {
|
||||
setDraggableElementTime(targetSegmentId);
|
||||
} else {
|
||||
setDraggableElementTime(
|
||||
targetSegmentId + segmentDuration * (offset / segmentHeight),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (draggingAtTopEdge || draggingAtBottomEdge) {
|
||||
animationFrameId = requestAnimationFrame(handleScroll);
|
||||
|
Loading…
Reference in New Issue
Block a user