elementRect : Rect
The rect of the element to be positioned.
targetRect : Rect
The rect of the target the element (its rect) is relatively positioned to.
viewportRect : Rect
The rect of the visual browser viewport.
Object | null
return When the function returns
null, it will not be considered by
topvalue of the element rect that would represent the position.
leftvalue of the element rect that would represent the position.
return.name The name of the position. It helps the user of the
getOptimalPositionhelper to recognize different positioning function results. It will pass through to the
Positionreturned by the helper.
[return.config] An optional configuration that will pass-through the
getOptimalPositionhelper to the
Positionreturned by this helper. This configuration may, for instance, let the user of
getOptimalPositionknow that this particular position comes with a certain presentation.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.