fix: prevent image collapse in beautify preview when frame or watermark is active

The image element used flex: 1 1 0 (basis 0) inside the inline-flex
preview wrapper, causing it to collapse to zero height whenever a
device frame or watermark overlay was present. Changed to flex: 0 1 auto
so the image uses its intrinsic height and can shrink if needed.

Added regression e2e tests verifying every preset keeps the image
visible, and that adding a watermark does not collapse the image
regardless of whether a frame is active.
This commit is contained in:
SnapOtter
2026-05-13 11:23:54 +08:00
parent 48b795d073
commit 3c3682661e
2 changed files with 93 additions and 3 deletions
@@ -285,7 +285,7 @@ export function ImageViewer({
imageWrapperChildren
? {
display: "block",
flex: "1 1 0",
flex: "0 1 auto",
minHeight: 0,
maxWidth: "100%",
objectFit: "contain" as const,