UNPKG

2.17 kBSource Map (JSON)View Raw
1{"version":3,"sources":["core/overlay/overlay-ref.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IACE,oBACY,WAAuB,EACvB,KAAkB,EAClB,MAAoB;QAFpB,gBAAW,GAAX,WAAW,CAAY;QACvB,UAAK,GAAL,KAAK,CAAa;QAClB,WAAM,GAAN,MAAM,CAAc;IAAI,CAAC;IAErC,2BAAM,GAAN,UAAO,MAAmB;QACxB,IAAI,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,cAAc,EAAE,CAAC;QAEtB,MAAM,CAAC,YAAY,CAAC;IACtB,CAAC;IAED,2BAAM,GAAN;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;IACnC,CAAC;IAED,4BAAO,GAAP;QACE,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,gCAAW,GAAX;QACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;IACxC,CAAC;IAED,oDAAoD;IACpD,6BAAQ,GAAR;QACE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,0EAA0E;IAC1E,mCAAc,GAAd;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACjC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAGH,iBAAC;AAAD,CAtCA,AAsCC,IAAA","file":"core/overlay/overlay-ref.js","sourcesContent":["import {PortalHost, Portal} from '../portal/portal';\nimport {OverlayState} from './overlay-state';\n\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nexport class OverlayRef implements PortalHost {\n constructor(\n private _portalHost: PortalHost,\n private _pane: HTMLElement,\n private _state: OverlayState) { }\n\n attach(portal: Portal<any>): any {\n let attachResult = this._portalHost.attach(portal);\n this.updatePosition();\n\n return attachResult;\n }\n\n detach(): Promise<any> {\n return this._portalHost.detach();\n }\n\n dispose(): void {\n this._portalHost.dispose();\n }\n\n hasAttached(): boolean {\n return this._portalHost.hasAttached();\n }\n\n /** Gets the current state config of the overlay. */\n getState() {\n return this._state;\n }\n\n /** Updates the position of the overlay based on the position strategy. */\n updatePosition() {\n if (this._state.positionStrategy) {\n this._state.positionStrategy.apply(this._pane);\n }\n }\n\n // TODO(jelbourn): add additional methods for manipulating the overlay.\n}\n"],"sourceRoot":"/source/"}
\No newline at end of file