Skip to main content

focus_directional

Function focus_directional 

Source
pub fn focus_directional(
    tree: &PaneTree,
    layout: &PaneLayout,
    active: PaneId,
    direction: PaneCardinalDirection,
) -> Option<PaneId>
Expand description

The nearest leaf to active in a cardinal direction, using solved geometry.

Tie-break order (all deterministic): smallest primary-axis center distance, then largest perpendicular overlap, then earliest focus_order index. Returns None when no leaf lies in the direction.