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

Function _getOverlayConfig

src/material/menu/menu-trigger-base.ts:363–378  ·  view source on GitHub ↗

* This method builds the configuration object needed to create the overlay, the OverlayState. * @returns OverlayConfig

(menu: MatMenuPanel)

Source from the content-addressed store, hash-verified

361 * @returns OverlayConfig
362 */
363 private _getOverlayConfig(menu: MatMenuPanel): OverlayConfig {
364 return new OverlayConfig({
365 positionStrategy: createFlexibleConnectedPositionStrategy(
366 this._injector,
367 this._getOverlayOrigin(),
368 )
369 .withLockedPosition()
370 .withGrowAfterOpen()
371 .withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'),
372 backdropClass: menu.backdropClass || 'cdk-overlay-transparent-backdrop',
373 panelClass: menu.overlayPanelClass,
374 scrollStrategy: this._scrollStrategy(),
375 direction: this._dir || 'ltr',
376 disableAnimations: this._animationsDisabled,
377 });
378 }
379
380 /**
381 * Listens to changes in the position of the overlay and sets the correct classes

Callers

nothing calls this directly

Calls 5

withTransformOriginOnMethod · 0.80
withGrowAfterOpenMethod · 0.80
withLockedPositionMethod · 0.80
_getOverlayOriginMethod · 0.45

Tested by

no test coverage detected