diff --git a/frontend/src/lib/components/AnnotationEditOverlay.svelte b/frontend/src/lib/components/AnnotationEditOverlay.svelte index 595459f3..bf920f2f 100644 --- a/frontend/src/lib/components/AnnotationEditOverlay.svelte +++ b/frontend/src/lib/components/AnnotationEditOverlay.svelte @@ -226,6 +226,17 @@ function handleKeyDown(event: KeyboardEvent): void { }, 300); } +const directionLabels: Record = { + nw: 'NW', + ne: 'NE', + sw: 'SW', + se: 'SE', + n: 'N', + s: 'S', + e: 'E', + w: 'W' +}; + // Preview rect in pixel space (maps live normalized coords back to SVG pixel coordinates). // Shown during pointer drag and during keyboard nudging (whenever live coords differ from stored). let previewX = $derived(((liveX - annotation.x) / annotation.width) * svgWidth); @@ -298,10 +309,15 @@ let hasLiveChanges = $derived( {#each handles as handle (handle.id)} handlePointerDown(e, 'handle', handle.id)} + onkeydown={(e) => { + if (e.key === 'Enter' || e.key === ' ') e.preventDefault(); + }} >