Hex Core JS
    Preparing search index...

    Function getVerticalPositionAdjustment

    • Calculates the vertical adjustment needed to best fit an element within a set of scroll bounds. Returns the number of pixels the element should be adjusted by.

      Meant for elements that are positioned relative to a container. For example a tooltip or button confirmation box.

      Parameters

      • height: number

        The height of the element in pixels.

      • containerHeight: number

        The height of the element's container in pixels.

      • scrollBounds: ScrollBoundaryStats

        The scroll bounds around the container.

      Returns number