Merged
Merge Request #981 · created by Nikita Kulshreshtha


Bug#22561


From Bug#22561 into AIA_Develop

Merged by Birendra Kumar

2 participants



400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -643,9 +643,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
643 643 //da-body-views functions
644 644  
645 645 $scope.openBodyView = function (damoduledata) {
646   - document.getElementById('index').style.pointerEvents = "none";
  646 + document.getElementById('index').style.pointerEvents = "none";
647 647 document.getElementById('index').style.opacity = "0.7";
648   -
649 648 $scope.daOpenInOtherModules = damoduledata;
650 649  
651 650 if ($rootScope.isCallFromOtherModule) {
... ... @@ -2035,7 +2034,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
2035 2034 $('#transparencyScale_' + windowviewid).css('visibility', 'visible');
2036 2035 }
2037 2036 else {
2038   - canDiv.innerHTML = '';
  2037 + // canDiv.innerHTML = '';COMMENTED TO MAINTAIN ANNOTATION TOOLBAR HISTORY ON HIGHLIGHT TO NORMAL MODE(Bug #22561)
  2038 + $scope.flushCanvas(windowviewid);
2039 2039 //remove transparency scale
2040 2040 $('#transparencyScale_' + windowviewid).css('visibility', 'hidden');
2041 2041 }
... ... @@ -3899,19 +3899,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3899 3899 if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) {
3900 3900 //on layer change we need the fresh data not the updated one
3901 3901 if ($scope.isLayerChange == true) {
3902   - if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) {
  3902 + if ($rootScope.isAnnotatiomToolBarPopupActive == true && (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined)) {
  3903 +
  3904 + grayImageDataVar = updatedGrayDataList[bodyRegionId - 1];
  3905 + }
  3906 +
  3907 + else if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) {
3903 3908 grayImageDataVar = grayImageMRDataList[bodyRegionId];
3904 3909 }
3905 3910 }
3906 3911 else {
3907 3912 if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined) {
3908 3913  
3909   - if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) {
  3914 + if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) {
3910 3915 grayImageDataVar = grayImageMRDataList[bodyRegionId];
3911 3916 }
3912 3917 }
3913 3918 else {
3914   - if (updatedGrayMRDataList[bodyRegionId] != null || updatedGrayMRDataList[bodyRegionId] != undefined) {
  3919 + if (updatedGrayMRDataList[bodyRegionId] != null || updatedGrayMRDataList[bodyRegionId] != undefined) {
3915 3920 grayImageDataVar = updatedGrayMRDataList[bodyRegionId]
3916 3921 }
3917 3922 }
... ... @@ -3931,23 +3936,28 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3931 3936  
3932 3937 //on layer change we need the fresh data not the updated one
3933 3938 if ($scope.isLayerChange == true) {
3934   - if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
3935   - grayImageDataVar = grayImageDataList[bodyRegionId - 1];
  3939 + if ($rootScope.isAnnotatiomToolBarPopupActive == true && (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined)) {
  3940 +
  3941 + grayImageDataVar = updatedGrayDataList[bodyRegionId - 1];
  3942 + }
  3943 +
  3944 + else if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
  3945 + grayImageDataVar = grayImageDataList[bodyRegionId - 1];
3936 3946  
3937 3947 }
3938 3948  
3939 3949 } else {
3940 3950 // 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
3941 3951 //and then highlight the previously selected body regions at the time of normal mode.
3942   - if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined) {
3943   -
3944   - if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
  3952 + if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined)
  3953 + {
  3954 + if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
3945 3955 grayImageDataVar = grayImageDataList[bodyRegionId - 1];
3946 3956 }
3947 3957  
3948 3958 }
3949 3959 else {
3950   - if (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined) {
  3960 + if (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined) {
3951 3961 // for normal case means without interdepency button case.
3952 3962 grayImageDataVar = updatedGrayDataList[bodyRegionId - 1];
3953 3963 }
... ... @@ -6740,7 +6750,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
6740 6750 // History Maintained Issue//
6741 6751  
6742 6752 $rootScope.getAnnotationTextBasedOnSelectedBodyRegion = function (event) {
6743   -
  6753 + if (event.ctrlKey) {
  6754 + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON')
  6755 + }
6744 6756 var len= (event.currentTarget.id).split("_").length;
6745 6757 var windowviewid = (event.currentTarget.id).split("_")[len-1];
6746 6758  
... ... @@ -6820,7 +6832,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
6820 6832 if (TermAnnotationText.length>0) {
6821 6833 $scope.createDynamicSpeechBubble(event, event.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, event.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid)
6822 6834 }
  6835 + var previousHighlightList = $scope.GetwindowStoreData(windowviewid, 'previousHighlightList');
6823 6836  
  6837 + previousHighlightList.push(RGBColor);
  6838 + // $scope.GetwindowStoreData(windowviewid, 'previousHighlightList', previousHighlightList);
  6839 + if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == true) {
  6840 + $scope.highLightBodyBasedOnIcolor(RGBColor, windowviewid);
  6841 + }
6824 6842 }
6825 6843  
6826 6844 $rootScope.setSelectedBodyRegionData = function (windowviewid) {
... ... @@ -8036,7 +8054,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8036 8054 }
8037 8055  
8038 8056 $scope.enableNormalMode = function (windowviewid) {
8039   - $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]);
  8057 + // $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]);
8040 8058  
8041 8059 $('#btnTranparency_' + windowviewid).removeClass("disabled");
8042 8060 $('#btnTranparency_' + windowviewid).css("pointer-events", "auto");
... ...