Options
All
  • Public
  • Public/Protected
  • All
Menu

Content scroller. This object is responsible for scrolling the GUI tree.

Hierarchy

  • Scroller

Index

Constructors

constructor

  • new Scroller(el: HTMLElement): Scroller

Properties

Private _events

_events: Subject<ScrollEvent> = new Subject()

Private el

el: HTMLElement

The DOM element responsible for scrolling.

events

events: Observable<ScrollEvent> = this._events.asObservable()

This is where you can listen to scrolling events.

Accessors

scrollLeft

  • get scrollLeft(): number

scrollTop

  • get scrollTop(): number

Methods

coerceHeight

  • coerceHeight(height: number): void
  • Coerce this scroller to a specific height in pixels.

    Parameters

    • height: number

      The height to which to coerce.

    Returns void

getBoundingClientRect

  • getBoundingClientRect(): ClientRect

isPointInside

  • isPointInside(x: number, y: number): boolean
  • Determine whether a point is inside the DOM element managed by this scroller.

    Parameters

    • x: number
    • y: number

    Returns boolean

scrollIntoView

  • scrollIntoView(left: number, top: number, right: number, bottom: number): void
  • Scrolls the window and scroller so that the rectangle is visible to the user. The rectangle coordinates must be relative to the scroller element.

    This method tries to be the least disruptive it can: it will adjust the scroller and the window just enough to show the rectangle.

    Parameters

    • left: number
    • top: number
    • right: number
    • bottom: number

    Returns void

scrollTo

  • scrollTo(left: number, top: number): void

Generated using TypeDoc