Hierarchy

  • BoundPosition

Methods

  • Parameters

    • elementBounds: DOMRect
    • testAgainstElementBounds: DOMRect

    Returns OutOfBoundaries

  • Method that could be used to get a Recommended position from an element if it is ouside of boudaries of a given testAgainstElement

    Returns

    Suggested position (Based on GlobalEnum.Position)

    Parameters

    • element: HTMLElement

      Element to check if is outside of boundaries

    • testAgainstElement: HTMLElement = document.body

      Element where the boundaries will be tested

    • elementOffset: number | OffsetValues = ...

      Element Offset values to ba take in consideration

    Returns string

  • Method that could be used on cases where we do not have the right values from the getBoundingClientRect() method - Example when the item is with height 0(zero) and we know the value height to be tested!

    Returns

    Suggested position (Based on GlobalEnum.Position)

    Parameters

    • elementBounds: DOMRect

      Element Bounds values to test against

    • testAgainstElementBounds: DOMRect

      Element bounds values that will be tested against

    Returns string

  • Method that can be used to test if a given element is outside of a testAgainstElement boudaries

    Returns

    Parameters

    • element: HTMLElement

      Element to check if is outside of boundaries

    • testAgainstElement: HTMLElement = document.body

      Element where the boundaries will be tested

    • elementOffset: number | OffsetValues = ...

      Element Offset values to be taken in consideration

    Returns OutOfBoundaries

Constructors