drag drop pt. 4 grab handle

This commit is contained in:
2026-02-06 05:34:40 -08:00
parent de711b8c40
commit 692772cb14

View File

@@ -53,6 +53,7 @@
Trash2, Trash2,
Volume2, Volume2,
X, X,
GripVertical,
} from "@lucide/svelte"; } from "@lucide/svelte";
const iconClass = "icon-btn"; const iconClass = "icon-btn";
@@ -855,12 +856,21 @@
] ]
.filter(Boolean) .filter(Boolean)
.join(" ")} .join(" ")}
draggable="true"
ondragstart={(e) => onDragStart(item.track.id, e)}
ondragover={(e) => onDragOver(item.track.id, e)} ondragover={(e) => onDragOver(item.track.id, e)}
ondrop={(e) => onDrop(item.track.id, e)} ondrop={(e) => onDrop(item.track.id, e)}
ondragend={onDragEnd}
> >
<button
class="btn-icon"
type="button"
draggable="true"
aria-label="Reorder"
title="Drag to reorder"
ondragstart={(e) => onDragStart(item.track.id, e)}
ondragend={onDragEnd}
>
<GripVertical class={iconClass} />
</button>
<button <button
class="min-w-0 flex-1 truncate text-left text-sm hover:underline" class="min-w-0 flex-1 truncate text-left text-sm hover:underline"
type="button" type="button"
@@ -1144,12 +1154,21 @@
] ]
.filter(Boolean) .filter(Boolean)
.join(" ")} .join(" ")}
draggable="true"
ondragstart={(e) => onDragStart(item.track.id, e)}
ondragover={(e) => onDragOver(item.track.id, e)} ondragover={(e) => onDragOver(item.track.id, e)}
ondrop={(e) => onDrop(item.track.id, e)} ondrop={(e) => onDrop(item.track.id, e)}
ondragend={onDragEnd}
> >
<button
class="btn-icon"
type="button"
draggable="true"
aria-label="Reorder"
title="Drag to reorder"
ondragstart={(e) => onDragStart(item.track.id, e)}
ondragend={onDragEnd}
>
<GripVertical class={iconClass} />
</button>
<button <button
class="min-w-0 flex-1 truncate text-left text-sm hover:underline" class="min-w-0 flex-1 truncate text-left text-sm hover:underline"
type="button" type="button"