UNPKG

igniteui-angular

Version:

Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps

45 lines (44 loc) 1.32 kB
import { IgxOverlayService } from '../overlay'; import { ScrollStrategy } from './scroll-strategy'; /** * Uses a tolerance and closes the shown component upon scrolling if the tolerance is exceeded */ export declare class CloseScrollStrategy extends ScrollStrategy { private _document; private _overlayService; private _id; private initialScrollTop; private initialScrollLeft; private _threshold; private _initialized; private _sourceElement; private _scrollContainer; private _overlayInfo; constructor(scrollContainer?: HTMLElement); /** * Initializes the strategy. Should be called once * * @param document reference to Document object. * @param overlayService IgxOverlay service to use in this strategy. * @param id Unique id for this strategy. * ```typescript * settings.scrollStrategy.initialize(document, overlay, id); * ``` */ initialize(document: Document, overlayService: IgxOverlayService, id: string): void; /** * Attaches the strategy * ```typescript * settings.scrollStrategy.attach(); * ``` */ attach(): void; /** * Detaches the strategy * ```typescript * settings.scrollStrategy.detach(); * ``` */ detach(): void; private onScroll; }