Commit 04443fc5981b36de561131c1bbd0462e8a393470

Authored by Nikita Kulshreshtha
1 parent 1781f8ea

1. made $rootScope.isHighlightBodyByBodySystem = false; on other buttons click w…

…here highlighbody is called.
2. deleted flushcanvas commented code.
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -4694,9 +4694,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4694 4694  
4695 4695 //if listanager is visisble then close it
4696 4696  
4697   - $rootScope.isListManagerSelected = false;
4698 4697 $rootScope.CloseListManager();
4699 4698  
  4699 + $rootScope.isHighlightBodyByBodySystem = false;
  4700 +
  4701 +
4700 4702 $('#sppeachBubble').css('display', 'none');
4701 4703  
4702 4704 $("#dot").css("display", "none");
... ... @@ -4750,73 +4752,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4750 4752  
4751 4753 $scope.flushCanvas = function () {
4752 4754  
4753   - //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) {
4754   - // angular.forEach($scope.ColoredImageSRC, function (value, key) {
4755   -
4756   - // var id;
4757   - // var maskId;
4758   - // if (value.haveMirror == 'true') {
4759   - // id = 'imageCanvas' + value.bodyRegionId + '_MR';
4760   - // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
4761   - // }
4762   - // else {
4763   - // id = 'imageCanvas' + value.bodyRegionId;
4764   - // maskId = 'imageCanvas' + value.bodyRegionId + '_mci';
4765   - // }
4766   -
4767   - // var canvas = document.getElementById(id);
4768   - // if (canvas != null || canvas != undefined) {
4769   - // document.getElementById('canvasDiv').removeChild(canvas);
4770   - // }
4771   -
4772   - // var maskcanvas = document.getElementById(maskId);
4773   - // if (maskcanvas != null || maskcanvas != undefined) {
4774   - // document.getElementById('canvasDiv').removeChild(maskcanvas);
4775   -
4776   - // }
4777   - // if (i == 4 || i == 5 || i == 6) {
4778   - // id = 'imageCanvas' + i + '_MR';
4779   - // maskId = 'imageCanvas' + i + '_MR_mci';
4780   -
4781   - // var canvas = document.getElementById(id);
4782   - // if (canvas != null || canvas != undefined)
4783   - // document.getElementById('canvasDiv').removeChild(canvas);
4784   -
4785   - // var maskcanvas = document.getElementById(maskId);
4786   - // if (maskcanvas != null || maskcanvas != undefined)
4787   - // document.getElementById('canvasDiv').removeChild(maskcanvas);
4788   - // }
4789   -
4790   - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
4791   - // for (var i = 0; i < modestyCanvases.length; i++) {
4792   - // modestyCanvases[i].remove();
4793   - // }
4794   - // });
4795   - // //remove modesty canavs
4796   - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
4797   - // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
4798   - // for (var j = 0; j < modestyCanvases.length; j++) {
4799   - // modestyCanvases[j].remove();
4800   - // }
4801   - // }
4802   - //}
4803   -
4804   - for (var i = 1; i < 7; i++) {
4805   -
4806   - var id;
4807   - var maskId;
  4755 + if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) {
  4756 + angular.forEach($scope.ColoredImageSRC, function (value, key) {
4808 4757  
4809   - id = 'imageCanvas' + i;
4810   - maskId = 'imageCanvas' + i + '_mci';
  4758 + var id;
  4759 + var maskId;
  4760 + if (value.haveMirror == 'true') {
  4761 + id = 'imageCanvas' + value.bodyRegionId + '_MR';
  4762 + maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci'
  4763 + }
  4764 + else {
  4765 + id = 'imageCanvas' + value.bodyRegionId;
  4766 + maskId = 'imageCanvas' + value.bodyRegionId + '_mci';
  4767 + }
4811 4768  
4812   - var canvas = document.getElementById(id);
4813   - if (canvas != null || canvas != undefined)
4814   - document.getElementById('canvasDiv').removeChild(canvas);
  4769 + var canvas = document.getElementById(id);
  4770 + if (canvas != null || canvas != undefined) {
  4771 + document.getElementById('canvasDiv').removeChild(canvas);
  4772 + }
4815 4773  
4816   - var maskcanvas = document.getElementById(maskId);
4817   - if (maskcanvas != null || maskcanvas != undefined)
4818   - document.getElementById('canvasDiv').removeChild(maskcanvas);
  4774 + var maskcanvas = document.getElementById(maskId);
  4775 + if (maskcanvas != null || maskcanvas != undefined) {
  4776 + document.getElementById('canvasDiv').removeChild(maskcanvas);
4819 4777  
  4778 + }
4820 4779 if (i == 4 || i == 5 || i == 6) {
4821 4780 id = 'imageCanvas' + i + '_MR';
4822 4781 maskId = 'imageCanvas' + i + '_MR_mci';
... ... @@ -4830,6 +4789,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4830 4789 document.getElementById('canvasDiv').removeChild(maskcanvas);
4831 4790 }
4832 4791  
  4792 + var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
  4793 + for (var i = 0; i < modestyCanvases.length; i++) {
  4794 + modestyCanvases[i].remove();
  4795 + }
  4796 + });
4833 4797 //remove modesty canavs
4834 4798 var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']");
4835 4799 if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) {
... ... @@ -4838,6 +4802,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4838 4802 }
4839 4803 }
4840 4804 }
  4805 +
  4806 +
