* Subscribes to drawer onPositionChanged event in order to * re-validate drawers when the position changes.
(drawer: MatDrawer)
| 999 | * re-validate drawers when the position changes. |
| 1000 | */ |
| 1001 | private _watchDrawerPosition(drawer: MatDrawer): void { |
| 1002 | // NOTE: We need to wait for the microtask queue to be empty before validating, |
| 1003 | // since both drawers may be swapping positions at the same time. |
| 1004 | drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(() => { |
| 1005 | afterNextRender({read: () => this._validateDrawers()}, {injector: this._injector}); |
| 1006 | }); |
| 1007 | } |
| 1008 | |
| 1009 | /** Subscribes to changes in drawer mode so we can run change detection. */ |
| 1010 | private _watchDrawerMode(drawer: MatDrawer): void { |
no test coverage detected