web: a wall frame keeps the crop that was applied

CROP + APPLY then a wall frame handed back the whole photo: the crop block
was skipped outright for both walls, so the artwork hung the original. The
walls' own opening still ignores the aspect chip — that is what the
exclusion was for — but the visitor's crop is theirs to keep.

Measured with a source banded red on top and blue below, cut away by a
16:9 crop: through WALL FRAME and WALL FRAME LANDSCAPE the bands used to
come back (569k and 350k red pixels); both now export clean.
This commit is contained in:
2026-09-22 10:31:27 +07:00
parent 711e2fc5d6
commit b394bad09e
+4 -1
View File
@@ -279,7 +279,10 @@ export async function renderPhoto(input: RenderInput): Promise<RenderResult | nu
const aspectWH = options?.aspect && options.aspect !== 'full' ? ASPECT_RATIO_W_H[options.aspect] : null;
const cropRect = options?.cropRect ?? null;
const ratioWH = cropRect ? null : options?.cropWH ?? aspectWH;
if ((cropRect || ratioWH) && !isWallframe(frameId)) {
// A wall is an artwork with its own opening, so the aspect chip (ratioWH)
// has nothing to say there — but the visitor's own crop does, or a photo
// that was cropped and applied comes back whole behind the frame.
if (cropRect || (ratioWH && !isWallframe(frameId))) {
const curAspect = width / height;
let cropW = width;
let cropH = height;