4841 4807 }
4842 4808  
4843 4809 $scope.terminateCurrentlyRunningWPs = function () {
... ... @@ -4863,6 +4829,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4863 4829 // $rootScope.isListManagerSelected = false;
4864 4830 $rootScope.CloseListManager();
4865 4831  
  4832 + $rootScope.isHighlightBodyByBodySystem = false;
  4833 +
4866 4834 if ($rootScope.isHighLight == true) {
4867 4835  
4868 4836 }
... ... @@ -4928,6 +4896,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4928 4896 $rootScope.CloseListManager();
4929 4897  
4930 4898  
  4899 + $rootScope.isHighlightBodyByBodySystem = false;
  4900 +
  4901 +
4931 4902 if ($rootScope.isNormalMode == true) {
4932 4903  
4933 4904 }
... ... @@ -4985,6 +4956,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4985 4956  
4986 4957 $scope.enableExtract = function () {
4987 4958  
  4959 + $rootScope.isHighlightBodyByBodySystem = false;
  4960 +
  4961 +
4988 4962 $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop();
4989 4963  
4990 4964 $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft();
... ... @@ -5544,6 +5518,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5544 5518 // $rootScope.isListManagerSelected = false;
5545 5519 $rootScope.CloseListManager();
5546 5520  
  5521 + $rootScope.isHighlightBodyByBodySystem = false;
  5522 +
  5523 +
  5524 +
5547 5525 $rootScope.isLoading = true;
5548 5526 $('#spinner').css('visibility', 'visible');
5549 5527  
... ... @@ -5719,6 +5697,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5719 5697 //$rootScope.isListManagerSelected = false;
5720 5698 $rootScope.CloseListManager();
5721 5699  
  5700 + $rootScope.isHighlightBodyByBodySystem = false;
  5701 +
5722 5702  
5723 5703 $rootScope.isLoading = true;
5724 5704 $('#spinner').css('visibility', 'visible');
... ... @@ -7299,7 +7279,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7299 7279 $scope.$on('listManagerEvent', function (event, data) {
7300 7280  
7301 7281 $('#spinner').css('visibility', 'visible');
7302   - console.log('listManagerEvent')
  7282 + console.log('listManagerEvent');
  7283 +
  7284 +
  7285 +
7303 7286 if ($rootScope.islistManagerEventAlredayDispachted == true) {
7304 7287  
7305 7288  
... ... @@ -7410,6 +7393,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7410 7393 $rootScope.isLoading = true;
7411 7394  
7412 7395 $('#spinner').css('visibility', 'visible');
  7396 +
  7397 + $rootScope.isHighlightBodyByBodySystem = false;
  7398 +
7413 7399 //1.
7414 7400 $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value;
7415 7401 console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber)
... ...