Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LinqScrollIndicatorDirective

Implements

  • OnDestroy

Index

Constructors

  • Parameters

    • hostElement: ElementRef<any>

    Returns LinqScrollIndicatorDirective

Properties

delay: number = 200
observer: MutationObserver
resizeSub: Subscription
scrollSub: Subscription

Methods

  • checkScrollRequirement(): void
  • The function checks if the element requires a scroll bar and if so, it will manage the scroll event. If the element does not require a scroll bar, the scroll event will be unsubscribed.

    Returns void

  • manageElementScroll(): void
  • The function manages the scroll event on the host element. When the user scrolls, the function will check if the user has scrolled to the top or bottom of the element. If the user has scrolled to the top, the top scroll indicator will be removed. If the user has scrolled to the bottom, the bottom scroll indicator will be removed.

    Returns void

  • mutationObserver(): void
  • The function observes the host element for changes. When the host element changes, check if the element requires a scroll bar.

    Returns void

  • ngOnDestroy(): void
  • Returns void

  • requiresScroll(nativeElement: any): boolean
  • The function checks if the element requires a scroll bar by checking if the scrollWidth or scrollHeight is greater than the clientWidth or clientHeight.

    Parameters

    • nativeElement: any

    Returns boolean

    boolean

Generated using TypeDoc