mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
[Mobile] AgentService & Tests
Adjusted the getOrientation of agentService to inject the window instead of calling for it in agentService. Also adjusted treeNodeController for this. Added tests for the agentService's getOrientation function.
This commit is contained in:
@ -182,7 +182,7 @@ define(
|
||||
// and in portrait mode, than, hide the tree menu
|
||||
TreeNodeController.prototype.setObject = function (ngModel, domainObject) {
|
||||
ngModel.selectedObject = domainObject;
|
||||
if (this.agentService.getOrientation() === "portrait" &&
|
||||
if (this.agentService.getOrientation(window.innerWidth, window.innerHeight) === "portrait" &&
|
||||
this.agentService.isPhone(navigator.userAgent)) {
|
||||
this.$scope.$emit('select-obj');
|
||||
}
|
||||
|
Reference in New Issue
Block a user