mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
fix(studio): keep timeline selection authoritative in the preview sync
The store-to-preview sync no longer applies a partial selection: if a resolvable member's DOM node is not ready yet it bails and retries on the next effect run, so the write-back can never shrink the store's selection by dropping an unresolved member. Marquee row hit-testing reuses shouldShowTimelineLayerGroupHeader instead of re-deriving the group-header placement rule, keeping one owner for that predicate.
This commit is contained in:
@@ -2,6 +2,7 @@ import { formatTime } from "../lib/time";
|
||||
import { roundToCenti } from "../../utils/rounding";
|
||||
import type { StackingTimelineLayer, TimelineLayerId } from "./timelineTrackOrder";
|
||||
import { resolveTimelineLayerStackingMove } from "./timelineLayerDrag";
|
||||
import { shouldShowTimelineLayerGroupHeader } from "./TimelineLayerGroupHeader";
|
||||
import type { TimelineStackingElement, TimelineStackingReorderIntent } from "./timelineStacking";
|
||||
|
||||
import {
|
||||
@@ -348,7 +349,7 @@ export function selectTimelineElementsInMarquee({
|
||||
for (const layerId of layerOrder) {
|
||||
const layer = layerById.get(layerId);
|
||||
if (!layer) continue;
|
||||
if (layer.contextKey !== "" && layer.contextKey !== previousContextKey) {
|
||||
if (shouldShowTimelineLayerGroupHeader(layer.contextKey, previousContextKey)) {
|
||||
rowTop += groupHeaderHeight;
|
||||
}
|
||||
const rowBottom = rowTop + trackHeight;
|
||||
|
||||
Reference in New Issue
Block a user