web: keep compare on offer, and compare at the cropped size

Choosing a crop ratio used to disable COMPARE outright, because the split
painted the whole original into a box that was now the crop's shape. The
original is now looked at through a window of the render's own shape: with a
crop applied the photo is scaled and slid by the crop rect so the same
rectangle lines up, and the split compares like with like.

The window needs the image free to overflow it, so the inline style lifts the
box clamp that .canvas-wrap img puts on every preview.
This commit is contained in:
2026-09-22 10:45:07 +07:00
parent b394bad09e
commit 1d96269139
3 changed files with 45 additions and 12 deletions
+3
View File
@@ -284,6 +284,9 @@ input[type="range"] { width: 100%; accent-color: var(--accent); }
cursor: ew-resize;
touch-action: none;
}
/* The window the original is looked at through: the render's own shape, so a
crop can slide and scale the photo behind it and still line up. */
.compare-window { position: absolute; inset: 0; overflow: hidden; }
.compare-orig { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: none; }
.compare-bar {
position: absolute;