Esempio n. 1
0
  /**
   * Creates an overlay state from a dialog config.
   * @param dialogConfig The dialog configuration.
   * @returns The overlay configuration.
   */
  private _getOverlayState(dialogConfig: MdDialogConfig): OverlayState {
    let state = new OverlayState();

    state.positionStrategy = this._overlay.position()
        .global()
        .centerHorizontally()
        .centerVertically();

    return state;
  }
Esempio n. 2
0
 /**
  * Creates the overlay into which the dialog will be loaded.
  * @param dialogConfig The dialog configuration.
  * @returns A promise resolving to the OverlayRef for the created overlay.
  */
 private _createOverlay(dialogConfig: MdDialogConfig): Promise<OverlayRef> {
   let overlayState = this._getOverlayState(dialogConfig);
   return this._overlay.create(overlayState);
 }