Skip to main content

ratio_from_pointer

Function ratio_from_pointer 

pub fn ratio_from_pointer(splitter: &SplitterLayout, pointer: [f32; 2]) -> f32
Expand description

Turns a pointer position on a splitter into the ratio it implies.

Lives next to DockTree::set_ratio so the geometry the layout used and the geometry the drag inverts cannot drift apart.