mirror of
https://github.com/nasa/openmct.git
synced 2025-05-29 21:54:20 +00:00
[Plot] Cleanup
Remove console.log statements. Check for array existence before pushing.
This commit is contained in:
parent
953bd9d8fc
commit
cf421f8b9a
@ -180,12 +180,14 @@ define(
|
|||||||
function setInspectionObjects(event, telemetryObject) {
|
function setInspectionObjects(event, telemetryObject) {
|
||||||
if (event.shiftKey) {
|
if (event.shiftKey) {
|
||||||
// This was a shift-click, so we want multiple selection
|
// This was a shift-click, so we want multiple selection
|
||||||
$scope.ngModel.inspectionObjects.push(telemetryObject);
|
if ($scope.ngModel.inspectionObjects.length > 0) {
|
||||||
console.log('push');
|
$scope.ngModel.inspectionObjects.push(telemetryObject);
|
||||||
|
} else {
|
||||||
|
$scope.ngModel.inspectionObjects = [telemetryObject];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Otherwise replace the old set of inspection objects with this
|
// Otherwise replace the old set of inspection objects with this
|
||||||
$scope.ngModel.inspectionObjects = [telemetryObject];
|
$scope.ngModel.inspectionObjects = [telemetryObject];
|
||||||
console.log('replace');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setInspection = setInspectionObjects;
|
this.setInspection = setInspectionObjects;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user