Options (utils/dom)
@ckeditor/ckeditor5-utils/src/dom/position
interface
The getOptimalPosition()
helper options.
Filtering
Properties
-
element : HTMLElement
Element that is to be positioned.
-
fitInViewport : Boolean
When set, the algorithm will chose such a position which fits
element
the 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>
An array of functions which return
Position
relative to thetarget
, in the order of preference.Note: If a function returns
null
, it is ignored by thegetOptimalPosition()
. -
target : HTMLElement | Range | ClientRect | Rect | function
Target with respect to which the
element
is to be positioned.