Skip to main content

hit_text_anchor

Function hit_text_anchor 

Source
pub fn hit_text_anchor<R: Renderer>(
    name: &str,
    labels: &[(RouteLabelId, FracVal)],
    geometry: &RouteGeometry,
    hover_pos: Pos2,
    painter: &Style<'_, R>,
) -> Option<RouteLabelId>
Expand description

The label whose drawn box contains hover_pos. name is the wire’s own name — an unnamed wire measures its faint placeholder instead, so the prompt stays clickable (matching what the renderer draws there).