Add drag-to-reposition for the fixed 3:2 crop
Docker / build-and-push (push) Successful in 4m29s

Same fix as latent: the photo area always cover-crops to 3:2 and always
centered, with no way to choose what got cut off. Crop position is now a
normalized 0-1 offset per axis, adjustable by dragging directly on the
canvas whenever the photo's aspect actually leaves slack to pan within.
Pointer movement converts to original-photo pixels via canvas-width/
display-width and outW/cropW (postcard downscales through outW before
compositing, unlike latent's more direct pipeline), so it stays 1:1
regardless of the maxDim downscale or CSS scaling. Resets to centered on
a new photo upload. Verified with a real drag test using far-edge
markers: dragging left/right correctly reveals the opposite edge's
marker in both directions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Fredrik Johansson
2026-08-07 17:33:58 +02:00
co-authored by Claude Sonnet 5
parent 8452f320ea
commit 1eb0467b76
3 changed files with 94 additions and 2 deletions
+1
View File
@@ -32,6 +32,7 @@
<div class="canvas-wrap">
<canvas id="canvas"></canvas>
</div>
<p class="pan-hint" id="pan-hint" hidden>Drag the photo to reposition the crop</p>
<div class="controls">
<div class="control-group">