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