The resize delta a shape+mode commits to for the accumulated raw_delta,
computed from immutable reads only (so it can run before a mutable apply, as
DragStopped needs). The pipeline: constrain_resize_delta β clamp_to_min_height β clamp_to_min_width β clamp_to_widest β contain-icon, and for a free image/icon β aspect snap β contain β edge magnetism β contain. Both the drag preview and the drop apply this, so they
agree. An icon is re-contained after every snap, so containment always wins.
Smallest width a block or a text box may be resized to: 4 grid cells. Ports,
areas, images, and icons are exempt (they may be narrower) β see
min_resize_size.
Clamp the y-component of a resize delta so the block cannot shrink below
min_height. Which edge moves (and therefore the sign of the constraint)
depends on the resize mode.
Clamp the x-component of a resize delta so the block cannot shrink below
min_width. Which edge moves (and therefore the sign of the constraint)
depends on the resize mode.
The icon a resized block carries, and the offset to preview it at: exactly
where the drop puts it (see icon_rect_after_resize), so the icon tracks
the block through the drag instead of jumping into place on release.
The intrinsic aspect ratio (w/h) of an image or icon shape, or None for
other shapes or an image the painter canβt resolve. Drives the aspect-lock
resize snap.
Minimum height a resize may shrink shape to. For a child block this is a
valid block height: at least PIN_PITCH (a single pin slot), and tall enough
to hold its pins. The pins can slide up into the top margin as the block
shrinks (the resize emitter rides them up, see
crate::edit::geometry::resize), so the pin floor is set by their
span β the slots between the highest and lowest pin β giving
PIN_PITCH * (span + 1). Non-blocks keep the bare pin floor (0.0 when they
have none).
The size floor a resize of shape must respect: its own minimum (see
min_block_width and min_block_height) grown to hold its icon, since a
block never shrinks smaller than the artwork it carries. The iconβs extent is
raised to the lattice the drop snaps to, or the snap would round back through
it.