()
| 842 | } |
| 843 | |
| 844 | ngAfterContentInit() { |
| 845 | this._allDrawers.changes |
| 846 | .pipe(startWith(this._allDrawers), takeUntil(this._destroyed)) |
| 847 | .subscribe((drawer: QueryList<MatDrawer>) => { |
| 848 | this._drawers.reset(drawer.filter(item => !item._container || item._container === this)); |
| 849 | this._drawers.notifyOnChanges(); |
| 850 | }); |
| 851 | |
| 852 | this._drawers.changes.pipe(startWith(null)).subscribe(() => { |
| 853 | this._validateDrawers(); |
| 854 | |
| 855 | this._drawers.forEach((drawer: MatDrawer) => { |
| 856 | this._watchDrawerToggle(drawer); |
| 857 | this._watchDrawerPosition(drawer); |
| 858 | this._watchDrawerMode(drawer); |
| 859 | }); |
| 860 | |
| 861 | if ( |
| 862 | !this._drawers.length || |
| 863 | this._isDrawerOpen(this._start) || |
| 864 | this._isDrawerOpen(this._end) |
| 865 | ) { |
| 866 | this.updateContentMargins(); |
| 867 | } |
| 868 | |
| 869 | this._changeDetectorRef.markForCheck(); |
| 870 | }); |
| 871 | |
| 872 | // Avoid hitting the NgZone through the debounce timeout. |
| 873 | this._ngZone.runOutsideAngular(() => { |
| 874 | this._doCheckSubject |
| 875 | .pipe( |
| 876 | debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps |
| 877 | takeUntil(this._destroyed), |
| 878 | ) |
| 879 | .subscribe(() => this.updateContentMargins()); |
| 880 | }); |
| 881 | } |
| 882 | |
| 883 | ngOnDestroy() { |
| 884 | this._contentMarginChanges.complete(); |
nothing calls this directly
no test coverage detected