mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 12:28:12 +00:00
feat(studio): move selected timeline clips together
Fan selected body drags through a group move session that snapshots all selected members. The grabbed clip snap result is applied first, then one shared delta is clamped. Live preview patches every moved member and release persists once through batch timing.
This commit is contained in:
@@ -10,7 +10,7 @@ export function useTimelineEditContext(): TimelineEditCallbacks {
|
||||
}
|
||||
|
||||
/**
|
||||
* Optional access — returns an empty object when outside a provider.
|
||||
* Optional access, returns an empty object when outside a provider.
|
||||
* Useful in components that can render both inside and outside the NLE.
|
||||
*/
|
||||
export function useTimelineEditContextOptional(): TimelineEditCallbacks {
|
||||
@@ -26,7 +26,7 @@ export function TimelineEditProvider({
|
||||
}) {
|
||||
const memoized = useMemo(
|
||||
() => value,
|
||||
// Each callback is a stable reference from the parent — memoize the bag
|
||||
// Each callback is a stable reference from the parent, memoize the bag
|
||||
// so consumers don't re-render when unrelated parent state changes.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[
|
||||
@@ -34,6 +34,7 @@ export function TimelineEditProvider({
|
||||
value.onResizeElement,
|
||||
value.onMoveElements,
|
||||
value.onResizeElements,
|
||||
value.onPreviewMoveElements,
|
||||
value.onToggleTrackHidden,
|
||||
value.onToggleElementHidden,
|
||||
value.onBlockedEditAttempt,
|
||||
|
||||
Reference in New Issue
Block a user