()
| 862 | } |
| 863 | |
| 864 | ngAfterContentInit() { |
| 865 | this._allDrawers.changes |
| 866 | .pipe(startWith(this._allDrawers), takeUntil(this._destroyed)) |
| 867 | .subscribe((drawer: QueryList<MatDrawer>) => { |
| 868 | this._drawers.reset(drawer.filter(item => !item._container || item._container === this)); |
| 869 | this._drawers.notifyOnChanges(); |
| 870 | }); |
| 871 | |
| 872 | this._drawers.changes.pipe(startWith(null)).subscribe(() => { |
| 873 | this._validateDrawers(); |
| 874 | |
| 875 | this._drawers.forEach((drawer: MatDrawer) => { |
| 876 | this._watchDrawerToggle(drawer); |
| 877 | this._watchDrawerPosition(drawer); |
| 878 | this._watchDrawerMode(drawer); |
| 879 | }); |
| 880 | |
| 881 | if ( |
| 882 | !this._drawers.length || |
| 883 | this._isDrawerOpen(this._start) || |
| 884 | this._isDrawerOpen(this._end) |
| 885 | ) { |
| 886 | this.updateContentMargins(); |
| 887 | } |
| 888 | |
| 889 | this._changeDetectorRef.markForCheck(); |
| 890 | }); |
| 891 | |
| 892 | // Avoid hitting the NgZone through the debounce timeout. |
| 893 | this._ngZone.runOutsideAngular(() => { |
| 894 | this._doCheckSubject |
| 895 | .pipe( |
| 896 | debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps |
| 897 | takeUntil(this._destroyed), |
| 898 | ) |
| 899 | .subscribe(() => this.updateContentMargins()); |
| 900 | }); |
| 901 | } |
| 902 | |
| 903 | ngOnDestroy() { |
| 904 | this._contentMarginChanges.complete(); |
nothing calls this directly
no test coverage detected