Commit eeb052647cc1310778d180967e2518d5e1121822
Merge branch 'highlightIssueOnLayerChange' of http://52.6.196.163/ADAM/AIAHTML5 into HighLightIssues
Showing
1 changed file
with
67 additions
and
22 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -1126,6 +1126,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1126 | 1126 | |
1127 | 1127 | FlipedImgCanvas.addEventListener('click', function (evt) { |
1128 | 1128 | |
1129 | + //to get correct data on multihighlight highlight | |
1130 | + if($scope.isLayerChange == true) | |
1131 | + { | |
1132 | + $scope.isLayerChange = false; | |
1133 | + } | |
1134 | + | |
1129 | 1135 | if (evt.ctrlKey) { |
1130 | 1136 | $rootScope.multiAnnotationIsON = true; |
1131 | 1137 | } |
... | ... | @@ -1364,12 +1370,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1364 | 1370 | |
1365 | 1371 | $rootScope.isLoading = true; |
1366 | 1372 | $('#spinner').css('visibility', 'visible'); |
1367 | - $timeout(function () { | |
1368 | - console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1373 | + //$timeout(function () { | |
1374 | + console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1369 | 1375 | $rootScope.isHighLight = true; |
1370 | - | |
1371 | - $scope.highLightBody() | |
1372 | - }, 500); | |
1376 | + console.log('just before highLightBody call'); | |
1377 | + $scope.highLightBody(); | |
1378 | + console.log('just after highLightBody call'); | |
1379 | + //}, 500); | |
1373 | 1380 | } |
1374 | 1381 | } |
1375 | 1382 | } |
... | ... | @@ -1447,6 +1454,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1447 | 1454 | |
1448 | 1455 | imgCanvas.addEventListener('click', function (evt) { |
1449 | 1456 | |
1457 | + | |
1458 | + if ($scope.isLayerChange == true) { | |
1459 | + $scope.isLayerChange = false; | |
1460 | + } | |
1461 | + | |
1450 | 1462 | if (evt.ctrlKey) { |
1451 | 1463 | $rootScope.multiAnnotationIsON = true; |
1452 | 1464 | } |
... | ... | @@ -1678,12 +1690,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1678 | 1690 | |
1679 | 1691 | $rootScope.isLoading = true; |
1680 | 1692 | $('#spinner').css('visibility', 'visible'); |
1681 | - $timeout(function () { | |
1682 | - console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1693 | + //$timeout(function () { | |
1694 | + console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1683 | 1695 | $rootScope.isHighLight = true; |
1684 | - | |
1685 | - $scope.highLightBody() | |
1686 | - }, 500); | |
1696 | + console.log('just before highLightBody call'); | |
1697 | + $scope.highLightBody(); | |
1698 | + console.log('just after highLightBody call'); | |
1699 | + //}, 500); | |
1687 | 1700 | } |
1688 | 1701 | } |
1689 | 1702 | } |
... | ... | @@ -1929,6 +1942,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1929 | 1942 | |
1930 | 1943 | $scope.HighlightBodyByTermList = function (TermList) { |
1931 | 1944 | |
1945 | + //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) { | |
1946 | + // $rootScope.updatedGrayMRDataList = null; | |
1947 | + // $rootScope.updatedGrayMRDataList = []; | |
1948 | + //} | |
1949 | + //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) { | |
1950 | + // $rootScope.updatedGrayDataList = null; | |
1951 | + // $rootScope.updatedGrayDataList = []; | |
1952 | + //} | |
1932 | 1953 | |
1933 | 1954 | console.log('HighlightBodyByTermList is called'); |
1934 | 1955 | |
... | ... | @@ -1974,6 +1995,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1974 | 1995 | |
1975 | 1996 | |
1976 | 1997 | if ($rootScope.multiAnnotationIsON == true) { |
1998 | + //on layer change we need the fresh data not the updated one | |
1999 | + if ($scope.isLayerChange == true) { | |
2000 | + if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { | |
2001 | + grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | |
2002 | + } | |
2003 | + } | |
2004 | + else | |
2005 | + | |
2006 | + { | |
1977 | 2007 | if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { |
1978 | 2008 | |
1979 | 2009 | if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { |
... | ... | @@ -1986,6 +2016,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1986 | 2016 | } |
1987 | 2017 | } |
1988 | 2018 | } |
2019 | + } | |
1989 | 2020 | else { |
1990 | 2021 | if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { |
1991 | 2022 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
... | ... | @@ -2005,21 +2036,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2005 | 2036 | |
2006 | 2037 | if ($rootScope.multiAnnotationIsON == true) { |
2007 | 2038 | |
2008 | - // this code is for the case where user first click on normal mode then extract then again highlight then we need to call highlight body in gray mode | |
2009 | - //and then highlight the previously selected body regions at the time of normal mode. | |
2010 | - if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | |
2011 | - | |
2039 | + //on layer change we need the fresh data not the updated one | |
2040 | + if ($scope.isLayerChange == true) { | |
2012 | 2041 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
2013 | 2042 | grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; |
2043 | + | |
2014 | 2044 | } |
2015 | 2045 | |
2016 | - } | |
2017 | - else { | |
2018 | - if ($rootScope.updatedGrayDataList[bodyRegionId - 1] != null || $rootScope.updatedGrayDataList[bodyRegionId - 1] != undefined) { | |
2019 | - // for normal case means without interdepency button case. | |
2020 | - grayImageDataVar = $rootScope.updatedGrayDataList[bodyRegionId - 1]; | |
2046 | + } else { | |
2047 | + // this code is for the case where user first click on normal mode then extract then again highlight then we need to call highlight body in gray mode | |
2048 | + //and then highlight the previously selected body regions at the time of normal mode. | |
2049 | + if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | |
2050 | + | |
2051 | + if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { | |
2052 | + grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; | |
2053 | + } | |
2054 | + | |
2021 | 2055 | } |
2022 | - } | |
2056 | + else { | |
2057 | + if ($rootScope.updatedGrayDataList[bodyRegionId - 1] != null || $rootScope.updatedGrayDataList[bodyRegionId - 1] != undefined) { | |
2058 | + // for normal case means without interdepency button case. | |
2059 | + grayImageDataVar = $rootScope.updatedGrayDataList[bodyRegionId - 1]; | |
2060 | + } | |
2061 | + } | |
2062 | + } | |
2023 | 2063 | } |
2024 | 2064 | else |
2025 | 2065 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
... | ... | @@ -2239,6 +2279,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2239 | 2279 | //layer change function |
2240 | 2280 | $scope.LayerChange = function () { |
2241 | 2281 | |
2282 | + $scope.isLayerChange = true; | |
2242 | 2283 | $rootScope.isLoading = true; |
2243 | 2284 | $('#spinner').css('visibility', 'visible'); |
2244 | 2285 | |
... | ... | @@ -2365,7 +2406,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2365 | 2406 | $('#btnHighLight').removeClass('btn btn-black'); |
2366 | 2407 | $('#btnHighLight').addClass('btn-primary'); |
2367 | 2408 | |
2368 | - $scope.highLightBody(); | |
2409 | + console.log('highLightBody call from DisableProgressBar') | |
2410 | + // $scope.highLightBody(); | |
2369 | 2411 | |
2370 | 2412 | |
2371 | 2413 | |
... | ... | @@ -4570,6 +4612,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4570 | 4612 | |
4571 | 4613 | } |
4572 | 4614 | else { |
4615 | + console.log('highLightBody from enableHighlight') | |
4573 | 4616 | $timeout(function () { $scope.highLightBody() }, 50); |
4574 | 4617 | } |
4575 | 4618 | |
... | ... | @@ -4643,6 +4686,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4643 | 4686 | } |
4644 | 4687 | |
4645 | 4688 | //4. |
4689 | + console.log('highLightBody from enableExtract') | |
4646 | 4690 | $scope.highLightBody(); |
4647 | 4691 | |
4648 | 4692 | |
... | ... | @@ -4903,7 +4947,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4903 | 4947 | } |
4904 | 4948 | |
4905 | 4949 | }); |
4906 | - | |
4950 | + console.log('HighlightBodyByTermList call with multiTermList') | |
4907 | 4951 | |
4908 | 4952 | $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80); |
4909 | 4953 | } |
... | ... | @@ -6030,6 +6074,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6030 | 6074 | if ($rootScope.isHighLight == false) { |
6031 | 6075 | //color the body gray |
6032 | 6076 | $rootScope.isHighLight = true |
6077 | + console.log('highLightBody from HighlightBodysystem') | |
6033 | 6078 | $scope.highLightBody(); |
6034 | 6079 | } |
6035 | 6080 | //now highlight the selected body system in whole body | ... | ... |