Caplin Trader 5.1.0

Class: module:ct-dom/PositionUtility

module:ct-dom/PositionUtility()

new module:ct-dom/PositionUtility()

Methods

(static) positionElement(element, target, boundaryElementopt)

Positions an element relative to a target element.

The position strategy used is as follows:

If adequate space is available, the element is positioned so the top left corner of the element is adjacent to the bottom left corner of the target.

If there is inadequate vertical space, the element is positioned so that the bottom left corner is adjacent to the top left corner of the target.

If there is inadequate horizontal space, the element is shifted left to fit.

Parameters:
Name Type Attributes Description
element HTMLElement

The element to position.

target HTMLElement

Position relative to this element.

boundaryElement HTMLElement <optional>

Position to fit within this element.