Skip to content

🎥 Make videos programmatically with React

Update TimelineSequence.tsx

Jonny Burger132b9744ff54
diff --git a/packages/cli/src/editor/components/TimelineSequence.tsx b/packages/cli/src/editor/components/TimelineSequence.tsx
index c524ab9ff7..516a6def11 100644
--- a/packages/cli/src/editor/components/TimelineSequence.tsx
+++ b/packages/cli/src/editor/components/TimelineSequence.tsx
@@ -2,6 +2,7 @@ import React, {useMemo} from 'react';
import {Internals} from 'remotion';
import styled from 'styled-components';
import {SequenceWithOverlap} from '../helpers/calculate-timeline';
+import {TIMELINE_PADDING} from '../helpers/timeline-layout';
import {useWindowSize} from '../hooks/use-window-size';
import {Thumbnail} from './Thumbnail';
@@ -45,8 +46,8 @@ export const TimelineSequence: React.FC<{
marginLeft: `calc(${(s.sequence.from / lastFrame) * 100}%)`,
width:
s.sequence.duration === Infinity
- ? width
- : `calc(${(spatialDuration / lastFrame) * 100}%)`,
+ ? width - TIMELINE_PADDING * 2
+ : (spatialDuration / lastFrame) * width - TIMELINE_PADDING * 2,
color: 'white',
overflow: 'hidden',
};