d59651a7b6409a77e697cfd1b91f5af7188298e0
[sdc/sdc-workflow-designer.git] /
1 /**
2  * @license
3  * Copyright Google Inc. 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 /* tslint:disable:array-type member-access variable-name typedef
9  only-arrow-functions directive-class-suffix component-class-suffix
10  component-selector*/
11 import {OverlayRef} from '../overlay-ref';
12
13 /**
14  * Describes a strategy that will be used by an overlay
15  * to handle scroll events while it is open.
16  */
17 export abstract class ScrollStrategy {
18   enable: () => void;
19   disable: () => void;
20   attach: (overlayRef: OverlayRef) => void;
21 }
22
23 /**
24  * Returns an error to be thrown when attempting to attach an already-attached
25  * scroll strategy.
26  */
27 export function getMdScrollStrategyAlreadyAttachedError(): Error {
28   return Error(`Scroll strategy has already been attached.`);
29 }