From 8ee1ce165c026b18d32cbbc75f0de237e0f3c665 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 22 Aug 2016 18:29:42 +0530 Subject: [PATCH] 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. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 53 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 19808ff..e8f06e5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -1402,7 +1402,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); $timeout(function () { - console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) + console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) $rootScope.isHighLight = true; $scope.highLightBody() @@ -1731,7 +1731,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); $timeout(function () { - console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) + console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) $rootScope.isHighLight = true; $scope.highLightBody() @@ -1986,6 +1986,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.HighlightBodyByTermList = function (TermList) { + //if (($rootScope.updatedGrayMRDataList != null || $rootScope.updatedGrayMRDataList != undefined) && $rootScope.updatedGrayMRDataList.length > 0) { + // $rootScope.updatedGrayMRDataList = null; + // $rootScope.updatedGrayMRDataList = []; + //} + //if (($rootScope.updatedGrayDataList != null || $rootScope.updatedGrayDataList != undefined) && $rootScope.updatedGrayDataList.length > 0) { + // $rootScope.updatedGrayDataList = null; + // $rootScope.updatedGrayDataList = []; + //} console.log('HighlightBodyByTermList is called'); @@ -2016,6 +2024,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.multiAnnotationIsON == true) { + + if ($scope.isLayerChange == true) { + if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { + grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; + } + } + else + + { if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { @@ -2028,6 +2045,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } } + } else { if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; @@ -2047,21 +2065,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.multiAnnotationIsON == true) { - // 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 - //and then highlight the previously selected body regions at the time of normal mode. - if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { - + if ($scope.isLayerChange == true) { if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; + } - } - else { - if ($rootScope.updatedGrayDataList[bodyRegionId - 1] != null || $rootScope.updatedGrayDataList[bodyRegionId - 1] != undefined) { - // for normal case means without interdepency button case. - grayImageDataVar = $rootScope.updatedGrayDataList[bodyRegionId - 1]; + } else { + // 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 + //and then highlight the previously selected body regions at the time of normal mode. + if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { + + if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { + grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; + } + } - } + else { + if ($rootScope.updatedGrayDataList[bodyRegionId - 1] != null || $rootScope.updatedGrayDataList[bodyRegionId - 1] != undefined) { + // for normal case means without interdepency button case. + grayImageDataVar = $rootScope.updatedGrayDataList[bodyRegionId - 1]; + } + } + } } else 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 //layer change function $scope.LayerChange = function () { + $scope.isLayerChange = true; $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -4947,7 +4974,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } }); - + console.log('HighlightBodyByTermList call with multiTermList') $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80); } -- libgit2 0.21.4