Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge branch 'CLIMATE-374' of https://github.com/MichaelArthurAnderso…
  • Loading branch information
lewismc committed Jan 17, 2018
2 parents 59dbe80 + 4a64b62 commit a9fbf74d5722db3e55df8f14eec6846707fbbe97
Showing 1 changed file with 13 additions and 15 deletions.
@@ -27,9 +27,9 @@
* Controller of the ocwUiApp
*/
angular.module('ocwUiApp')
.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout',
'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings',
function($rootScope, $scope, $http, $timeout, selectedDatasetInformation, regionSelectParams, evaluationSettings) {
.controller('ParameterSelectCtrl', ['$rootScope', '$scope', '$http', '$timeout', '$location',
'selectedDatasetInformation', 'regionSelectParams', 'evaluationSettings',
function($rootScope, $scope, $http, $timeout, $location, selectedDatasetInformation, regionSelectParams, evaluationSettings) {
$scope.datasets = selectedDatasetInformation.getDatasets();

// The min/max lat/lon values from the selected datasets
@@ -145,6 +145,8 @@ angular.module('ocwUiApp')
data['temporal_resolution'] = 30;
}

data['temporal_resolution_type'] = temporal_res;

// Load the Metrics for the evaluation
data['metrics'] = []
var metrics = settings.metrics
@@ -171,13 +173,9 @@ angular.module('ocwUiApp')
$scope.runningEval = false;

$timeout(function() {
if (evalWorkDir !== undefined) {
window.location = "#/results/" + evalWorkDir;
} else {
window.location = "#/results";
}
var url = (evalWorkDir) ? '/results/' + evalWorkDir : '/results';
$location.url(url)
}, 100);

}).error(function() {
$scope.runningEval = false;
});
@@ -192,13 +190,13 @@ angular.module('ocwUiApp')
if (parseFloat($scope.displayParams.latMax) > parseFloat($scope.latMax))
$scope.displayParams.latMax = $scope.latMax;

if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin))
if (parseFloat($scope.displayParams.lonMin) < parseFloat($scope.lonMin))
$scope.displayParams.lonMin = $scope.lonMin;

if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax))
if (parseFloat($scope.displayParams.lonMax) > parseFloat($scope.lonMax))
$scope.displayParams.lonMax = $scope.lonMax;

if ($scope.displayParams.start < $scope.start)
if ($scope.displayParams.start < $scope.start)
$scope.displayParams.start = $scope.start;

if ($scope.displayParams.end > $scope.end)
@@ -213,8 +211,8 @@ angular.module('ocwUiApp')
$rootScope.$broadcast('redrawOverlays', []);
}

$scope.unwatchDatasets = $scope.$watch('datasets',
function() {
$scope.unwatchDatasets = $scope.$watch('datasets',
function() {
var numDatasets = $scope.datasets.length;
$scope.displayParams.areValid = false;
$scope.areInUserRegridState = false;
@@ -230,7 +228,7 @@ angular.module('ocwUiApp')
// Get the valid lat/lon range in the selected datasets.
for (var i = 0; i < numDatasets; i++) {
var curDataset = $scope.datasets[i];

latMin = (curDataset['latlonVals']['latMin'] > latMin) ? curDataset['latlonVals']['latMin'] : latMin;
latMax = (curDataset['latlonVals']['latMax'] < latMax) ? curDataset['latlonVals']['latMax'] : latMax;
lonMin = (curDataset['latlonVals']['lonMin'] > lonMin) ? curDataset['latlonVals']['lonMin'] : lonMin;

0 comments on commit a9fbf74

Please sign in to comment.