Skip to main content

Module safe_hover

Module safe_hover 

Source
Expand description

Deterministic “safe hover” corridor helpers for nested menus.

This is inspired by Floating UI’s safePolygon idea, but intentionally kept simple and deterministic: we provide a geometry-only corridor test (no velocity/intention heuristics).

Typical use: keep a submenu open while the pointer moves diagonally from the submenu trigger into the submenu panel.

Functions§

safe_hover_contains
Returns true if point lies within the “safe hover” corridor between reference and floating.