mirror of
https://github.com/penpot/penpot.git
synced 2026-10-28 21:40:34 +00:00
With the mod key, resizing a shape with an image fill crops it: the shape is a window over a picture that keeps its size and position. When the dragged edge crossed the opposite one, the crop mode turned off and a normal resize with a negative scale flipped the shape. The image transform is relative to the shape, so the picture was mirrored and shrank a bit more on every crossing until it disappeared. Keep the crop mode when the edge crosses: the window moves to the other side of the fixed edge without flipping, the part outside the picture shows empty, and moving the window back shows the picture again. The crop math lives in app.common.geom.image-crop and replaces the image transform code that was duplicated for fills and fill-image. Closes #12349 AI-assisted-by: claude-opus-5-5