Commit 9779db4363b123f4f7f1428bac8723461843da3a

Authored by Birendra Kumar
2 parents 1498e267 5af49ee8

Merge branch 'Bug#22561' into AIA_Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -687,9 +687,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -687,9 +687,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
687 //da-body-views functions 687 //da-body-views functions
688 688
689 $scope.openBodyView = function (damoduledata) { 689 $scope.openBodyView = function (damoduledata) {
690 - document.getElementById('index').style.pointerEvents = "none"; 690 + document.getElementById('index').style.pointerEvents = "none";
691 document.getElementById('index').style.opacity = "0.7"; 691 document.getElementById('index').style.opacity = "0.7";
692 -  
693 $scope.daOpenInOtherModules = damoduledata; 692 $scope.daOpenInOtherModules = damoduledata;
694 var windowviewid = $rootScope.MULTI_VIEW_ID; 693 var windowviewid = $rootScope.MULTI_VIEW_ID;
695 694
@@ -1955,7 +1954,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -1955,7 +1954,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1955 $('#transparencyScale_' + windowviewid).css('visibility', 'visible'); 1954 $('#transparencyScale_' + windowviewid).css('visibility', 'visible');
1956 } 1955 }
1957 else { 1956 else {
1958 - canDiv.innerHTML = ''; 1957 + // canDiv.innerHTML = '';COMMENTED TO MAINTAIN ANNOTATION TOOLBAR HISTORY ON HIGHLIGHT TO NORMAL MODE(Bug #22561)
  1958 + $scope.flushCanvas(windowviewid);
1959 //remove transparency scale 1959 //remove transparency scale
1960 $('#transparencyScale_' + windowviewid).css('visibility', 'hidden'); 1960 $('#transparencyScale_' + windowviewid).css('visibility', 'hidden');
1961 } 1961 }
@@ -3678,19 +3678,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -3678,19 +3678,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3678 if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) { 3678 if ($scope.GetwindowStoreData(windowviewid,'multiAnnotationIsON') == true) {
3679 //on layer change we need the fresh data not the updated one 3679 //on layer change we need the fresh data not the updated one
3680 if ($scope.isLayerChange == true) { 3680 if ($scope.isLayerChange == true) {
3681 - if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) { 3681 + if ($rootScope.isAnnotatiomToolBarPopupActive == true && (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined)) {
  3682 +
  3683 + grayImageDataVar = updatedGrayDataList[bodyRegionId - 1];
  3684 + }
  3685 +
  3686 + else if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) {
3682 grayImageDataVar = grayImageMRDataList[bodyRegionId]; 3687 grayImageDataVar = grayImageMRDataList[bodyRegionId];
3683 } 3688 }
3684 } 3689 }
3685 else { 3690 else {
3686 if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined) { 3691 if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined) {
3687 3692
3688 - if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) { 3693 + if (grayImageMRDataList[bodyRegionId] != null || grayImageMRDataList[bodyRegionId] != undefined) {
3689 grayImageDataVar = grayImageMRDataList[bodyRegionId]; 3694 grayImageDataVar = grayImageMRDataList[bodyRegionId];
3690 } 3695 }
3691 } 3696 }
3692 else { 3697 else {
3693 - if (updatedGrayMRDataList[bodyRegionId] != null || updatedGrayMRDataList[bodyRegionId] != undefined) { 3698 + if (updatedGrayMRDataList[bodyRegionId] != null || updatedGrayMRDataList[bodyRegionId] != undefined) {
3694 grayImageDataVar = updatedGrayMRDataList[bodyRegionId] 3699 grayImageDataVar = updatedGrayMRDataList[bodyRegionId]
3695 } 3700 }
3696 } 3701 }
@@ -3710,23 +3715,28 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -3710,23 +3715,28 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3710 3715
3711 //on layer change we need the fresh data not the updated one 3716 //on layer change we need the fresh data not the updated one
3712 if ($scope.isLayerChange == true) { 3717 if ($scope.isLayerChange == true) {
3713 - if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {  
3714 - grayImageDataVar = grayImageDataList[bodyRegionId - 1]; 3718 + if ($rootScope.isAnnotatiomToolBarPopupActive == true && (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined)) {
  3719 +
  3720 + grayImageDataVar = updatedGrayDataList[bodyRegionId - 1];
  3721 + }
  3722 +
  3723 + else if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
  3724 + grayImageDataVar = grayImageDataList[bodyRegionId - 1];
3715 3725
3716 } 3726 }
3717 3727
3718 } else { 3728 } else {
3719 // 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 3729 // 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
3720 //and then highlight the previously selected body regions at the time of normal mode. 3730 //and then highlight the previously selected body regions at the time of normal mode.
3721 - if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined) {  
3722 -  
3723 - if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) { 3731 + if (updatedGrayDataList[bodyRegionId - 1] == null || updatedGrayDataList[bodyRegionId - 1] == undefined)
  3732 + {
  3733 + if (grayImageDataList[bodyRegionId - 1] != null || grayImageDataList[bodyRegionId - 1] != undefined) {
3724 grayImageDataVar = grayImageDataList[bodyRegionId - 1]; 3734 grayImageDataVar = grayImageDataList[bodyRegionId - 1];
3725 } 3735 }
3726 3736
3727 } 3737 }
3728 else { 3738 else {
3729 - if (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined) { 3739 + if (updatedGrayDataList[bodyRegionId - 1] != null || updatedGrayDataList[bodyRegionId - 1] != undefined) {
3730 // for normal case means without interdepency button case. 3740 // for normal case means without interdepency button case.
3731 grayImageDataVar = updatedGrayDataList[bodyRegionId - 1]; 3741 grayImageDataVar = updatedGrayDataList[bodyRegionId - 1];
3732 } 3742 }
@@ -6519,7 +6529,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -6519,7 +6529,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
6519 // History Maintained Issue// 6529 // History Maintained Issue//
6520 6530
6521 $rootScope.getAnnotationTextBasedOnSelectedBodyRegion = function (event) { 6531 $rootScope.getAnnotationTextBasedOnSelectedBodyRegion = function (event) {
6522 - 6532 + if (event.ctrlKey) {
  6533 + $scope.SetwindowStoreData(windowviewid, 'multiAnnotationIsON')
  6534 + }
6523 var len= (event.currentTarget.id).split("_").length; 6535 var len= (event.currentTarget.id).split("_").length;
6524 var windowviewid = (event.currentTarget.id).split("_")[len-1]; 6536 var windowviewid = (event.currentTarget.id).split("_")[len-1];
6525 6537
@@ -6599,7 +6611,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -6599,7 +6611,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
6599 if (TermAnnotationText.length>0) { 6611 if (TermAnnotationText.length>0) {
6600 $scope.createDynamicSpeechBubble(event, event.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, event.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid) 6612 $scope.createDynamicSpeechBubble(event, event.pageX + horizontlScrollPosition - $('#canvasDivDA_' + windowviewid).offset().left, event.pageY + verticalScrollPosition - $('#canvasDivDA_' + windowviewid).offset().top, true, 0, 0,windowviewid)
6601 } 6613 }
  6614 + var previousHighlightList = $scope.GetwindowStoreData(windowviewid, 'previousHighlightList');
6602 6615
  6616 + previousHighlightList.push(RGBColor);
  6617 + // $scope.GetwindowStoreData(windowviewid, 'previousHighlightList', previousHighlightList);
  6618 + if ($scope.GetwindowStoreData(windowviewid,'isHighLight') == true) {
  6619 + $scope.highLightBodyBasedOnIcolor(RGBColor, windowviewid);
  6620 + }
6603 } 6621 }
6604 6622
6605 $rootScope.setSelectedBodyRegionData = function (windowviewid) { 6623 $rootScope.setSelectedBodyRegionData = function (windowviewid) {
@@ -7777,7 +7795,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -7777,7 +7795,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
7777 } 7795 }
7778 7796
7779 $scope.enableNormalMode = function (windowviewid) { 7797 $scope.enableNormalMode = function (windowviewid) {
7780 - $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]); 7798 + // $scope.SetwindowStoreData(windowviewid,'previousHighlightList',[]);
7781 7799
7782 $('#btnTranparency_' + windowviewid).removeClass("disabled"); 7800 $('#btnTranparency_' + windowviewid).removeClass("disabled");
7783 $('#btnTranparency_' + windowviewid).css("pointer-events", "auto"); 7801 $('#btnTranparency_' + windowviewid).css("pointer-events", "auto");