source: trip-planner-front/node_modules/@angular/cdk/scrolling/viewport-ruler.d.ts@ 6a80231

Last change on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { Platform } from '@angular/cdk/platform';
9import { NgZone, OnDestroy } from '@angular/core';
10import { Observable } from 'rxjs';
11/** Time in ms to throttle the resize events by default. */
12import * as ɵngcc0 from '@angular/core';
13export declare const DEFAULT_RESIZE_TIME = 20;
14/** Object that holds the scroll position of the viewport in each direction. */
15export interface ViewportScrollPosition {
16 top: number;
17 left: number;
18}
19/**
20 * Simple utility for getting the bounds of the browser viewport.
21 * @docs-private
22 */
23export declare class ViewportRuler implements OnDestroy {
24 private _platform;
25 /** Cached viewport dimensions. */
26 private _viewportSize;
27 /** Stream of viewport change events. */
28 private readonly _change;
29 /** Event listener that will be used to handle the viewport change events. */
30 private _changeListener;
31 /** Used to reference correct document/window */
32 protected _document: Document;
33 constructor(_platform: Platform, ngZone: NgZone, document: any);
34 ngOnDestroy(): void;
35 /** Returns the viewport's width and height. */
36 getViewportSize(): Readonly<{
37 width: number;
38 height: number;
39 }>;
40 /** Gets a ClientRect for the viewport's bounds. */
41 getViewportRect(): ClientRect;
42 /** Gets the (top, left) scroll position of the viewport. */
43 getViewportScrollPosition(): ViewportScrollPosition;
44 /**
45 * Returns a stream that emits whenever the size of the viewport changes.
46 * This stream emits outside of the Angular zone.
47 * @param throttleTime Time in milliseconds to throttle the stream.
48 */
49 change(throttleTime?: number): Observable<Event>;
50 /** Use defaultView of injected document if available or fallback to global window reference */
51 private _getWindow;
52 /** Updates the cached viewport size. */
53 private _updateViewportSize;
54 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ViewportRuler, [null, null, { optional: true; }]>;
55}
56
57//# sourceMappingURL=viewport-ruler.d.ts.map
Note: See TracBrowser for help on using the repository browser.