mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-12 07:09:59 +00:00
fix(studio): scope timeline context targets (#2708)
This commit is contained in:
@@ -15,12 +15,7 @@ import {
|
||||
} from "../utils/sdkCutover";
|
||||
import type { KeyframeCacheEntry } from "../player/store/playerStore";
|
||||
import { commitKeyframeAtTimeImpl } from "./gsapKeyframeCommit";
|
||||
import { idFromSelector } from "./gsapShared";
|
||||
import {
|
||||
clearKeyframeCacheForElement,
|
||||
readKeyframeSnapshot,
|
||||
writeKeyframeCache,
|
||||
} from "./gsapKeyframeCacheHelpers";
|
||||
import { readKeyframeSnapshot, writeKeyframeCache } from "./gsapKeyframeCacheHelpers";
|
||||
import type {
|
||||
CommitMutation,
|
||||
CommitMutationOptions,
|
||||
@@ -336,11 +331,6 @@ export function useGsapKeyframeOps({
|
||||
const removeAllKeyframes = useCallback(
|
||||
async (selection: DomEditSelection, animationId: string) => {
|
||||
const targetPath = selection.sourceFile || activeCompPath || "index.html";
|
||||
// remove-all-keyframes collapses the tween to a static hold and the commit
|
||||
// path doesn't return parsed animations, so the keyframe cache is never
|
||||
// refreshed — clear it here so the timeline diamonds disappear immediately.
|
||||
const elementId = selection.id ?? idFromSelector(selection.selector);
|
||||
if (elementId) clearKeyframeCacheForElement(targetPath, elementId);
|
||||
if (sdkSession && sdkDeps) {
|
||||
const handled = await sdkGsapRemoveAllKeyframesPersist(
|
||||
targetPath,
|
||||
@@ -351,7 +341,7 @@ export function useGsapKeyframeOps({
|
||||
);
|
||||
if (cutoverCommittedOrThrow(handled)) return;
|
||||
}
|
||||
commitMutationSafely(
|
||||
await commitMutationSafely(
|
||||
selection,
|
||||
{ type: "remove-all-keyframes", animationId },
|
||||
{ label: "Remove all keyframes", softReload: true },
|
||||
|
||||
Reference in New Issue
Block a user