MCPcopy Create free account
hub / github.com/angular/components / _getOverlayConfig

Method _getOverlayConfig

src/cdk/dialog/dialog.ts:206–230  ·  view source on GitHub ↗

* Creates an overlay config from a dialog config. * @param config The dialog configuration. * @returns The overlay configuration.

(config: DialogConfig<D, R>)

Source from the content-addressed store, hash-verified

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.

Callers 1

openMethod · 0.95

Calls 3

centerVerticallyMethod · 0.80
centerHorizontallyMethod · 0.80

Tested by

no test coverage detected