From c0f761fffe3371e672b438073e83147f2e7a9394 Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 23 Aug 2016 11:56:03 +0530 Subject: [PATCH] highlight issue on layer change is fixed. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index e8f06e5..01a2553 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -1163,6 +1163,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo FlipedImgCanvas.addEventListener('click', function (evt) { + //to get correct data on multihighlight highlight + if($scope.isLayerChange == true) + { + $scope.isLayerChange = false; + } + if (evt.ctrlKey) { $rootScope.multiAnnotationIsON = true; } @@ -1401,12 +1407,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); - $timeout(function () { + //$timeout(function () { console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) $rootScope.isHighLight = true; - - $scope.highLightBody() - }, 500); + console.log('just before highLightBody call'); + $scope.highLightBody(); + console.log('just after highLightBody call'); + //}, 500); } } } @@ -1490,6 +1497,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo imgCanvas.addEventListener('click', function (evt) { + + if ($scope.isLayerChange == true) { + $scope.isLayerChange = false; + } + if (evt.ctrlKey) { $rootScope.multiAnnotationIsON = true; } @@ -1730,12 +1742,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); - $timeout(function () { + //$timeout(function () { console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) $rootScope.isHighLight = true; - - $scope.highLightBody() - }, 500); + console.log('just before highLightBody call'); + $scope.highLightBody(); + console.log('just after highLightBody call'); + //}, 500); } } } @@ -2024,7 +2037,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.multiAnnotationIsON == true) { - + //on layer change we need the fresh data not the updated one if ($scope.isLayerChange == true) { if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; @@ -2065,6 +2078,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.multiAnnotationIsON == true) { + //on layer change we need the fresh data not the updated one if ($scope.isLayerChange == true) { if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; @@ -2432,7 +2446,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#btnHighLight').removeClass('btn btn-black'); $('#btnHighLight').addClass('btn-primary'); - $scope.highLightBody(); + console.log('highLightBody call from DisableProgressBar') + // $scope.highLightBody(); @@ -4636,6 +4651,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } else { + console.log('highLightBody from enableHighlight') $timeout(function () { $scope.highLightBody() }, 50); } @@ -4709,6 +4725,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } //4. + console.log('highLightBody from enableExtract') $scope.highLightBody(); @@ -6101,6 +6118,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.isHighLight == false) { //color the body gray $rootScope.isHighLight = true + console.log('highLightBody from HighlightBodysystem') $scope.highLightBody(); } //now highlight the selected body system in whole body -- libgit2 0.21.4