1 | import { PositionStrategy } from './position-strategy';
|
2 | /**
|
3 | * A strategy for positioning overlays. Using this strategy, an overlay is given an
|
4 | * explicit position relative to the browser's viewport.
|
5 | */
|
6 | export declare class GlobalPositionStrategy implements PositionStrategy {
|
7 | private _cssPosition;
|
8 | private _top;
|
9 | private _bottom;
|
10 | private _left;
|
11 | private _right;
|
12 | /** Array of individual applications of translateX(). Currently only for centering. */
|
13 | private _translateX;
|
14 | /** Array of individual applications of translateY(). Currently only for centering. */
|
15 | private _translateY;
|
16 | /** Sets the element to usee CSS position: fixed */
|
17 | fixed(): this;
|
18 | /** Sets the element to usee CSS position: absolute. This is the default. */
|
19 | absolute(): this;
|
20 | /** Sets the top position of the overlay. Clears any previously set vertical position. */
|
21 | top(value: string): this;
|
22 | /** Sets the left position of the overlay. Clears any previously set horizontal position. */
|
23 | left(value: string): this;
|
24 | /** Sets the bottom position of the overlay. Clears any previously set vertical position. */
|
25 | bottom(value: string): this;
|
26 | /** Sets the right position of the overlay. Clears any previously set horizontal position. */
|
27 | right(value: string): this;
|
28 | /**
|
29 | * Centers the overlay horizontally with an optional offset.
|
30 | * Clears any previously set horizontal position.
|
31 | */
|
32 | centerHorizontally(offset?: string): this;
|
33 | /**
|
34 | * Centers the overlay vertically with an optional offset.
|
35 | * Clears any previously set vertical position.
|
36 | */
|
37 | centerVertically(offset?: string): this;
|
38 | /**
|
39 | * Apply the position to the element.
|
40 | * TODO: internal
|
41 | */
|
42 | apply(element: HTMLElement): Promise<void>;
|
43 | /** Reduce a list of translate values to a string that can be used in the transform property */
|
44 | private _reduceTranslateValues(translateFn, values);
|
45 | }
|