Skip to main content

editor_at_pos

Function editor_at_pos 

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

The text editor a double-click at pos should open, if it landed on an editable label: a title, block tag, pin name/type/tag, route label, or a text box. Shared by every selecting tool so a double-click always opens the right editor regardless of what is currently selected — including committing one in-place edit and handing straight off to another thing double-clicked.