mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 23:03:09 +00:00
fix(studio): resolve a panel edit through the lane groups it can see
animIdForProp matched on the parser's whole-tween propertyGroup, which is
undefined for a legacy mixed tween such as {x, opacity}. Such a tween never
matched, so an edit to either property fell through to the selection's
default animation, a different tween than the lane the user is editing.
Resolve through animationLaneGroups, the same per-keyframe helper the
rendered lanes and the reserved row heights already count groups with.
This commit is contained in:
@@ -16,7 +16,7 @@ import {
|
||||
} from "./propertyPanelHelpers";
|
||||
import { MetricField, Section } from "./propertyPanelPrimitives";
|
||||
import { createTransformCommitHandlers } from "./propertyPanelTransformCommit";
|
||||
import { classifyPropertyGroup } from "@hyperframes/core/gsap-parser";
|
||||
import { resolveAnimIdForProperty } from "../../player/components/TimelinePropertyLanes";
|
||||
import { resolveEditingSections } from "@hyperframes/core/editing";
|
||||
import { MediaSection } from "./propertyPanelMediaSection";
|
||||
import { ColorGradingSection } from "./propertyPanelColorGradingSection";
|
||||
@@ -241,12 +241,8 @@ export const PropertyPanel = memo(function PropertyPanel(props: PropertyPanelPro
|
||||
const navKeyframes = cacheEntry?.keyframes ?? gsapKeyframes;
|
||||
const seekFromKfPct = (pct: number) => onSeekToTime?.(elStart + (pct / 100) * elDuration);
|
||||
|
||||
const animIdForProp = (prop: string): string => {
|
||||
const group = classifyPropertyGroup(prop);
|
||||
const groupAnim = gsapAnimations?.find((a) => a.propertyGroup === group);
|
||||
if (groupAnim) return groupAnim.id;
|
||||
return gsapAnimId ?? "";
|
||||
};
|
||||
const animIdForProp = (prop: string): string =>
|
||||
resolveAnimIdForProperty(prop, gsapAnimations, gsapAnimId);
|
||||
|
||||
const displayX = gsapRuntimeValues?.x ?? manualOffset.x;
|
||||
const displayY = gsapRuntimeValues?.y ?? manualOffset.y;
|
||||
|
||||
Reference in New Issue
Block a user