fix: restore waveform click-to-seek functionality
Re-enabled mouse event handlers on waveform canvas that were accidentally removed. Users can now: - Click to seek to a specific position - Drag to create selection regions Also fixed TypeScript error by properly typing EffectType parameter in handleAddEffect callback. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import { EffectsPanel } from '@/components/effects/EffectsPanel';
|
|||||||
import { formatDuration } from '@/lib/audio/decoder';
|
import { formatDuration } from '@/lib/audio/decoder';
|
||||||
import { useHistory } from '@/lib/hooks/useHistory';
|
import { useHistory } from '@/lib/hooks/useHistory';
|
||||||
import { useRecording } from '@/lib/hooks/useRecording';
|
import { useRecording } from '@/lib/hooks/useRecording';
|
||||||
|
import type { EffectType } from '@/lib/audio/effects/chain';
|
||||||
import {
|
import {
|
||||||
createMultiTrackCutCommand,
|
createMultiTrackCutCommand,
|
||||||
createMultiTrackCopyCommand,
|
createMultiTrackCopyCommand,
|
||||||
@@ -209,7 +210,7 @@ export function AudioEditor() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Effects Panel handlers
|
// Effects Panel handlers
|
||||||
const handleAddEffect = React.useCallback((effectType: any) => {
|
const handleAddEffect = React.useCallback((effectType: EffectType) => {
|
||||||
if (!selectedTrackId) return;
|
if (!selectedTrackId) return;
|
||||||
const track = tracks.find((t) => t.id === selectedTrackId);
|
const track = tracks.find((t) => t.id === selectedTrackId);
|
||||||
if (!track) return;
|
if (!track) return;
|
||||||
|
|||||||
@@ -628,7 +628,10 @@ export function Track({
|
|||||||
{/* Waveform Canvas */}
|
{/* Waveform Canvas */}
|
||||||
<canvas
|
<canvas
|
||||||
ref={canvasRef}
|
ref={canvasRef}
|
||||||
className="absolute inset-0 w-full h-full"
|
className="absolute inset-0 w-full h-full cursor-pointer"
|
||||||
|
onMouseDown={handleCanvasMouseDown}
|
||||||
|
onMouseMove={handleCanvasMouseMove}
|
||||||
|
onMouseUp={handleCanvasMouseUp}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user