feat(menu): allow persistent menus

Closes #5204
This commit is contained in:
Adam Bradley
2016-02-15 21:40:16 -06:00
parent c02fb51d04
commit 0d47a1b79f
5 changed files with 52 additions and 9 deletions

View File

@ -68,7 +68,17 @@ export class MenuToggle {
*/
get isHidden() {
if (this._inNavbar && this._viewCtrl) {
return !this._viewCtrl.isRoot();
if (this._viewCtrl.isRoot()) {
// this is the root view, so it should always show
return false;
}
let menu = this._menu.get(this.menuToggle);
if (menu) {
// this is not the root view, so see if this menu
// is configured to still be enabled if it's not the root view
return !menu.persistent;
}
}
return false;
}