Fixed 'nearest point' check when hovering on a line.