This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses
this function will then iterate in both directions over this sorted list to find all visible items.
Param: orderedItems
Items ordered by start.
Param: comparator
1 is lower, 0 is equal, 1 is higher.
Param: field
Property name on an item (That is item[field]).
Param: field2
Second property name on an item (That is item[field][field2]).
Returns
Index of the found item or -1 if nothing was found.
This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses this function will then iterate in both directions over this sorted list to find all visible items.
Param: orderedItems
Items ordered by start.
Param: comparator
1 is lower, 0 is equal, 1 is higher.
Param: field
Property name on an item (That is item[field]).
Param: field2
Second property name on an item (That is item[field][field2]).
Returns
Index of the found item or -1 if nothing was found.