fix: playhead not moving in real time
This commit is contained in:
@ -908,6 +908,7 @@ export function Timeline() {
|
|||||||
<div className="flex-1 relative overflow-hidden">
|
<div className="flex-1 relative overflow-hidden">
|
||||||
<ScrollArea className="w-full" ref={rulerScrollRef}>
|
<ScrollArea className="w-full" ref={rulerScrollRef}>
|
||||||
<div
|
<div
|
||||||
|
ref={timelineRef}
|
||||||
className="relative h-12 bg-muted/30 cursor-pointer"
|
className="relative h-12 bg-muted/30 cursor-pointer"
|
||||||
style={{
|
style={{
|
||||||
width: `${dynamicTimelineWidth}px`,
|
width: `${dynamicTimelineWidth}px`,
|
||||||
@ -984,7 +985,7 @@ export function Timeline() {
|
|||||||
|
|
||||||
{/* Playhead in ruler (scrubbable) */}
|
{/* Playhead in ruler (scrubbable) */}
|
||||||
<div
|
<div
|
||||||
className="absolute top-0 bottom-0 w-0.5 bg-red-500 pointer-events-auto z-50 cursor-ew-resize"
|
className="absolute top-0 bottom-0 w-0.5 bg-red-500 pointer-events-auto z-50 cursor-col-resize"
|
||||||
style={{ left: `${playheadPosition * 50 * zoomLevel}px` }}
|
style={{ left: `${playheadPosition * 50 * zoomLevel}px` }}
|
||||||
onMouseDown={handlePlayheadMouseDown}
|
onMouseDown={handlePlayheadMouseDown}
|
||||||
>
|
>
|
||||||
@ -1118,7 +1119,7 @@ export function Timeline() {
|
|||||||
{/* Playhead for tracks area (scrubbable) */}
|
{/* Playhead for tracks area (scrubbable) */}
|
||||||
{tracks.length > 0 && (
|
{tracks.length > 0 && (
|
||||||
<div
|
<div
|
||||||
className="absolute top-0 w-0.5 bg-red-500 pointer-events-auto z-50 cursor-ew-resize"
|
className="absolute top-0 w-0.5 bg-red-500 pointer-events-auto z-50 cursor-col"
|
||||||
style={{
|
style={{
|
||||||
left: `${playheadPosition * 50 * zoomLevel}px`,
|
left: `${playheadPosition * 50 * zoomLevel}px`,
|
||||||
height: `${tracks.length * 60}px`,
|
height: `${tracks.length * 60}px`,
|
||||||
|
Reference in New Issue
Block a user