Commit 60910f80cdd4e1dac8fc75933083745c870aa7c1

Authored by Amrita Vishnoi
2 parents 05be0ac0 2977630c

Merge branch 'Bug#12159_new' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -933,7 +933,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
933 933 else {
934 934 $scope.ColoredImageSRC = [];
935 935 }
936   -
  936 + if ($rootScope.updatedGrayDataList != null && $rootScope.updatedGrayDataList != undefined) {
  937 + $rootScope.updatedGrayDataList = [];
  938 + }
  939 + if ($rootScope.updatedGrayMRDataList != null && $rootScope.updatedGrayMRDataList != undefined) {
  940 + $rootScope.updatedGrayMRDataList = [];
  941 + }
  942 + if ($rootScope.grayImageDataList != null && $rootScope.grayImageDataList != undefined) {
  943 + $rootScope.grayImageDataList = [];
  944 + }
  945 + if ($rootScope.grayImageMRDataList != null && $rootScope.grayImageMRDataList != undefined) {
  946 + $rootScope.grayImageMRDataList = [];
  947 + }
937 948 //history code
938 949  
939 950 if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) {
... ... @@ -1513,7 +1524,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1513 1524 }
1514 1525  
1515 1526 // $rootScope.previousHighlightList.push(RGBColor);
1516   - // $scope.isClickedOnBodyForHighlight = true;
  1527 + $scope.isClickedOnBodyForHighlight = true;
