How to use the @angular/cdk/overlay.OverlayConfig function in @angular/cdk

To help you get started, we’ve selected a few @angular/cdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NG-ZORRO / ng-zorro-antd / components / dropdown / nz-context-menu.service.ts View on Github external
private getOverlayConfig($event: MouseEvent): OverlayConfig {
    return new OverlayConfig({
      panelClass: 'nz-dropdown-panel',
      positionStrategy: this.generatePositionStrategy($event),
      scrollStrategy: this.overlay.scrollStrategies.close()
    });
  }
github dynatrace-oss / barista / src / lib / consumption / consumption.ts View on Github external
private _createOverlayConfig(): OverlayConfig {
    return new OverlayConfig({
      panelClass: OVERLAY_PANEL_CLASS,
      positionStrategy: this._overlay
        .position()
        .flexibleConnectedTo(this._elementRef)
        .setOrigin(this._elementRef)
        .withPositions(OVERLAY_POSITIONS)
        .withFlexibleDimensions(true)
        .withPush(false)
        .withGrowAfterOpen(true)
        .withViewportMargin(0)
        .withLockedPosition(false),
    });
  }
github GetTerminus / terminus-ui / terminus-ui / autocomplete / src / autocomplete-panel / autocomplete-trigger.directive.ts View on Github external
private getOverlayConfig(): OverlayConfig {
    return new OverlayConfig({
      backdropClass: 'ts-autocomplete__backdrop',
      direction: 'ltr',
      hasBackdrop: true,
      positionStrategy: this.getOverlayPosition(),
      scrollStrategy: this.scrollStrategy(),
      width: this.getPanelWidth(),
    });
  }
github angular / components / src / lib / menu / menu-trigger.ts View on Github external
private _getOverlayConfig(): OverlayConfig {
    return new OverlayConfig({
      positionStrategy: this._getPosition(),
      hasBackdrop: !this.triggersSubmenu(),
      backdropClass: 'cdk-overlay-transparent-backdrop',
      direction: this.dir,
      scrollStrategy: this._scrollStrategy()
    });
  }
github seokju-na / geeks-diary / src / app / shared / autocomplete / autocomplete-trigger.directive.ts View on Github external
private getOverlayConfig(): OverlayConfig {
        return new OverlayConfig({
            positionStrategy: this.getOverlayPosition(),
            scrollStrategy: this.overlay.scrollStrategies.reposition(),
            width: this._getPanelWidth(),
        });
    }
github albertnadal / ng2-daterange-picker / node_modules / @angular / material / esm2015 / datepicker.js View on Github external
_createPopup() {
        const /** @type {?} */ overlayConfig = new OverlayConfig({
            positionStrategy: this._createPopupPositionStrategy(),
            hasBackdrop: true,
            backdropClass: 'mat-overlay-transparent-backdrop',
            direction: this._dir ? this._dir.value : 'ltr',
            scrollStrategy: this._scrollStrategy(),
            panelClass: 'mat-datepicker-popup',
        });
        this._popupRef = this._overlay.create(overlayConfig);
    }
    /**
github 100cm / at-ui-angular / src / app / components / drawer / drawer.component.ts View on Github external
getOverlayConfig(): OverlayConfig {
    return new OverlayConfig({
                               scrollStrategy: this.overlay.scrollStrategies.block()
                             });
  }
github dynatrace-oss / barista / components / autocomplete / src / autocomplete-trigger.ts View on Github external
private _getOverlayConfig(): OverlayConfig {
    return new OverlayConfig({
      positionStrategy: this._getOverlayPosition(),
      scrollStrategy: this._overlay.scrollStrategies.block(),
      maxWidth: this._getPanelWidth(),
    });
  }
github sbb-design-systems / sbb-angular / projects / sbb-esta / angular-public / dropdown / src / dropdown-trigger.directive.ts View on Github external
private _getOverlayConfig(): OverlayConfig {
    return new OverlayConfig({
      positionStrategy: this._getOverlayPosition(),
      scrollStrategy: this._scrollStrategy(),
      width: this._getPanelWidth(),
      panelClass: this.panelClass
    });
  }
github NG-ZORRO / ng-zorro-antd-mobile / components / core / services / popup.service.ts View on Github external
showPopup(
    component,
    childInjector?: Injector,
    hasBackdrop?: boolean,
    positionStrategy: GlobalPositionStrategy = this.overlay
      .position()
      .global()
      .centerVertically()
      .centerHorizontally()
  ): ComponentRef {
    let overlayConfig = new OverlayConfig();
    overlayConfig.hasBackdrop = hasBackdrop;
    overlayConfig.positionStrategy = positionStrategy;
    this.overlayRef = this.overlay.create(overlayConfig);
    this.overlayRef.backdropClick().subscribe(() => {
      this.hidePopup();
    });
    return this.overlayRef.attach(new ComponentPortal(component, undefined, childInjector));
  }