doc: Why useLockFrameStampPosition in useDragForSingleKeyframeDot

Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
This commit is contained in:
Cole Lawrence 2022-05-30 08:49:08 -04:00
parent 07febee992
commit 782e0f621e

View file

@ -245,6 +245,9 @@ function useDragForSingleKeyframeDot(
const [isDragging] = useDrag(node, useDragOpts)
// Lock frame stamp to the current position of the dragged keyframe instead of
// the mouse position, so that it appears centered above the keyframe even
// regardless of where in the hit zone of the keyframe the mouse is located.
useLockFrameStampPosition(isDragging, props.keyframe.position)
useCssCursorLock(isDragging, 'draggingPositionInSequenceEditor', 'ew-resize')