diff options
| author | Mistivia <i@mistivia.com> | 2025-02-09 16:33:44 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-02-09 16:33:44 +0800 |
| commit | de8814ced2e1624d3b87423a6ac971c12f117921 (patch) | |
| tree | 7ee681d781496898f3859774b36c96ceb0f12675 /src/components/CardThumb.svelte | |
| parent | 0a6ed62a3127773acfb1534248edd5a5613aaed0 (diff) | |
support custom card order
Diffstat (limited to 'src/components/CardThumb.svelte')
| -rw-r--r-- | src/components/CardThumb.svelte | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/CardThumb.svelte b/src/components/CardThumb.svelte index be6af81..2f722a9 100644 --- a/src/components/CardThumb.svelte +++ b/src/components/CardThumb.svelte @@ -3,20 +3,21 @@ import {setLeftPanelCard} from '../control/left_panel'; import { cardImageUrl } from '../utils'; - let {id, area} = $props(); + let {id, area, idx} = $props(); function onhover() { setLeftPanelCard(id); } function onDragStart(e) { - e.dataTransfer.setData('text', JSON.stringify({id, area})) + e.dataTransfer.setData('text', JSON.stringify({id, area, idx})) } </script> {#if id} <img + style="margin:2px;" draggable="true" onmouseover={onhover} onfocus={onhover} |
