Skip to main content

editor_target_at_pos

Function editor_target_at_pos 

Source
fn editor_target_at_pos<C: Canvas>(
    data: &Drawing<'_>,
    pos: Pos2,
    painter: &Style<'_, C>,
) -> bool
Expand description

Whether pos lands on any in-place-editor target — an editable label or a text box — regardless of whether that target is currently editable. Used to tell an uneditable target (e.g. a locked block’s type) from empty canvas so a double-click on it is consumed rather than treated as a fit-to-view.