recursiveScroll
scroll
scrollstart
scrollstop
setCurrentFocus
stop
  • Tries to find a node which can be scrolled either x pixels to the right or y pixels down among the Elements in {nodes} and children of these Elements.

    This function used to be recursive but isn't anymore due to various attempts at optimizing the function in order to reduce GC pressure.

    Parameters

    • xDistance: number
    • yDistance: number
    • Optionalnode: Element
    • generation: number = scrollGeneration

    Returns Promise<boolean>

  • Tries to scroll e by x and y pixels, with infinities representing the edges. Make the smooth scrolling animation last duration milliseconds.

    Parameters

    • xDistance: number = 0
    • yDistance: number = 0
    • e: Node
    • Optionalduration: number
    • generation: number = scrollGeneration

    Returns Promise<boolean>

  • Scroll continuously until scrollstop is called. Pass an x and y velocity, or just a y velocity. If only a single arg is passed, it will be treated as y (vertical scroll). Can also pass a multiplier, intented to be used as a numeric arg when :scrollstart is bound to a key.

    Velocity unit = px/second

    Parameters

    • aVelocity: any
    • bVelocity: any
    • mult: any

    Returns void