diff --git a/components/tracks/TrackList.tsx b/components/tracks/TrackList.tsx index 45c05c8..91eedac 100644 --- a/components/tracks/TrackList.tsx +++ b/components/tracks/TrackList.tsx @@ -51,6 +51,14 @@ export function TrackList({ }: TrackListProps) { const [importDialogOpen, setImportDialogOpen] = React.useState(false); const waveformScrollRef = React.useRef(null); + const controlsScrollRef = React.useRef(null); + + // Synchronize vertical scroll between controls and waveforms + const handleWaveformScroll = React.useCallback(() => { + if (waveformScrollRef.current && controlsScrollRef.current) { + controlsScrollRef.current.scrollTop = waveformScrollRef.current.scrollTop; + } + }, []); const handleImportTrack = (buffer: AudioBuffer, name: string) => { if (onImportTrack) { @@ -91,8 +99,8 @@ export function TrackList({
{/* Track List - Two Column Layout */}
- {/* Left Column: Track Controls (Fixed Width, Vertical Scroll) */} -
+ {/* Left Column: Track Controls (Fixed Width, No Scroll - synced with waveforms) */} +
{tracks.map((track) => ( - {/* Right Column: Waveforms (Flexible Width, Shared Horizontal Scroll) */} + {/* Right Column: Waveforms (Flexible Width, Shared Horizontal & Vertical Scroll) */}
{tracks.map((track) => (