diff --git a/frontend/src/components/HotcueBar.tsx b/frontend/src/components/HotcueBar.tsx index c6a0c11..39e2fb5 100644 --- a/frontend/src/components/HotcueBar.tsx +++ b/frontend/src/components/HotcueBar.tsx @@ -4,7 +4,8 @@ import { contrastText, cueColor } from '../lib/cues' interface Props { cues: CuePoint[] selectedSlot: number | null - onSlotClick: (slot: number) => void + onSlotPress: (slot: number) => void + onSlotRelease: (slot: number) => void } const SLOTS = [0, 1, 2, 3, 4, 5, 6, 7] // Traktor hotcue slots → labelled 1–8 @@ -12,10 +13,12 @@ const SLOTS = [0, 1, 2, 3, 4, 5, 6, 7] // Traktor hotcue slots → labelled 1– /** * The 8 hotcue slots, colour-coded by cue type when assigned (gray when empty). * Rendered as a flex-1 group inside the hotcue row; the parent supplies the row - * chrome and the trailing edit controls. Clicking a slot delegates to the parent - * (create when empty, jump/trigger when assigned). + * chrome and the trailing edit controls. Slots respond to press AND release + * (pointer capture, so a release outside the button still fires) so the parent + * can implement momentary "cue preview" (play while held). Press creates when + * empty and jumps/triggers when assigned; release ends any preview. */ -export function HotcueBar({ cues, selectedSlot, onSlotClick }: Props) { +export function HotcueBar({ cues, selectedSlot, onSlotPress, onSlotRelease }: Props) { return (
{SLOTS.map((slot) => { @@ -25,7 +28,15 @@ export function HotcueBar({ cues, selectedSlot, onSlotClick }: Props) { return ( @@ -737,7 +834,8 @@ export function PrepStrip({ track, playRequest = 0, onError }: Props) {
{selectedCue && selectedCue.type === LOOP_TYPE ? (