mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
add check for portrait before shutting menu
This commit is contained in:
parent
af19bb4ef1
commit
a7c09b80a1
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user