Skip to main content

click_to_select

Function click_to_select 

Source
pub(crate) fn click_to_select(
    data: &Drawing<'_>,
    pos: Pos2,
    painter: &Style<'_, impl Renderer>,
) -> Option<Transition>
Expand description

Resolve a left-click at pos to the tool that selects whatever is under it: a route, a child-block pin, or a shape (block / port / area / image / text). Returns None when nothing selectable is there — empty canvas, or a route label (left for the double-click rename). Shared by every selecting tool so a click always lands on the clicked object, even when something else is already selected.