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,
|
showDraggableElement: showHandlebar,
|
||||||
draggableElementTime: handlebarTime,
|
draggableElementTime: handlebarTime,
|
||||||
setDraggableElementTime: setHandlebarTime,
|
setDraggableElementTime: setHandlebarTime,
|
||||||
|
alignSetTimeToSegment: true,
|
||||||
initialScrollIntoViewOnly: onlyInitialHandlebarScroll,
|
initialScrollIntoViewOnly: onlyInitialHandlebarScroll,
|
||||||
timelineDuration,
|
timelineDuration,
|
||||||
timelineCollapsed: timelineCollapsed,
|
timelineCollapsed: timelineCollapsed,
|
||||||
|
@ -323,21 +323,21 @@ function useDraggableElement({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setTime = alignSetTimeToSegment
|
||||||
|
? targetSegmentId
|
||||||
|
: targetSegmentId + segmentDuration * (offset / segmentHeight);
|
||||||
|
|
||||||
updateDraggableElementPosition(
|
updateDraggableElementPosition(
|
||||||
newElementPosition,
|
newElementPosition,
|
||||||
targetSegmentId,
|
setTime,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (setDraggableElementTime) {
|
if (setDraggableElementTime) {
|
||||||
if (alignSetTimeToSegment) {
|
setDraggableElementTime(
|
||||||
setDraggableElementTime(targetSegmentId);
|
targetSegmentId + segmentDuration * (offset / segmentHeight),
|
||||||
} else {
|
);
|
||||||
setDraggableElementTime(
|
|
||||||
targetSegmentId + segmentDuration * (offset / segmentHeight),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (draggingAtTopEdge || draggingAtBottomEdge) {
|
if (draggingAtTopEdge || draggingAtBottomEdge) {
|
||||||
|
Loading…
Reference in New Issue
Block a user