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 { PositionStrategy } from './position-strategy';
|
---|
9 | import { OverlayReference } from '../overlay-reference';
|
---|
10 | /**
|
---|
11 | * A strategy for positioning overlays. Using this strategy, an overlay is given an
|
---|
12 | * explicit position relative to the browser's viewport. We use flexbox, instead of
|
---|
13 | * transforms, in order to avoid issues with subpixel rendering which can cause the
|
---|
14 | * element to become blurry.
|
---|
15 | */
|
---|
16 | export declare class GlobalPositionStrategy implements PositionStrategy {
|
---|
17 | /** The overlay to which this strategy is attached. */
|
---|
18 | private _overlayRef;
|
---|
19 | private _cssPosition;
|
---|
20 | private _topOffset;
|
---|
21 | private _bottomOffset;
|
---|
22 | private _leftOffset;
|
---|
23 | private _rightOffset;
|
---|
24 | private _alignItems;
|
---|
25 | private _justifyContent;
|
---|
26 | private _width;
|
---|
27 | private _height;
|
---|
28 | private _isDisposed;
|
---|
29 | attach(overlayRef: OverlayReference): void;
|
---|
30 | /**
|
---|
31 | * Sets the top position of the overlay. Clears any previously set vertical position.
|
---|
32 | * @param value New top offset.
|
---|
33 | */
|
---|
34 | top(value?: string): this;
|
---|
35 | /**
|
---|
36 | * Sets the left position of the overlay. Clears any previously set horizontal position.
|
---|
37 | * @param value New left offset.
|
---|
38 | */
|
---|
39 | left(value?: string): this;
|
---|
40 | /**
|
---|
41 | * Sets the bottom position of the overlay. Clears any previously set vertical position.
|
---|
42 | * @param value New bottom offset.
|
---|
43 | */
|
---|
44 | bottom(value?: string): this;
|
---|
45 | /**
|
---|
46 | * Sets the right position of the overlay. Clears any previously set horizontal position.
|
---|
47 | * @param value New right offset.
|
---|
48 | */
|
---|
49 | right(value?: string): this;
|
---|
50 | /**
|
---|
51 | * Sets the overlay width and clears any previously set width.
|
---|
52 | * @param value New width for the overlay
|
---|
53 | * @deprecated Pass the `width` through the `OverlayConfig`.
|
---|
54 | * @breaking-change 8.0.0
|
---|
55 | */
|
---|
56 | width(value?: string): this;
|
---|
57 | /**
|
---|
58 | * Sets the overlay height and clears any previously set height.
|
---|
59 | * @param value New height for the overlay
|
---|
60 | * @deprecated Pass the `height` through the `OverlayConfig`.
|
---|
61 | * @breaking-change 8.0.0
|
---|
62 | */
|
---|
63 | height(value?: string): this;
|
---|
64 | /**
|
---|
65 | * Centers the overlay horizontally with an optional offset.
|
---|
66 | * Clears any previously set horizontal position.
|
---|
67 | *
|
---|
68 | * @param offset Overlay offset from the horizontal center.
|
---|
69 | */
|
---|
70 | centerHorizontally(offset?: string): this;
|
---|
71 | /**
|
---|
72 | * Centers the overlay vertically with an optional offset.
|
---|
73 | * Clears any previously set vertical position.
|
---|
74 | *
|
---|
75 | * @param offset Overlay offset from the vertical center.
|
---|
76 | */
|
---|
77 | centerVertically(offset?: string): this;
|
---|
78 | /**
|
---|
79 | * Apply the position to the element.
|
---|
80 | * @docs-private
|
---|
81 | */
|
---|
82 | apply(): void;
|
---|
83 | /**
|
---|
84 | * Cleans up the DOM changes from the position strategy.
|
---|
85 | * @docs-private
|
---|
86 | */
|
---|
87 | dispose(): void;
|
---|
88 | }
|
---|