Commit 59581a413d2e0e307dc633aae0b6fd08fb454d74

Authored by Amrita Vishnoi
2 parents 280181a9 8eb71d1a

Merge branch 'SearchFixForMLRandMedialView' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -4905,21 +4905,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4905 4905 // }
4906 4906 // }
4907 4907 //}
4908   - var loopLength = 0;
  4908 + var endIndex = 0;
  4909 + var startIndex = 0;
4909 4910 if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) {
4910   - loopLength = 7;
  4911 + endIndex = 6;
  4912 + startIndex = 1;
4911 4913 }
4912   - else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')){
4913   - loopLength = 5;
  4914 + else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) {
  4915 + endIndex = 5;
  4916 + startIndex = 1;
4914 4917 }
4915 4918 else if (($rootScope.viewOrientationId == '5')) {
4916   - loopLength = 4;
  4919 + endIndex = 6;
  4920 + startIndex = 2;
4917 4921 }
4918   - else if (($rootScope.viewOrientationId == '6')) {
4919   - loopLength = 1;
  4922 + else if (($rootScope.viewOrientationId == '6')) {
  4923 + endIndex = 6;
  4924 + startIndex = 6;
4920 4925 }
4921 4926  
4922   - for (var i = 1; i < loopLength; i++) {
  4927 + for (var i = startIndex; i <= endIndex; i++) {
4923 4928  
4924 4929 var id;
4925 4930 var maskId;
... ... @@ -4935,7 +4940,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4935 4940 if (maskcanvas != null || maskcanvas != undefined)
4936 4941 document.getElementById('canvasDiv').removeChild(maskcanvas);
4937 4942  
4938   - if (loopLength == 7) {
  4943 + if (endIndex == 6) {
4939 4944  
4940 4945 if (i == 4 || i == 5 || i == 6) {
4941 4946 id = 'imageCanvas' + i + '_MR';
... ... @@ -4962,7 +4967,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4962 4967  
4963 4968  
4964 4969 }
4965   -
4966 4970 $scope.terminateCurrentlyRunningWPs = function () {
4967 4971 if ($scope.runningWorkers != null || $scope.runningWorkers != undefined) {
4968 4972 var workerCount = $scope.runningWorkers.length;
... ...