add check for portrait before shutting menu

This commit is contained in:
Jamie V 2024-03-14 09:44:03 -07:00 committed by Rukmini Bose
parent af19bb4ef1
commit a7c09b80a1

View File

@ -54,9 +54,8 @@ class ApplicationRouter extends EventEmitter {
this.setHash = _.debounce(this.setHash.bind(this), 300);
const agent = new Agent(window);
this.isMobile = agent.isMobile();
this.agent = new Agent(window);
this.isMobile = this.agent.isMobile();
openmct.once('destroy', () => {
this.destroy();
@ -145,7 +144,7 @@ class ApplicationRouter extends EventEmitter {
navigate(hash) {
this.handleLocationChange(hash.substring(1));
if (this.isMobile) {
if (this.isMobile && this.agent.isPortrait()) {
this.setSearchParam(HIDE_TREE_PARAM, 'true');
}
}