[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:
slhale 2015-08-27 16:53:13 -07:00
parent f1bf88fac4
commit 8c811c4a22
3 changed files with 6 additions and 3 deletions

View File

@ -145,7 +145,7 @@ define(
};
// Create an array of objects which will allow for multiple selection
// for the object inspector.
$scope.inspectionObjects = [$scope.selectedObject];
$scope.inspectionObjects = [$scope.domainObject];
// Listen for changes in navigation state.
navigationService.addListener(setNavigation);

View File

@ -35,7 +35,10 @@ define(
function BrowseObjectController($scope, $location, $route, $window) {
function setViewForDomainObject(domainObject) {
var locationViewKey = $location.search().view;
// Reset the inspection objects when we switch the view
$scope.ngModel.inspectionObjects = [$scope.domainObject];
function selectViewIfMatching(view) {
if (view.key === locationViewKey) {
$scope.representation = $scope.representation || {};

View File

@ -36,7 +36,7 @@
key="'label'"
mct-object="domainObject"
ng-model="ngModel"
ng-click="ngModel.selectedObject = domainObject; ngModel.inspectionObjects = []; ngModel.inspectionObjects[0] = domainObject"
ng-click="ngModel.selectedObject = domainObject"
>
</mct-representation>
</span>