* Creates an overlay config from a dialog config. * @param config The dialog configuration. * @returns The overlay configuration.
(config: DialogConfig<D, R>)
| 204 | * @returns The overlay configuration. |
| 205 | */ |
| 206 | private _getOverlayConfig<D, R>(config: DialogConfig<D, R>): OverlayConfig { |
| 207 | const state = new OverlayConfig({ |
| 208 | positionStrategy: |
| 209 | config.positionStrategy || |
| 210 | createGlobalPositionStrategy(this._injector).centerHorizontally().centerVertically(), |
| 211 | scrollStrategy: config.scrollStrategy || this._scrollStrategy(), |
| 212 | panelClass: config.panelClass, |
| 213 | hasBackdrop: config.hasBackdrop, |
| 214 | direction: config.direction, |
| 215 | minWidth: config.minWidth, |
| 216 | minHeight: config.minHeight, |
| 217 | maxWidth: config.maxWidth, |
| 218 | maxHeight: config.maxHeight, |
| 219 | width: config.width, |
| 220 | height: config.height, |
| 221 | disposeOnNavigation: config.closeOnNavigation, |
| 222 | disableAnimations: config.disableAnimations, |
| 223 | }); |
| 224 | |
| 225 | if (config.backdropClass) { |
| 226 | state.backdropClass = config.backdropClass; |
| 227 | } |
| 228 | |
| 229 | return state; |
| 230 | } |
| 231 | |
| 232 | /** |
| 233 | * Attaches a dialog container to a dialog's already-created overlay. |
no test coverage detected