mirror of
https://github.com/nasa/openmct.git
synced 2025-06-22 09:08:43 +00:00
[Inspector] Change how inspection objects are changed
Instead of resetting the inspection objects when a treenode is clicked, it is changed when the view changes.
This commit is contained in:
@ -145,7 +145,7 @@ define(
|
|||||||
};
|
};
|
||||||
// Create an array of objects which will allow for multiple selection
|
// Create an array of objects which will allow for multiple selection
|
||||||
// for the object inspector.
|
// for the object inspector.
|
||||||
$scope.inspectionObjects = [$scope.selectedObject];
|
$scope.inspectionObjects = [$scope.domainObject];
|
||||||
|
|
||||||
// Listen for changes in navigation state.
|
// Listen for changes in navigation state.
|
||||||
navigationService.addListener(setNavigation);
|
navigationService.addListener(setNavigation);
|
||||||
|
@ -35,7 +35,10 @@ define(
|
|||||||
function BrowseObjectController($scope, $location, $route, $window) {
|
function BrowseObjectController($scope, $location, $route, $window) {
|
||||||
function setViewForDomainObject(domainObject) {
|
function setViewForDomainObject(domainObject) {
|
||||||
var locationViewKey = $location.search().view;
|
var locationViewKey = $location.search().view;
|
||||||
|
|
||||||
|
// Reset the inspection objects when we switch the view
|
||||||
|
$scope.ngModel.inspectionObjects = [$scope.domainObject];
|
||||||
|
|
||||||
function selectViewIfMatching(view) {
|
function selectViewIfMatching(view) {
|
||||||
if (view.key === locationViewKey) {
|
if (view.key === locationViewKey) {
|
||||||
$scope.representation = $scope.representation || {};
|
$scope.representation = $scope.representation || {};
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
key="'label'"
|
key="'label'"
|
||||||
mct-object="domainObject"
|
mct-object="domainObject"
|
||||||
ng-model="ngModel"
|
ng-model="ngModel"
|
||||||
ng-click="ngModel.selectedObject = domainObject; ngModel.inspectionObjects = []; ngModel.inspectionObjects[0] = domainObject"
|
ng-click="ngModel.selectedObject = domainObject"
|
||||||
>
|
>
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
</span>
|
</span>
|
||||||
|
Reference in New Issue
Block a user