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
.getDragHandlers({
...sheetObject.address,
pathToProp: leaf.pathToProp,
trackId: leaf.trackId,
keyframeId: props.keyframe.id,
domNode: node!,
positionAtStartOfDrag:
props.trackData.keyframes[props.index].position,

View file

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

View file

@ -1,7 +1,7 @@
import type Sheet from '@theatre/core/sheets/Sheet'
import getStudio from '@theatre/studio/getStudio'
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 type {
IRange,
@ -57,9 +57,7 @@ export type DopeSheetSelection = {
}
>
getDragHandlers(
origin: PropAddress & {
trackId: SequenceTrackId
keyframeId: KeyframeId
origin: SheetObjectAddress & {
positionAtStartOfDrag: number
domNode: Element
},