'use strict';

/**
 * @ngdoc function
 * @name ocwUiApp.controller:DatasetDisplayCtrl
 * @description
 * # DatasetDisplayCtrl
 * Controller of the ocwUiApp
 */
angular.module('ocwUiApp')
  .controller('DatasetDisplayCtrl', ['$rootScope', '$scope', 'selectedDatasetInformation', 
    function($rootScope, $scope, selectedDatasetInformation) {
	$scope.datasets = selectedDatasetInformation.getDatasets();

	$scope.removeDataset = function($index) {
	  selectedDatasetInformation.removeDataset($index);
	}

	$scope.setRegridBase = function(index) {
      for (var i = 0; i < $scope.datasets.length; i++) {
        $scope.datasets[i].regrid = ((i == index) ? $scope.datasets[i].regrid : false);
      }
	}
}]);

@@ -336,16 +336,18 @@
 ion) %7B%0A%09
+  
 $scope.d
@@ -400,16 +400,18 @@
 ts();%0A%0A%09
+  
 $scope.r
@@ -447,16 +447,18 @@
 x) %7B%0A%09  
+  
 selected
@@ -504,12 +504,17 @@
 );%0A%09
-%7D
+  %7D;
 %0A%0A%09
+  
 $sco
@@ -556,16 +556,18 @@
 %7B%0A      
+  
 for (var
@@ -617,16 +617,18 @@
         
+  
 $scope.d
@@ -653,16 +653,17 @@
 = ((i ==
+=
  index) 
@@ -710,12 +710,17 @@
     
+  
 %7D%0A%09
-%7D
+  %7D;
 %0A%7D%5D)

Fix datasetdisplay indentation and linting errors