Skip to main content

default_port_rect

Function default_port_rect 

Source
pub(crate) fn default_port_rect(
    rect: GridRect,
    siblings: &[GridRect],
    name: &str,
    slot: PinSlot,
) -> GridRect
Expand description

Where a stamped pin’s port body sits inside its owner’s own interior view: the owner’s rect magnified by DEFAULT_SCALE_FOR_NEW_VIEW so the expanded view has room for child blocks, the body hugging the edge its slot sits on and tracking the slot down that edge. A body landing on an existing one steps outward by its own width until clear — bounded, so a pathological interior cannot spin.

Shared with the port emitters, which reconstruct the same placement for a pin whose file omitted it.