refactor(docs-infra): simplify condition for determining sidenav mode (#42747)
Previously, the `AppComponent#showTopMenu` property was taken into account when determining the `MatSidenav#mode` value. However, this was redundant, because in the only case in which the use of `showTopMenu` would make a difference (i.e. when `dockSideNav` was true and `isSideNavDoc` was false) the sidenav would be closed and the hamburger menu button would not be visible (thus there would be no way to open it manually). This commit simplifies the condition for determining the sidenav mode by removing `showTopMenu` from the expression. PR Close #42747
This commit is contained in:
parent
ffeea63f43
commit
5aecf265f3
|
@ -79,7 +79,7 @@ export class AppComponent implements OnInit {
|
|||
private currentUrl: string;
|
||||
|
||||
get isOpened() { return this.dockSideNav && this.isSideNavDoc; }
|
||||
get mode() { return this.dockSideNav && (this.isSideNavDoc || this.showTopMenu) ? 'side' : 'over'; }
|
||||
get mode() { return this.isOpened ? 'side' : 'over'; }
|
||||
|
||||
// Search related properties
|
||||
showSearchResults = false;
|
||||
|
|
Loading…
Reference in New Issue