Files
figcraft/docs
Denis Gomes 435d85b8a4 M1: Crop mode crops by the layer's sides in auto layout, up to the image, and never runs with vector edit
In crop mode (Object > Crop image) the layer's sides and corners crop its
image through the Cmd/Ctrl resize: the canvas sends Cmd/Ctrl while crop
mode is on. Several things went wrong around that.

Auto layout. The Cmd/Ctrl crop left out any layer with auto layout on it
or an ancestor (#703), because the layout could recompute the box after
the drag and a crop worked out for the dragged size would stretch. An
image in an auto layout column was resized and squashed instead. The
exclusion is gone: the crop is worked out for the dragged box in the
preview and, once the layout has run, again from the snapshot for the
size it left (crop_to_the_laid_out_box). A resize already makes the
dragged axes Fixed; the layout may still move the layer, and the picture
moves with it, unstretched. Where the layout makes the layer longer than
it was dragged (a minimum width after the left side was dragged in), the
crop slides back along the image rather than past its edge.

Past the image. A side could be dragged beyond the image's edge, leaving
an empty strip inside the layer. While the box isn't flipped, its sides
now stop at the image's box (or where they started, if that was further
out: a Fit image is smaller than its layer). The box is drawn back towards
where it started, both ends of an axis by the same fraction, so an Alt
resize stays centred, and with Shift both axes by the same fraction, so
the ratio holds. A drag past the opposite side still flips as any resize
does (command_crop_keeps_image_placement_in_the_layers_axes pins that).

Ratio. A layer whose proportions are locked kept its ratio in crop mode
too, so dragging a side moved the opposite axis; the crop window now
ignores the lock and Shift keeps the ratio. The image's own corner
handles were the other way round from a resize: in proportion by
default, free with Shift. They now scale freely, in proportion with
Shift.

Vector edit. A double-click on the image enters vector edit mode, and
Object > Crop image could be chosen while vector edit was on, so both ran
at once. The injected Cmd/Ctrl then turned a drag of the layer's side
into the Bend tool (a curved edge), and a dragged top segment showed the
selected points' box, "804 x 0". Now image.crop ends vector edit, crop
mode ends when vector edit starts, the canvas injects Cmd/Ctrl only while
no points are being edited, and a double- or triple-click in crop mode
stays in crop mode. When the second press of that double-click began a
resize on a side of the layer, its release ends the resize.

command_resize_leaves_fills_when_text_or_auto_layout_recomputes_the_box
pinned the auto layout exclusion; its text case stays as
command_resize_leaves_a_texts_fills.
2026-11-19 16:41:09 -05:00
..