[−][src]Function nannou::ui::prelude::text::cursor::closest_cursor_index_and_xy
pub fn closest_cursor_index_and_xy<'a, I>(
xy: [f64; 2],
xys_per_line: I
) -> Option<(Index, [f64; 2])> where
I: Iterator<Item = (Xs<'a, 'a>, Range)>,
Find the closest cursor index to the given xy
position, and the center Point
of that
cursor.
Returns None
if the given text
is empty.