Last change
on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.5 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 | */
|
---|
8 | import { NgZone } from '@angular/core';
|
---|
9 | import { ScrollStrategy } from './scroll-strategy';
|
---|
10 | import { OverlayReference } from '../overlay-reference';
|
---|
11 | import { ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';
|
---|
12 | /**
|
---|
13 | * Config options for the CloseScrollStrategy.
|
---|
14 | */
|
---|
15 | export interface CloseScrollStrategyConfig {
|
---|
16 | /** Amount of pixels the user has to scroll before the overlay is closed. */
|
---|
17 | threshold?: number;
|
---|
18 | }
|
---|
19 | /**
|
---|
20 | * Strategy that will close the overlay as soon as the user starts scrolling.
|
---|
21 | */
|
---|
22 | export declare class CloseScrollStrategy implements ScrollStrategy {
|
---|
23 | private _scrollDispatcher;
|
---|
24 | private _ngZone;
|
---|
25 | private _viewportRuler;
|
---|
26 | private _config?;
|
---|
27 | private _scrollSubscription;
|
---|
28 | private _overlayRef;
|
---|
29 | private _initialScrollPosition;
|
---|
30 | constructor(_scrollDispatcher: ScrollDispatcher, _ngZone: NgZone, _viewportRuler: ViewportRuler, _config?: CloseScrollStrategyConfig | undefined);
|
---|
31 | /** Attaches this scroll strategy to an overlay. */
|
---|
32 | attach(overlayRef: OverlayReference): void;
|
---|
33 | /** Enables the closing of the attached overlay on scroll. */
|
---|
34 | enable(): void;
|
---|
35 | /** Disables the closing the attached overlay on scroll. */
|
---|
36 | disable(): void;
|
---|
37 | detach(): void;
|
---|
38 | /** Detaches the overlay ref and disables the scroll strategy. */
|
---|
39 | private _detach;
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.