MaterialPopupComponent constructor
MaterialPopupComponent(
- @Optional() @SkipSelf() PopupHierarchy? _hierarchy,
- @Optional() @SkipSelf() MaterialPopupComponent? parentPopup,
- @Attribute('role') String? role,
- NgZone _ngZone,
- OverlayService _overlayService,
- DomService _domService,
- ZIndexer _zIndexer,
- @Inject(defaultPopupPositions) List<
RelativePosition> _defaultPreferredPositions, - @Inject(overlayRepositionLoop) Object useRepositionLoop,
- @Inject(overlayViewportBoundaries) Object viewportBoundaries,
- @Optional() PopupSizeProvider? _popupSizeProvider,
- ChangeDetectorRef _changeDetector,
- ViewContainerRef _viewContainer,
- Element elementRef,
Implementation
MaterialPopupComponent(
@Optional() @SkipSelf() this._hierarchy,
@Optional() @SkipSelf() MaterialPopupComponent? parentPopup,
@Attribute('role') String? role,
this._ngZone,
this._overlayService,
this._domService,
this._zIndexer,
@Inject(defaultPopupPositions) this._defaultPreferredPositions,
@Inject(overlayRepositionLoop) Object useRepositionLoop,
@Inject(overlayViewportBoundaries) Object viewportBoundaries,
@Optional() this._popupSizeProvider,
this._changeDetector,
this._viewContainer,
this.elementRef)
: this.role = role ?? 'dialog' {
// Close popup if parent closes.
if (parentPopup != null) {
_disposer
.addStreamSubscription(parentPopup.onClose.listen((_) => close()));
}
if (useRepositionLoop is bool) {
_useRepositionLoop = useRepositionLoop;
}
if (viewportBoundaries is Box) {
_viewportBoundaries = viewportBoundaries;
}
// Create the PopupRef for the ACX focus library.
_resolvedPopupRef = MaterialPopupRef(this);
}