Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "logic"

Index

Functions

frozenDelta

  • frozenDelta(current: number[], target: number[]): object
  • Parameters

    • current: number[]
    • target: number[]

    Returns object

nonUniformContext

  • nonUniformContext(rowHeights: object, defaultRowHeight?: number, rowPadding?: number | function): IExceptionContext
  • creates a non uniform context based on the given array like heights

    Parameters

    • rowHeights: object

      arrayish to get the heights

    • Default value defaultRowHeight: number = NaN

      if not given the most frequent value will be used

    • Default value rowPadding: number | function = 0

      padding between rows

    Returns IExceptionContext

randomContext

  • randomContext(numberOfRows: number, defaultRowHeight: number, minRowHeight?: number, maxRowHeight?: number, ratio?: number, seed?: number): IExceptionContext
  • creates a random context with the given constraints

    Parameters

    • numberOfRows: number
    • defaultRowHeight: number
    • Default value minRowHeight: number = 2
    • Default value maxRowHeight: number = defaultRowHeight * 10
    • Default value ratio: number = 0.2

      around ratio percent will get a non uniform height

    • Default value seed: number = Date.now()

      random seed

    Returns IExceptionContext

range

  • computes the visible range

    Parameters

    • scrollTop: number

      top scrolling

    • clientHeight: number

      visible height

    • rowHeight: number

      height of a row by default

    • heightExceptions: IRowHeightException[]

      exceptions of this default height

    • numberOfRows: number

      the number of rows

    Returns IVisibleRange

    the computed visible range

uniformContext

  • uniformContext(numberOfRows: number, rowHeight: number, rowPadding?: number): IExceptionContext
  • creates a uniform exception context, i.e no exceptions all rows are of the same height

    Parameters

    • numberOfRows: number
    • rowHeight: number
    • Default value rowPadding: number = 0

      padding between rows

    Returns IExceptionContext

updateFrozen

  • updateFrozen(old: number[], columns: object[], first: number): object
  • Parameters

    • old: number[]
    • columns: object[]
    • first: number

    Returns object