mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 15:02: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.
|
||||
*/
|
||||
define(
|
||||
['angular'],
|
||||
function (angular) {
|
||||
[],
|
||||
function () {
|
||||
|
||||
/**
|
||||
* The ObjectInspectorController gets and formats the data for
|
||||
@ -38,8 +38,6 @@ define(
|
||||
$scope.contextutalParents = [];
|
||||
//$scope.isLink = false;
|
||||
|
||||
this.InspectorMutation = $scope.ngModel.selectedObject.getCapability('mutation');
|
||||
|
||||
// Gets an array of the contextual parents/ancestors of the selected object
|
||||
function getContextualPath() {
|
||||
var currentObj = $scope.ngModel.selectedObject,
|
||||
@ -111,11 +109,9 @@ define(
|
||||
getMetadata();
|
||||
});
|
||||
|
||||
this.InspectorMutation.listen(function () {
|
||||
if (!angular.equals($scope.metadata, $scope.ngModel.selectedObject.useCapability('metadata'))) {
|
||||
getMetadata();
|
||||
}
|
||||
});
|
||||
var mutation = $scope.ngModel.selectedObject.getCapability('mutation');
|
||||
var unlisten = mutation.listen(getMetadata);
|
||||
$scope.$on('$destroy', unlisten);
|
||||
}
|
||||
return ObjectInspectorController;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ define(
|
||||
beforeEach(function () {
|
||||
mockScope = jasmine.createSpyObj(
|
||||
"$scope",
|
||||
["$watch"]
|
||||
["$watch", "$on"]
|
||||
);
|
||||
mockScope.ngModel = {};
|
||||
mockScope.ngModel.selectedObject = {
|
||||
|
Loading…
Reference in New Issue
Block a user