Skip to main content

boundary_seeds

Function boundary_seeds 

Source
fn boundary_seeds(
    geometry: &RouteGeometry,
    edge: &RouteEdge,
) -> Option<(Pos2, Pos2)>
Expand description

Seed positions for an edge drag’s two boundary waypoints, or None when the edge can’t host them. Every waypoint a drag adds must sit at least one cell from either route anchor (one on an anchor would overlap the pin), so an edge end that lands on an anchor — a straight pin-to-pin segment — is pulled one cell inward along the edge. A segment shorter than three cells leaves no room for two such waypoints and is not editable. An interior edge’s ends are existing corners, already clear of the anchors, and are used unchanged.