mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-12 23:29:50 +00:00
fix(studio): harden composition timeline reliability (#2615)
* fix(studio): preserve composition playback continuity * feat(studio): drag compositions into the timeline * fix(studio): collapse expanded composition move aliases * fix(studio): make timeline cuts atomic * fix(studio): group inspector gesture history * test(studio): cover masked text selection * fix(studio): harden composition timeline reliability * fix(studio): satisfy CI source gates * fix(studio): harden composition mutation requests
This commit is contained in:
@@ -208,13 +208,19 @@ export function usePreviewPersistence({
|
||||
// attributes onto the live DOM and re-runs the timeline at the SAME playhead,
|
||||
// falling back to reloadPreview for anything structural (split/delete undo),
|
||||
// multi-file, sub-comp, or a permanent soft-reload failure.
|
||||
applyUndoRestoreToPreview(
|
||||
const strategy = applyUndoRestoreToPreview(
|
||||
previewIframeRef.current,
|
||||
activeCompPathRef.current,
|
||||
restore.files,
|
||||
usePlayerStore.getState().currentTime,
|
||||
reloadPreview,
|
||||
);
|
||||
if (strategy === "full") {
|
||||
const player = usePlayerStore.getState();
|
||||
player.setElements([]);
|
||||
player.setSelectedElementId(null);
|
||||
player.setTimelineReady(false);
|
||||
}
|
||||
},
|
||||
[previewIframeRef, activeCompPathRef, reloadPreview],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user