From adc712c2058110e0b326f8c7bd922491876b56e3 Mon Sep 17 00:00:00 2001 From: Cole Lawrence Date: Mon, 30 May 2022 08:44:38 -0400 Subject: [PATCH] refactor(layout): less needed for getDragHandlers Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com> --- .../KeyframeEditor/BasicKeyframeConnector.tsx | 3 --- .../KeyframeEditor/SingleKeyframeDot.tsx | 3 --- .../studio/src/panels/SequenceEditorPanel/layout/layout.ts | 6 ++---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.tsx b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.tsx index 3e8be3a..410820b 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.tsx @@ -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, diff --git a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/SingleKeyframeDot.tsx b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/SingleKeyframeDot.tsx index 6bd77d1..d3e5a62 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/SingleKeyframeDot.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/SingleKeyframeDot.tsx @@ -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, diff --git a/theatre/studio/src/panels/SequenceEditorPanel/layout/layout.ts b/theatre/studio/src/panels/SequenceEditorPanel/layout/layout.ts index 077063a..f644226 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/layout/layout.ts +++ b/theatre/studio/src/panels/SequenceEditorPanel/layout/layout.ts @@ -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 },