Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private getOverlayConfig($event: MouseEvent): OverlayConfig {
return new OverlayConfig({
panelClass: 'nz-dropdown-panel',
positionStrategy: this.generatePositionStrategy($event),
scrollStrategy: this.overlay.scrollStrategies.close()
});
}
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),
});
}
private getOverlayConfig(): OverlayConfig {
return new OverlayConfig({
backdropClass: 'ts-autocomplete__backdrop',
direction: 'ltr',
hasBackdrop: true,
positionStrategy: this.getOverlayPosition(),
scrollStrategy: this.scrollStrategy(),
width: this.getPanelWidth(),
});
}
private _getOverlayConfig(): OverlayConfig {
return new OverlayConfig({
positionStrategy: this._getPosition(),
hasBackdrop: !this.triggersSubmenu(),
backdropClass: 'cdk-overlay-transparent-backdrop',
direction: this.dir,
scrollStrategy: this._scrollStrategy()
});
}
private getOverlayConfig(): OverlayConfig {
return new OverlayConfig({
positionStrategy: this.getOverlayPosition(),
scrollStrategy: this.overlay.scrollStrategies.reposition(),
width: this._getPanelWidth(),
});
}
_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);
}
/**
getOverlayConfig(): OverlayConfig {
return new OverlayConfig({
scrollStrategy: this.overlay.scrollStrategies.block()
});
}
private _getOverlayConfig(): OverlayConfig {
return new OverlayConfig({
positionStrategy: this._getOverlayPosition(),
scrollStrategy: this._overlay.scrollStrategies.block(),
maxWidth: this._getPanelWidth(),
});
}
private _getOverlayConfig(): OverlayConfig {
return new OverlayConfig({
positionStrategy: this._getOverlayPosition(),
scrollStrategy: this._scrollStrategy(),
width: this._getPanelWidth(),
panelClass: this.panelClass
});
}
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));
}