The width of the expanding element.
The height of the expanding element.
The scroll bounds of the containing element.
The dynamic sides to use (can restrict to only vertical or only horizontal sides).
The preference order for sides in case the expanding element fits in more than one direction.
Returns the name of the side to expand an element in given the dimensions of the element and the scroll bounds of its container. For example, can be used to decide which direction to extend a tooltip by providing the width and height of the tooltip and the scroll bounds of the container of the tooltip.
If there is one, the first side in the given
siderOrderin which the element fits entirely is selected. If the element does not fit entirely in any direction, the direction with the most space is selected.