diff --git a/ui/src/lib/components/AudioPlayer.svelte b/ui/src/lib/components/AudioPlayer.svelte index c5f7ee8..bb26827 100644 --- a/ui/src/lib/components/AudioPlayer.svelte +++ b/ui/src/lib/components/AudioPlayer.svelte @@ -995,9 +995,11 @@ // Only start moving if dragged > 6px to preserve tap detection if (!floatMoved && Math.hypot(dx, dy) < 6) return; floatMoved = true; + // right = MARGIN - x → drag right (dx>0) should decrease right → x increases → x = ox + dx + // bottom = MARGIN - y → drag down (dy>0) should decrease bottom → y increases → y = oy + dy const raw = { - x: floatDragStart.ox - dx, // x increases toward left (away from right edge) - y: floatDragStart.oy - dy, // y increases toward top (away from bottom edge) + x: floatDragStart.ox + dx, + y: floatDragStart.oy + dy, }; audioStore.floatPos = clampFloatPos(raw.x, raw.y); } @@ -1274,15 +1276,18 @@ - - -