Contact Sheet Zoom
- group .........
- Galleries and grids
- source ........
- https://ui.aryank.space/components/contact-sheet-zoom
- markdown ......
- /lab/contact-sheet-zoom.md
- human .........
- /lab/contact-sheet-zoom
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
Twelve hundred thumbnails laid out as one contact sheet that explodes into a draggable wall. Zooming in does not scale the container: every tile measures its own offset from the centre of the frame, divides it by a hundred, and is pushed out along that vector by 1200 across and 600 down while scaling five times, so the sheet fans wider than it does tall in a way a plain container scale cannot produce. Dragging lerps the whole sheet toward a target at 0.075 a frame, so it keeps gliding after the pointer stops, and a transparent layer above the tiles owns the pointer so no individual image can start a native drag.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* The container never scales
Each tile is displaced along its own vector from the centre and scaled individually. Scaling the container instead would keep the grid rigid; this is what lets the sheet fan out.
* The spread is deliberately anisotropic
1200 across against 600 down. Equal multipliers would fan it uniformly; the mismatch is what makes it read as a wall you pan rather than a zoom.
* A transparent layer takes the drag
Tiles are pointer-events: none and a full-bleed layer is switched on only while zoomed. Without it, every one of the twelve hundred images would try to start a native image drag.