mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 23:12:23 +00:00
make reviewer requested changes
This commit is contained in:
parent
a4a1cb5e05
commit
26210eaa50
@ -24,8 +24,8 @@
|
|||||||
* Module defining ObjectInspectorController. Created by shale on 08/21/2015.
|
* Module defining ObjectInspectorController. Created by shale on 08/21/2015.
|
||||||
*/
|
*/
|
||||||
define(
|
define(
|
||||||
['angular'],
|
[],
|
||||||
function (angular) {
|
function () {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ObjectInspectorController gets and formats the data for
|
* The ObjectInspectorController gets and formats the data for
|
||||||
@ -38,8 +38,6 @@ define(
|
|||||||
$scope.contextutalParents = [];
|
$scope.contextutalParents = [];
|
||||||
//$scope.isLink = false;
|
//$scope.isLink = false;
|
||||||
|
|
||||||
this.InspectorMutation = $scope.ngModel.selectedObject.getCapability('mutation');
|
|
||||||
|
|
||||||
// Gets an array of the contextual parents/ancestors of the selected object
|
// Gets an array of the contextual parents/ancestors of the selected object
|
||||||
function getContextualPath() {
|
function getContextualPath() {
|
||||||
var currentObj = $scope.ngModel.selectedObject,
|
var currentObj = $scope.ngModel.selectedObject,
|
||||||
@ -111,11 +109,9 @@ define(
|
|||||||
getMetadata();
|
getMetadata();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.InspectorMutation.listen(function () {
|
var mutation = $scope.ngModel.selectedObject.getCapability('mutation');
|
||||||
if (!angular.equals($scope.metadata, $scope.ngModel.selectedObject.useCapability('metadata'))) {
|
var unlisten = mutation.listen(getMetadata);
|
||||||
getMetadata();
|
$scope.$on('$destroy', unlisten);
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return ObjectInspectorController;
|
return ObjectInspectorController;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ define(
|
|||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
mockScope = jasmine.createSpyObj(
|
mockScope = jasmine.createSpyObj(
|
||||||
"$scope",
|
"$scope",
|
||||||
["$watch"]
|
["$watch", "$on"]
|
||||||
);
|
);
|
||||||
mockScope.ngModel = {};
|
mockScope.ngModel = {};
|
||||||
mockScope.ngModel.selectedObject = {
|
mockScope.ngModel.selectedObject = {
|
||||||
|
Loading…
Reference in New Issue
Block a user