DomOptimalPositionOptions
The getOptimalPosition() helper options.
Properties
element : HTMLElementreadonlymodule:utils/dom/position~DomOptimalPositionOptions#elementElement that is to be positioned.
fitInViewport : boolean | undefinedreadonlymodule:utils/dom/position~DomOptimalPositionOptions#fitInViewportWhen set, the algorithm will chose such a position which fits
elementthe most inside visible viewport.limiter : null | RectSource | () => ( RectSource | null ) | undefinedreadonlymodule:utils/dom/position~DomOptimalPositionOptions#limiterWhen set, the algorithm will chose position which fits the most in the limiter's bounding rect.
positions : readonly Array<PositioningFunction>readonlymodule:utils/dom/position~DomOptimalPositionOptions#positionsAn array of positioning functions.
Note: Positioning functions are processed in the order of preference. The first function that works in the current environment (e.g. offers the complete fit in the viewport geometry) will be picked by
getOptimalPosition().Note: Any positioning function returning
nullis ignored.target : RectSource | () => RectSourcereadonlymodule:utils/dom/position~DomOptimalPositionOptions#targetTarget with respect to which the
elementis to be positioned.viewportOffsetConfig : object | undefinedreadonlymodule:utils/dom/position~DomOptimalPositionOptions#viewportOffsetConfigViewport offset config object. It restricts the visible viewport available to the
getOptimalPosition()from each side.{ top: 50, right: 50, bottom: 50, left: 50 }Copy code