mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
fix(studio): selectedGsapAnimations empty after gesture recording (#1646)
- include target in useGsapAnimationsForElement fetch key so a selection change triggers a re-fetch even at the same cache version - add gsapCacheVersion to useDomEditPreviewSync deps so the selection re-syncs after every soft reload - trim manualEditsDom.ts to 600 LOC (filesize compliance) Fixes #1645
This commit is contained in:
@@ -28,6 +28,7 @@ interface UseDomEditPreviewSyncParams {
|
||||
>;
|
||||
openSourceForSelection?: (sourceFile: string, target: PatchTarget) => void;
|
||||
getSidebarTab?: () => SidebarTab;
|
||||
gsapCacheVersion?: number;
|
||||
}
|
||||
|
||||
export function useDomEditPreviewSync({
|
||||
@@ -43,6 +44,7 @@ export function useDomEditPreviewSync({
|
||||
applyStudioManualEditsToPreviewRef,
|
||||
openSourceForSelection,
|
||||
getSidebarTab,
|
||||
gsapCacheVersion,
|
||||
}: UseDomEditPreviewSyncParams): void {
|
||||
// Sync selection from preview document on load / refresh
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
@@ -102,6 +104,7 @@ export function useDomEditPreviewSync({
|
||||
refreshPreviewDocumentVersion,
|
||||
syncPreviewHistoryHotkey,
|
||||
applyStudioManualEditsToPreviewRef,
|
||||
gsapCacheVersion,
|
||||
]);
|
||||
|
||||
// Auto-reveal source when an element is selected while the Code tab is active.
|
||||
|
||||
Reference in New Issue
Block a user