Commit 8ee1ce165c026b18d32cbbc75f0de237e0f3c665
1 parent
9de5833e
case:
Highlight on 0th layer> click anywhere to highlight> extract> again highlight and then layer change. It shows changed layer Body but in a while it comes back to the 0th layer view with previously highlighted portion. Fix: getting grayiamge data not from updated gray data fro layer change. this partially resolves issue. but the highloghtbody is called more than once. need to see.
Showing
1 changed file
with
40 additions
and
13 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -1402,7 +1402,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1402 | 1402 | $rootScope.isLoading = true; |
1403 | 1403 | $('#spinner').css('visibility', 'visible'); |
1404 | 1404 | $timeout(function () { |
1405 | - console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1405 | + console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1406 | 1406 | $rootScope.isHighLight = true; |
1407 | 1407 | |
1408 | 1408 | $scope.highLightBody() |
... | ... | @@ -1731,7 +1731,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1731 | 1731 | $rootScope.isLoading = true; |
1732 | 1732 | $('#spinner').css('visibility', 'visible'); |
1733 | 1733 | $timeout(function () { |
1734 | - console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1734 | + console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1735 | 1735 | $rootScope.isHighLight = true; |
1736 | 1736 | |
1737 | 1737 | $scope.highLightBody() |
... | ... | @@ -1986,6 +1986,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1986 | 1986 | |
1987 | 1987 | $scope.HighlightBodyByTermList = function (TermList) { |
1988 | 1988 | |
1989 | + //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) { | |
1990 | + // $rootScope.updatedGrayMRDataList = null; | |
1991 | + // $rootScope.updatedGrayMRDataList = []; | |
1992 | + //} | |
1993 | + //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) { | |
1994 | + // $rootScope.updatedGrayDataList = null; | |
1995 | + // $rootScope.updatedGrayDataList = []; | |
1996 | + //} | |
1989 | 1997 | |
1990 | 1998 | console.log('HighlightBodyByTermList is called'); |
1991 | 1999 | |
... | ... | @@ -2016,6 +2024,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2016 | 2024 | |
2017 | 2025 | |
2018 | 2026 | if ($rootScope.multiAnnotationIsON == true) { |
2027 | + | |
2028 | + if ($scope.isLayerChange == true) { | |
2029 | + if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { | |
2030 | + grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | |
2031 | + } | |
2032 | + } | |
2033 | + else | |
2034 | + | |
2035 | + { | |
2019 | 2036 | if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { |
2020 | 2037 | |
2021 | 2038 | if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { |
... | ... | @@ -2028,6 +2045,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2028 | 2045 | } |
2029 | 2046 | } |
2030 | 2047 | } |
2048 | + } | |
2031 | 2049 | else { |
2032 | 2050 | if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { |
2033 | 2051 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
... | ... | @@ -2047,21 +2065,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2047 | 2065 | |
2048 | 2066 | if ($rootScope.multiAnnotationIsON == true) { |
2049 | 2067 | |
2050 | - // 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 | |
2051 | - //and then highlight the previously selected body regions at the time of normal mode. | |
2052 | - if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | |
2053 | - | |
2068 | + if ($scope.isLayerChange == true) { | |
2054 | 2069 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
2055 | 2070 | grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; |
2071 | + | |
2056 | 2072 | } |
2057 | 2073 | |
2058 | - } | |
2059 | - else { | |
2060 | - if ($rootScope.updatedGrayDataList[bodyRegionId - 1] != null || $rootScope.updatedGrayDataList[bodyRegionId - 1] != undefined) { | |
2061 | - // for normal case means without interdepency button case. | |
2062 | - grayImageDataVar = $rootScope.updatedGrayDataList[bodyRegionId - 1]; | |
2074 | + } else { | |
2075 | + // 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 | |
2076 | + //and then highlight the previously selected body regions at the time of normal mode. | |
2077 | + if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | |
2078 | + | |
2079 | + if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { | |
2080 | + grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; | |
2081 | + } | |
2082 | + | |
2063 | 2083 | } |
2064 | - } | |
2084 | + else { | |
2085 | + if ($rootScope.updatedGrayDataList[bodyRegionId - 1] != null || $rootScope.updatedGrayDataList[bodyRegionId - 1] != undefined) { | |
2086 | + // for normal case means without interdepency button case. | |
2087 | + grayImageDataVar = $rootScope.updatedGrayDataList[bodyRegionId - 1]; | |
2088 | + } | |
2089 | + } | |
2090 | + } | |
2065 | 2091 | } |
2066 | 2092 | else |
2067 | 2093 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
... | ... | @@ -2281,6 +2307,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2281 | 2307 | //layer change function |
2282 | 2308 | $scope.LayerChange = function () { |
2283 | 2309 | |
2310 | + $scope.isLayerChange = true; | |
2284 | 2311 | $rootScope.isLoading = true; |
2285 | 2312 | $('#spinner').css('visibility', 'visible'); |
2286 | 2313 | |
... | ... | @@ -4947,7 +4974,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4947 | 4974 | } |
4948 | 4975 | |
4949 | 4976 | }); |
4950 | - | |
4977 | + console.log('HighlightBodyByTermList call with multiTermList') | |
4951 | 4978 | |
4952 | 4979 | $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80); |
4953 | 4980 | } | ... | ... |