mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-08 02:36:10 +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:
@@ -254,7 +254,7 @@ export const MotionPathOverlay = memo(function MotionPathOverlay({
|
||||
ref: MotionNodeRef,
|
||||
) => {
|
||||
if (!interactive) return;
|
||||
if (e.button !== 0) return; // primary button only — right-click is the context menu
|
||||
if (e.button !== 0) return;
|
||||
e.stopPropagation();
|
||||
(e.target as Element).setPointerCapture(e.pointerId);
|
||||
dragRef.current = {
|
||||
|
||||
@@ -536,7 +536,6 @@ export function applyStudioRotationDraft(element: HTMLElement, rotation: { angle
|
||||
}
|
||||
|
||||
/* ── Seek reapply (position + motion) ────────────────────────────── */
|
||||
|
||||
function queryStudioElements(doc: Document, attr: string): HTMLElement[] {
|
||||
const ctor = doc.defaultView?.HTMLElement;
|
||||
if (!ctor) return [];
|
||||
@@ -584,7 +583,6 @@ function reapplyBoxSizes(doc: Document): void {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reapplyRotations(doc: Document): void {
|
||||
for (const el of queryStudioElements(doc, STUDIO_ROTATION_ATTR)) {
|
||||
const angle = Number.parseFloat(el.style.getPropertyValue(STUDIO_ROTATION_PROP));
|
||||
|
||||
Reference in New Issue
Block a user