getCanvasSequenceReorderSelection()v4.0.533
Returns the sequences to move when a timeline drag starts. Dragging a selected sequence moves the entire sequence selection. Dragging an unselected sequence moves only that sequence.
get-reorder-selection.tsimport {getCanvasSequenceReorderSelection , typeCanvasSelectionItem , } from '@remotion/sdk'; declare constdraggedItem :Extract <CanvasSelectionItem , {type : 'sequence'}>; declare constselectedItems :CanvasSelectionItem []; constnodePathInfos =getCanvasSequenceReorderSelection ({draggedItem ,selectedItems , });
The result follows the order of selectedItems. A source edit can sort the returned nodes by their JSX order. If the selection contains another item type, only draggedItem is returned.
Options
draggedItem
The sequence where the drag began.
selectedItems
The current selection, such as controller.selection.getSnapshot().selectedItems.
Return value
An array of SequenceNodePathInfo values to move.
Compatibility
| Browsers | Environments | |||||
|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | ||||