[][src]Function nannou::text::cursor::closest_cursor_index_and_xy

pub fn closest_cursor_index_and_xy<'a, I>(
    xy: Point,
    xys_per_line: I
) -> Option<(Index, Point)> 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.