refactor(layout): less needed for getDragHandlers

Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
This commit is contained in:
Cole Lawrence 2022-05-30 08:44:38 -04:00
parent a5472e1047
commit adc712c205
3 changed files with 2 additions and 10 deletions

View file

@ -168,9 +168,6 @@ function useDragKeyframe(
return selection return selection
.getDragHandlers({ .getDragHandlers({
...sheetObject.address, ...sheetObject.address,
pathToProp: leaf.pathToProp,
trackId: leaf.trackId,
keyframeId: props.keyframe.id,
domNode: node!, domNode: node!,
positionAtStartOfDrag: positionAtStartOfDrag:
props.trackData.keyframes[props.index].position, props.trackData.keyframes[props.index].position,

View file

@ -186,9 +186,6 @@ function useDragForSingleKeyframeDot(
return selection return selection
.getDragHandlers({ .getDragHandlers({
...sheetObject.address, ...sheetObject.address,
pathToProp: leaf.pathToProp,
trackId: leaf.trackId,
keyframeId: props.keyframe.id,
domNode: node!, domNode: node!,
positionAtStartOfDrag: positionAtStartOfDrag:
props.trackData.keyframes[props.index].position, props.trackData.keyframes[props.index].position,

View file

@ -1,7 +1,7 @@
import type Sheet from '@theatre/core/sheets/Sheet' import type Sheet from '@theatre/core/sheets/Sheet'
import getStudio from '@theatre/studio/getStudio' import getStudio from '@theatre/studio/getStudio'
import type useDrag from '@theatre/studio/uiComponents/useDrag' import type useDrag from '@theatre/studio/uiComponents/useDrag'
import type {PropAddress} from '@theatre/shared/utils/addresses' import type {SheetObjectAddress} from '@theatre/shared/utils/addresses'
import subPrism from '@theatre/shared/utils/subPrism' import subPrism from '@theatre/shared/utils/subPrism'
import type { import type {
IRange, IRange,
@ -57,9 +57,7 @@ export type DopeSheetSelection = {
} }
> >
getDragHandlers( getDragHandlers(
origin: PropAddress & { origin: SheetObjectAddress & {
trackId: SequenceTrackId
keyframeId: KeyframeId
positionAtStartOfDrag: number positionAtStartOfDrag: number
domNode: Element domNode: Element
}, },