getOptimalPosition() helper options.
element : HTMLElement
Element that is to be positioned.
fitInViewport : Boolean
When set, the algorithm will chose such a position which fits
elementthe most inside visible viewport.
limiter : HTMLElement | Range | ClientRect | Rect | function
When set, the algorithm will chose position which fits the most in the limiter's bounding rect.
positions : Array.<Function>
target : HTMLElement | Range | ClientRect | Rect | function
Target with respect to which the
elementis to be positioned.