For functions in this module, "start" and "end" should be interpreted as follows:
in the vertical direction, "start" means "top" and "end" means "bottom"
in the horizontal direction, "start" means "left" and "end" means "right"
For instance, for scroll_to_position Horizontal, scroll_region_start is the left position of the scroll region and elem_start is the left position of the element.
val scroll_into_region :
?in_:Scroll_region.t->Dir.t->start_margin:float ->end_margin:float ->scroll_region_start:float ->scroll_region_end:float ->elem_start:float ->elem_end:float ->Scroll_result.t
scroll_into_region scrolls the element with position from elem_start to elem_end into the scroll region as specified by scroll_region_start and scroll_region_end, with additional margins of start_margin and end_margin respectively.
scroll_to_position scrolls the element with position from elem_start to elem_end to the given position relative to the start of the scroll region as specified by scroll_region_start.
In cases where it is not possible to scroll the element to the specified position (e.g scrolling an element at the bottom of the page to the top of the viewport), the element is scrolled as close as possible to the given position.
is_in_region checks if the element with position from elem_start to elem_end is within the boundaries of the scroll region as specified by scroll_region_start and scroll_region_end plus a margin of start_margin or end_margin respectively.
val get_position : scroll_region_start:float ->elem_start:float -> float
get_position returns the position of the element with start position elem_start relative to the start of the scroll region as specified by scroll_region_start