Commit 61138e679e0037cb61d1a933711e9a25ee88b404
Merge branch 'MaintainHighlightOnLayerChange1' into Develop
Showing
1 changed file
with
61 additions
and
75 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -2258,13 +2258,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2258 | 2258 | |
2259 | 2259 | if ($scope.doAligneCanvasWithTerm == true) { |
2260 | 2260 | //debugger; |
2261 | - if ($scope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) | |
2261 | + if ( $rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) | |
2262 | 2262 | |
2263 | 2263 | $rootScope.isLoading = false; |
2264 | 2264 | |
2265 | - $('#spinner').css('visibility', 'hidden'); | |
2265 | + $('#spinner').css('visibility', 'hidden'); | |
2266 | 2266 | |
2267 | - $scope.isHighlightBodyByBodySystem = false; | |
2267 | + //$rootScope.isHighlightBodyByBodySystem = false; | |
2268 | 2268 | |
2269 | 2269 | if ($rootScope.isListManagerSelected == true) |
2270 | 2270 | $scope.aligneCanvasWithTerm(); |
... | ... | @@ -2418,7 +2418,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2418 | 2418 | |
2419 | 2419 | |
2420 | 2420 | //if listanager is visisble then close it |
2421 | - $rootScope.isListManagerSelected = false; | |
2421 | + // $rootScope.isListManagerSelected = false; | |
2422 | 2422 | |
2423 | 2423 | $rootScope.CloseListManager(); |
2424 | 2424 | |
... | ... | @@ -2542,7 +2542,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2542 | 2542 | $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) |
2543 | 2543 | $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) |
2544 | 2544 | |
2545 | - if ($scope.isHighlightBodyByBodySystem) { | |
2545 | + if ( $rootScope.isHighlightBodyByBodySystem) { | |
2546 | 2546 | $timeout(function () { $scope.DisableProgressBar() }, 20000); |
2547 | 2547 | } |
2548 | 2548 | else |
... | ... | @@ -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); | |
4755 | + if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { | |
4756 | + angular.forEach($scope.ColoredImageSRC, function (value, key) { | |
4775 | 4757 | |
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; | |
4808 | - | |
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(); |
... | ... | @@ -5254,7 +5228,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5254 | 5228 | //} |
5255 | 5229 | |
5256 | 5230 | |
5257 | - if (($scope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | |
5231 | + if (( $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | |
5258 | 5232 | |
5259 | 5233 | |
5260 | 5234 | $scope.isLoading = true; |
... | ... | @@ -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'); |
... | ... | @@ -6973,7 +6953,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6973 | 6953 | |
6974 | 6954 | |
6975 | 6955 | //NIKITA |
6976 | - $scope.isHighlightBodyByBodySystem = true; | |
6956 | + $rootScope.isHighlightBodyByBodySystem = true; | |
6977 | 6957 | $scope.systemMatchedTermList = new jinqJs() |
6978 | 6958 | .from($rootScope.BodySystemData.BodySystem.BodySystemTerm) |
6979 | 6959 | .where('_SystemNumber == ' + event.currentTarget.id) |
... | ... | @@ -6985,14 +6965,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6985 | 6965 | console.log('highLightBody from HighlightBodyByBodySystem') |
6986 | 6966 | $scope.highLightBody(); |
6987 | 6967 | } |
6988 | - //now highlight the selected body system in whole body | |
6968 | + | |
6989 | 6969 | |
6990 | 6970 | |
6991 | 6971 | //$rootScope.isLoading = true; |
6992 | 6972 | $('#spinner').css('visibility', 'visible'); |
6993 | 6973 | |
6994 | 6974 | //NIKITA |
6995 | - // $scope.isHighlightBodyByBodySystem = true; | |
6975 | + // $rootScope.isHighlightBodyByBodySystem = true; | |
6996 | 6976 | |
6997 | 6977 | //if (systemMatchedTermList != null || systemMatchedTermList != undefined) { |
6998 | 6978 | |
... | ... | @@ -7289,7 +7269,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7289 | 7269 | $("#canvasDiv").scrollTop(scrolly); |
7290 | 7270 | $("#canvasDiv").scrollLeft(scrollx); |
7291 | 7271 | |
7292 | - if (($scope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | |
7272 | + if (( $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { | |
7293 | 7273 | $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100); |
7294 | 7274 | } |
7295 | 7275 | |
... | ... | @@ -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) | ... | ... |