1 |
|
2 |
|
3 |
|
4 |
|
5 | export var OverlayRef = (function () {
|
6 | function OverlayRef(_portalHost, _pane, _state) {
|
7 | this._portalHost = _portalHost;
|
8 | this._pane = _pane;
|
9 | this._state = _state;
|
10 | }
|
11 | OverlayRef.prototype.attach = function (portal) {
|
12 | var attachResult = this._portalHost.attach(portal);
|
13 | this.updatePosition();
|
14 | return attachResult;
|
15 | };
|
16 | OverlayRef.prototype.detach = function () {
|
17 | return this._portalHost.detach();
|
18 | };
|
19 | OverlayRef.prototype.dispose = function () {
|
20 | this._portalHost.dispose();
|
21 | };
|
22 | OverlayRef.prototype.hasAttached = function () {
|
23 | return this._portalHost.hasAttached();
|
24 | };
|
25 |
|
26 | OverlayRef.prototype.getState = function () {
|
27 | return this._state;
|
28 | };
|
29 |
|
30 | OverlayRef.prototype.updatePosition = function () {
|
31 | if (this._state.positionStrategy) {
|
32 | this._state.positionStrategy.apply(this._pane);
|
33 | }
|
34 | };
|
35 | return OverlayRef;
|
36 | }());
|
37 |
|
38 |
|