🎥 Make videos programmatically with React
refactor(studio): simplify negative frame placement
Jonny Burgerf24ae2e88d6f
diff --git a/packages/studio/src/components/Timeline/TimelineSequence.tsx b/packages/studio/src/components/Timeline/TimelineSequence.tsxindex c1c6dbc802..5904f79ef7 100644--- a/packages/studio/src/components/Timeline/TimelineSequence.tsx+++ b/packages/studio/src/components/Timeline/TimelineSequence.tsx@@ -266,33 +266,9 @@ const TimelineSequenceCurrentFrame: React.FC<{...style,background: negativeStart ? TRANSPARENT : style.background,border: negativeStart ? 'none' : style.border,- overflow: negativeStart ? 'visible' : style.overflow,opacity: hasSelectedTrack && !selected && !containsSelection ? 0.75 : 1,};}, [containsSelection, negativeStart, selected, selectedItems, style]);- const showSequenceFrame =- s.type !== 'audio' &&- s.type !== 'video' &&- s.type !== 'image' &&- s.loopDisplay === undefined &&- (frozenFrame !== null || isInRange || isPremounting || isPostmounting);- const sequenceFrameInfo = showSequenceFrame ? (- <div- data-timeline-sequence-frame- style={{- height: '100%',- display: 'flex',- alignItems: 'center',- }}- >- <TimelineSequenceFrame- premounted={isPremounting}- postmounted={isPostmounting ? s.duration - 1 : null}- roundedFrame={roundedFrame}- frozenFrame={frozenFrame}- />- </div>- ) : null;const content = (<>@@ -334,14 +310,25 @@ const TimelineSequenceCurrentFrame: React.FC<{{children}- {sequenceFrameInfo && !negativeStart ? (+ {s.type !== 'audio' &&+ s.type !== 'video' &&+ s.type !== 'image' &&+ s.loopDisplay === undefined &&+ (frozenFrame !== null || isInRange || isPremounting || isPostmounting) ? (<divstyle={{- paddingLeft: 5 + (premount?.width ?? 0),+ paddingLeft: 5 + negativeStartEnd + (premount?.width ?? 0),height: '100%',+ display: 'flex',+ alignItems: 'center',}}>- {sequenceFrameInfo}+ <TimelineSequenceFrame+ premounted={isPremounting}+ postmounted={isPostmounting ? s.duration - 1 : null}+ roundedFrame={roundedFrame}+ frozenFrame={frozenFrame}+ /></div>) : null}</>@@ -395,19 +382,6 @@ const TimelineSequenceCurrentFrame: React.FC<{>{content}</div>- {sequenceFrameInfo ? (- <div- style={{- height: '100%',- left: 5 + (premount?.width ?? 0),- pointerEvents: 'none',- position: 'absolute',- top: 0,- }}- >- {sequenceFrameInfo}- </div>- ) : null}</div></>) : (