mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
feat(studio): unify timeline vertical reorder with z-index stacking
Timeline rows now order by scoped stacking (z-index per stacking context) instead of data-track-index, and dragging a clip up/down commits a targeted z-index change through the same shared path the layers panel uses. Both panels stay consistent and moving a clip actually changes front/back. data-track-index is demoted to time-overlap layout only; no bulk z-index injection (#958 intact). Also restores beat-snapping on keyframe retiming (re-wires snapKeyframePctToBeat, orphaned when keyframe dragging was removed) which surfaced while unifying the model. Extracts pure track-ordering logic to timelineTrackOrder.ts, the stacking reorder commit + deleteSelectedKeyframes to timelineEditingHelpers.ts, to keep StudioApp / the timeline hook / Timeline under the studio 600-LOC cap. U3: scoped stacking row order in the timeline U4: vertical drag commits z-index via the shared reorder commit U8: restore keyframe beat-snap on retime
This commit is contained in:
@@ -41,8 +41,7 @@ export function computeReorderZValues(
|
||||
return hasDupes ? reordered.map((_, i) => reordered.length - i) : sorted;
|
||||
}
|
||||
|
||||
// Exported in a later unit when the timeline consumes it; internal-only for now.
|
||||
function resolveStackingContextKey(item: StackingContextDescriptor): string {
|
||||
export function resolveStackingContextKey(item: StackingContextDescriptor): string {
|
||||
return item.stackingContextId ?? item.parentCompositionId ?? item.compositionAncestors[0] ?? "";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user