feat(preview): fanned deck of cards on multi-select
When `selection.ids.size >= 2`, the inline preview swaps the single- photo view for a SelectionDeck: each selected thumbnail renders as an absolutely-positioned card with a translate + rotate computed from its index in the deck, so the spread reads as a fan. CSS transition-transform handles the reflow as the deck grows or shrinks; `in:fly` lands new cards from above, `out:scale` shrinks removals into the stack. Hash resolution walks the existing TanStack caches (per-photo + photos-infinite envelope) so the deck is side-effect-free — no fetches just to render thumbs. Drop the now-redundant Maximize hover affordance on PhotoTile and the `onOpenPreview` plumbing through PhotoGrid / +page.svelte: single-click already places a tile into the inline preview pane, so the dedicated "open preview" button no longer has a job. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -81,13 +81,6 @@
|
||||
setFocused(uid);
|
||||
setAnchor(uid);
|
||||
}
|
||||
|
||||
function onOpenPreview(uid: string) {
|
||||
selection.ids.clear();
|
||||
selection.ids.add(uid);
|
||||
setFocused(uid);
|
||||
setAnchor(uid);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div data-photo-grid class="grid gap-2" style="grid-template-columns: {tracks};">
|
||||
@@ -99,7 +92,6 @@
|
||||
selected={sel}
|
||||
onClick={(e) => onClick(e, photo.UID)}
|
||||
onDblclick={(e) => onDblclick(e, photo.UID)}
|
||||
onOpenPreview={() => onOpenPreview(photo.UID)}
|
||||
/>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user