* Subscribes to drawer onPositionChanged event in order to * re-validate drawers when the position changes.
(drawer: MatDrawer)
| 979 | * re-validate drawers when the position changes. |
| 980 | */ |
| 981 | private _watchDrawerPosition(drawer: MatDrawer): void { |
| 982 | // NOTE: We need to wait for the microtask queue to be empty before validating, |
| 983 | // since both drawers may be swapping positions at the same time. |
| 984 | drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(() => { |
| 985 | afterNextRender({read: () => this._validateDrawers()}, {injector: this._injector}); |
| 986 | }); |
| 987 | } |
| 988 | |
| 989 | /** Subscribes to changes in drawer mode so we can run change detection. */ |
| 990 | private _watchDrawerMode(drawer: MatDrawer): void { |
no test coverage detected