mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 06:30:03 +00:00
fix(studio): span the clip on the remaining duration-less tween paths
Two sibling call paths still answered from GSAP's 0.5s default while the toggle path had moved to the clip-wide fallback. isPlayheadWithinTween now takes the selection, so the toolbar stops promising "extends animation" on a duration-less tween whose click actually toggles an interior keyframe. The arc drag commit resolves its replacement duration the same way its click-path sibling does, instead of authoring duration 0.5 and collapsing the arc window. The flat text section drops its two marker-clearing effects: the autofocus marker is a ref now, read and cleared by the render that consumes it.
This commit is contained in:
@@ -4,6 +4,7 @@ import { usePlayerStore } from "../player/store/playerStore";
|
||||
import { resolveTweenStart, resolveTweenDuration } from "../utils/globalTimeCompiler";
|
||||
import { roundTo3 } from "../utils/rounding";
|
||||
import { computeDraggedGsapPosition } from "./draggedGsapPosition";
|
||||
import { resolveEditableTweenDuration } from "./gsapShared";
|
||||
import {
|
||||
type GsapDragCommitCallbacks,
|
||||
computeCurrentPercentage,
|
||||
@@ -297,7 +298,9 @@ export async function commitGsapPositionFromDrag(
|
||||
}
|
||||
|
||||
const tweenStart = resolveTweenStart(anim);
|
||||
const tweenDuration = resolveTweenDuration(anim);
|
||||
// Clip-wide, same as applyArcKeyframeAtPlayhead: authoring GSAP's 0.5s
|
||||
// default here would collapse a duration-less arc's window on drag.
|
||||
const tweenDuration = resolveEditableTweenDuration(anim, selection);
|
||||
if (tweenStart === null || tweenDuration <= 0 || keyframes.length < 2) return;
|
||||
const temporalKeyframes = buildTemporalArcKeyframes(anim, pct, { x: newX, y: newY });
|
||||
await callbacks.commitMutation(
|
||||
|
||||
Reference in New Issue
Block a user