Bug fix
This commit is contained in:
parent
4eaba1e8d5
commit
af336a0a82
4 changed files with 11 additions and 6 deletions
|
@ -181,6 +181,7 @@ function useDragKeyframe(node: HTMLDivElement | null, props: IProps) {
|
|||
pathToProp: leaf.pathToProp,
|
||||
trackId: leaf.trackId,
|
||||
keyframeId: props.keyframe.id,
|
||||
domNode: node!,
|
||||
positionAtStartOfDrag:
|
||||
props.trackData.keyframes[props.index].position,
|
||||
})
|
||||
|
|
|
@ -164,6 +164,7 @@ function useDragKeyframe(
|
|||
pathToProp: leaf.pathToProp,
|
||||
trackId: leaf.trackId,
|
||||
keyframeId: props.keyframe.id,
|
||||
domNode: node!,
|
||||
positionAtStartOfDrag:
|
||||
props.trackData.keyframes[props.index].position,
|
||||
})
|
||||
|
|
|
@ -212,10 +212,12 @@ namespace utils {
|
|||
tempTransaction = undefined
|
||||
}
|
||||
|
||||
const snapTarget = event.composedPath().find(
|
||||
const snapTarget = event
|
||||
.composedPath()
|
||||
.find(
|
||||
(el): el is Element =>
|
||||
el instanceof Element &&
|
||||
// el !== node &&
|
||||
el !== origin.domNode &&
|
||||
el.hasAttribute('data-pos'),
|
||||
)
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ export type DopeSheetSelection = {
|
|||
trackId: string
|
||||
keyframeId: string
|
||||
positionAtStartOfDrag: number
|
||||
domNode: Element
|
||||
},
|
||||
): Parameters<typeof useDrag>[1]
|
||||
delete(): void
|
||||
|
|
Loading…
Reference in a new issue