1517 1528 $scope.highLightBodyBasedOnIcolor(RGBColor);
1518 1529 }
1519 1530  
... ... @@ -1521,9 +1532,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1521 1532 //extarct clicked body part is extarct button is already enabled.
1522 1533  
1523 1534 if ($rootScope.isExtract == true) {
1524   - //if ($rootScope.multiAnnotationIsON == false) {
1525   - // $rootScope.isListManagerSelected = false;
1526   - //}
  1535 + if ($rootScope.multiAnnotationIsON == false) {
  1536 + $rootScope.isListManagerSelected = false;
  1537 + }
1527 1538 $scope.enableExtract(false);
1528 1539 }
1529 1540  
... ... @@ -1895,7 +1906,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1895 1906 if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { }
1896 1907 else
1897 1908 {
1898   - //$scope.isClickedOnBodyForHighlight = true;
  1909 + $scope.isClickedOnBodyForHighlight = true;
1899 1910 $scope.highLightBodyBasedOnIcolor(RGBColor);
1900 1911 }
1901 1912  
... ... @@ -1904,9 +1915,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1904 1915  
1905 1916 //extarct clisked body part is extarct button is already enabled.
1906 1917 if ($rootScope.isExtract == true) {
1907   - //if ($rootScope.multiAnnotationIsON == false) {
1908   - // $rootScope.isListManagerSelected = false;
1909   - //}
  1918 + if ($rootScope.multiAnnotationIsON == false) {
  1919 + $rootScope.isListManagerSelected = false;
  1920 + }
1910 1921 $scope.enableExtract(false);
1911 1922 }
1912 1923  
... ... @@ -2152,7 +2163,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2152 2163 var selectedAnnotation;
2153 2164  
2154 2165 if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)
2155   - && $rootScope.isListManagerSelected) {
  2166 + && $rootScope.isListManagerSelected && $rootScope.multiAnnotationIsON == true) {
2156 2167  
2157 2168 multiTermList = $scope.AllTerms;
2158 2169 angular.forEach($rootScope.previousHighlightList, function (value, key) {
... ... @@ -2519,8 +2530,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2519 2530  
2520 2531 console.log('before worker call BRID: ' + bodyRegionId)
2521 2532  
2522   - if (grayImageDataVar != null && coloredImageDataVar != null && maskData != null) {
2523   - //if (grayImageDataVar != null && coloredImageDataVar != null && maskData != null && TermList != undefined && TermList.length > 0) {
  2533 + //if (grayImageDataVar != null && coloredImageDataVar != null && maskData != null) {
  2534 + if (grayImageDataVar != null && coloredImageDataVar != null && maskData != null && TermList != undefined && TermList.length > 0) {
2524 2535 worker.postMessage({
2525 2536  
2526 2537 'termList': TermList,
... ... @@ -2532,10 +2543,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2532 2543  
2533 2544 });
2534 2545 }
2535   - //else {
2536   - // $('#spinner').css('visibility', 'hidden')
2537   - // $rootScope.isLoading = false;
2538   - //}
  2546 + else {
  2547 + $('#spinner').css('visibility', 'hidden')
  2548 + $rootScope.isLoading = false;
  2549 + }
2539 2550  
2540 2551  
2541 2552 worker.onmessage = function (e) {
... ... @@ -2593,21 +2604,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2593 2604 if ($rootScope.isListManagerSelected == true) {
2594 2605 $scope.aligneCanvasWithTerm();
2595 2606 }
2596   - //else if ($rootScope.previousHighlightList != undefined && $rootScope.previousHighlightList.length > 0 && ($scope.isGenderChnage == true || $scope.isViewChange == true)) {
2597   - // var canvasDiv = document.getElementById('canvasDiv');
2598   - // if ($rootScope.viewOrientationId == '1' || $rootScope.viewOrientationId == '4') {
2599   -
2600   - // $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2)
2601   - // var canvasDiv = document.getElementById('canvasDiv');
2602   - // $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition);
2603   - // }
2604   - // else {
2605   - // $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition);
2606   - // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition);
2607   - // $rootScope.isLoading = false;
2608   - //}
2609   - // $('#spinner').css('visibility', 'hidden');
2610   - //}
  2607 + else if ($rootScope.previousHighlightList != undefined && $rootScope.previousHighlightList.length > 0 && ($scope.isGenderChnage == true || $scope.isViewChange == true)) {
  2608 + var canvasDiv = document.getElementById('canvasDiv');
  2609 + if ($rootScope.viewOrientationId == '1' || $rootScope.viewOrientationId == '4') {
  2610 +
  2611 + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2)
  2612 + var canvasDiv = document.getElementById('canvasDiv');
  2613 + $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition);
  2614 + }
  2615 + else {
  2616 + $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition);
  2617 + $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition);
  2618 + $rootScope.isLoading = false;
  2619 + }
  2620 + $('#spinner').css('visibility', 'hidden');
  2621 + }
2611 2622 //else if ($rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true || $scope.isClickedOnBodyForHighlight
2612 2623 // )
2613 2624 else if ($rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true){
... ... @@ -6576,10 +6587,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6576 6587 else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
6577 6588 $scope.createTermListByPreviousTermsAndHighlight();
6578 6589 }
6579   - //else {
6580   - // $scope.isLoading = false;
6581   - // $('#spinner').css('visibility', 'hidden');
6582   - //}
  6590 + else {
  6591 + $scope.isLoading = false;
  6592 + $('#spinner').css('visibility', 'hidden');
  6593 + }
6583 6594  
6584 6595 }
6585 6596  
... ... @@ -7008,12 +7019,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7008 7019 $scope.setLayerNumberAndHighlightByTermList();
7009 7020  
7010 7021 }
7011   - //else if ($rootScope.previousHighlightList != null && $rootScope.previousHighlightList.length > 0 &&
7012   - // ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true)) {
  7022 + else if ($rootScope.previousHighlightList != null && $rootScope.previousHighlightList.length > 0 &&
  7023 + ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true)) {
7013 7024  
7014   - // $rootScope.isHighLight = true
7015   - // $scope.setLayerNumberAndHighlightByTermList();
7016   - //}
  7025 + $rootScope.isHighLight = true
  7026 + $scope.setLayerNumberAndHighlightByTermList();
  7027 + }
7017 7028  
7018 7029 else {
7019 7030  
... ... @@ -7078,11 +7089,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7078 7089 $scope.layerNumber = 0;
7079 7090  
7080 7091 //remove existing body view
7081   - //var canDiv = document.getElementById('canvasDiv');
7082   - //var canDivChildCount = canDiv.childElementCount;
7083   - //if (canDivChildCount > 0) {
7084   - // canDiv.innerHTML = '';
7085   - //}
  7092 + var canDiv = document.getElementById('canvasDiv');
  7093 + var canDivChildCount = canDiv.childElementCount;
  7094 + if (canDivChildCount > 0) {
  7095 + canDiv.innerHTML = '';
  7096 + }
7086 7097  
7087 7098 var selectedViewId = $scope.bodyViews[event.currentTarget.title];
7088 7099 $rootScope.viewOrientationId = selectedViewId;
... ...