[Plot] Cleanup

Remove console.log statements.
Check for array existence before pushing.
This commit is contained in:
slhale 2015-08-27 16:34:03 -07:00
parent 953bd9d8fc
commit cf421f8b9a

View File

@ -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;