Function getLogicalScrollLeft

  • The horizontal scroll position of an element as distance from the start (≥ 0): in left-to-right scrollLeft, in right-to-left -scrollLeft (browsers report 0 at the right start and negative values when scrolled to the left, CSSOM View).

    Parameters

    • element: {
          scrollLeft: number;
      }

      a scroll container

      • scrollLeft: number
    • rtl: boolean

      the container is right-to-left

    Returns number

    px from the start

    Example

    const fromStart = getLogicalScrollLeft(tableApi.getTableScope().scrollViewport, tableApi.getDirection() === "rtl");
    

    Since

    1.1.98