Commit 806793493aca05dcef1f085662ace711462962ea
Save Zoom Activity with TBox for CB
Showing
2 changed files
with
629 additions
and
427 deletions
.gitignore
... | ... | @@ -46,4 +46,5 @@ $tf*/ |
46 | 46 | 400-SOURCECODE/AIAHTML5.ADMIN.Web |
47 | 47 | 400-SOURCECODE/AIAHTML5.ADMIN.API/LogDetailsFile/LicenseCreation/LicenseCreation-30-11-18.txt |
48 | 48 | 400-SOURCECODE/AIAHTML5.Web/Web.config |
49 | +400-SOURCECODE/AIAHTML5.Web/Web.config | |
49 | 50 | 400-SOURCECODE/AIAHTML5.Web/Web.config |
50 | 51 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -150,6 +150,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
150 | 150 | 'moduleName': '', |
151 | 151 | 'mode': '', |
152 | 152 | 'transparencyBounds': [], |
153 | + 'isCallForTransparencyImage':false, | |
153 | 154 | 'layerNumberTransparency': 0, |
154 | 155 | 'transparencyValue': 0, |
155 | 156 | 'transparencyX': 0, |
... | ... | @@ -259,6 +260,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
259 | 260 | 'moduleName': '', |
260 | 261 | 'mode': '', |
261 | 262 | 'transparencyBounds': [], |
263 | + 'isCallForTransparencyImage': false, | |
262 | 264 | 'layerNumberTransparency': 0, |
263 | 265 | 'transparencyValue': 0, |
264 | 266 | 'transparencyX': 0, |
... | ... | @@ -1760,7 +1762,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1760 | 1762 | else { |
1761 | 1763 | |
1762 | 1764 | // for existing DA |
1763 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
1765 | + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); | |
1766 | + | |
1764 | 1767 | $scope.CalculateImageCordinates(viewOrientationId, windowviewid); |
1765 | 1768 | } |
1766 | 1769 | |
... | ... | @@ -1941,7 +1944,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1941 | 1944 | $('#spinner').css('visibility', 'visible'); |
1942 | 1945 | |
1943 | 1946 | //redraw body of respective layer |
1944 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
1947 | + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); | |
1948 | + | |
1945 | 1949 | $scope.CalculateImageCordinates(viewOrientationId, windowviewid); |
1946 | 1950 | |
1947 | 1951 | }, 500); |
... | ... | @@ -2363,9 +2367,25 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2363 | 2367 | if (isListManagerSelected == true) { |
2364 | 2368 | $scope.SetwindowStoreData(windowviewid,'layerNumber',$('#txtLayerNumberDA_' + windowviewid).val()); |
2365 | 2369 | } |
2370 | + | |
2371 | + var lNumber=null; | |
2372 | + if ($scope.GetwindowStoreData(windowviewid, 'isZoomed') && ($scope.GetwindowStoreData(windowviewid, 'isTransparencyBtnClicked') == true || $scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated'))) | |
2373 | + { | |
2374 | + if ($scope.GetwindowStoreData(windowviewid, 'isCallForTransparencyImage') == true) { | |
2375 | + lNumber = $scope.GetwindowStoreData(windowviewid, 'layerNumber'); | |
2366 | 2376 | |
2367 | - var lNumber=$scope.GetwindowStoreData(windowviewid,'layerNumber'); | |
2377 | + } | |
2378 | + else | |
2379 | + lNumber = $scope.GetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw'); | |
2380 | + | |
2381 | + console.log("GetImageSource lNumber IF= " + lNumber) | |
2382 | + } | |
2383 | + else{ | |
2384 | + | |
2385 | + lNumber = $scope.GetwindowStoreData(windowviewid, 'layerNumber'); | |
2386 | + console.log("GetImageSource lNumber = " + lNumber); | |
2368 | 2387 | |
2388 | + } | |
2369 | 2389 | $scope.userInput = parseInt(lNumber); |
2370 | 2390 | |
2371 | 2391 | if (!$rootScope.isCallFromOtherModule) { |
... | ... | @@ -2921,8 +2941,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2921 | 2941 | var isGenderChnage = $scope.GetwindowStoreData(windowviewid,'isGenderChnage'); |
2922 | 2942 | var isViewChange = $scope.GetwindowStoreData(windowviewid,'isViewChange'); |
2923 | 2943 | var isHighlightBodyByBodySystem=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem'); |
2924 | - var isListManagerSelected=$scope.GetwindowStoreData(windowviewid,'isListManagerSelected'); | |
2925 | - if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) { | |
2944 | + var isListManagerSelected = $scope.GetwindowStoreData(windowviewid, 'isListManagerSelected'); | |
2945 | + // var isTBACtive = $scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated'); | |
2946 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated')) { | |
2947 | + | |
2948 | + $scope.DrawTransparencyBox(windowviewid); | |
2949 | + | |
2950 | + } | |
2951 | + else if ($scope.GetwindowStoreData(windowviewid, 'isExtract') == true) { | |
2926 | 2952 | $rootScope.isLoading = true; |
2927 | 2953 | $('#spinner').css('visibility', 'visible'); |
2928 | 2954 | $scope.DisableUI(); |
... | ... | @@ -2935,11 +2961,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2935 | 2961 | |
2936 | 2962 | $rootScope.isLoading = true; |
2937 | 2963 | $('#spinner').css('visibility', 'visible'); |
2938 | - $scope.SetwindowStoreData(windowviewid,'isHighLight',true); | |
2964 | + $scope.SetwindowStoreData(windowviewid, 'isHighLight', true); | |
2939 | 2965 | $scope.DisableUI(); |
2940 | 2966 | $scope.highLightBody(windowviewid); |
2967 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
2968 | + $scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
2969 | + } | |
2941 | 2970 | } |
2942 | 2971 | else { |
2972 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
2973 | + $scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
2974 | + } | |
2943 | 2975 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
2944 | 2976 | if (isHighlightBodyWithCBTermData == true) { |
2945 | 2977 | $scope.ShowCBDataBodyView(windowviewid); |
... | ... | @@ -3424,8 +3456,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3424 | 3456 | var isViewChange = $scope.GetwindowStoreData(windowviewid,'isViewChange'); |
3425 | 3457 | var isHighlightBodyByBodySystem=$scope.GetwindowStoreData(windowviewid,'isHighlightBodyByBodySystem'); |
3426 | 3458 | var isExtract= $scope.GetwindowStoreData(windowviewid,'isExtract') |
3427 | - var isListManagerSelected=$scope.GetwindowStoreData(windowviewid,'isListManagerSelected'); | |
3428 | - if (isExtract == true) { | |
3459 | + var isListManagerSelected = $scope.GetwindowStoreData(windowviewid, 'isListManagerSelected'); | |
3460 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated')) { | |
3461 | + | |
3462 | + $scope.DrawTransparencyBox(windowviewid); | |
3463 | + | |
3464 | + } | |
3465 | + else if (isExtract == true) { | |
3429 | 3466 | $rootScope.isLoading = true; |
3430 | 3467 | $('#spinner').css('visibility', 'visible'); |
3431 | 3468 | $scope.DisableUI(); |
... | ... | @@ -3457,9 +3494,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3457 | 3494 | $scope.highLightBody(windowviewid); |
3458 | 3495 | |
3459 | 3496 | console.log('just after highLightBody call'); |
3497 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
3498 | + $scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
3499 | + } | |
3460 | 3500 | |
3461 | 3501 | } |
3462 | 3502 | else { |
3503 | + if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
3504 | + $scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
3505 | + } | |
3463 | 3506 | var isHighlightBodyWithCBTermData = $scope.GetwindowStoreData(windowviewid, 'isHighlightBodyWithCBTermData'); |
3464 | 3507 | if (isHighlightBodyWithCBTermData == true) { |
3465 | 3508 | $scope.ShowCBDataBodyView(windowviewid); |
... | ... | @@ -3471,13 +3514,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3471 | 3514 | } |
3472 | 3515 | |
3473 | 3516 | //Added Code by sandy to create Draw transparencybox autometically for save CB |
3474 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
3475 | - $scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
3476 | - //$scope.setOriginalDataAndChangeTransparency(windowviewid); | |
3477 | - // finish CB window load | |
3478 | - //$rootScope.DAWindowLoadComplete = true; | |
3479 | - $rootScope.isLoading = true; | |
3480 | - } | |
3517 | + //if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
3518 | + // $scope.CalculateDimensionsAndDrawTBox(windowviewid); | |
3519 | + // //$scope.setOriginalDataAndChangeTransparency(windowviewid); | |
3520 | + // // finish CB window load | |
3521 | + // //$rootScope.DAWindowLoadComplete = true; | |
3522 | + // $rootScope.isLoading = true; | |
3523 | + //} | |
3481 | 3524 | |
3482 | 3525 | } |
3483 | 3526 | |
... | ... | @@ -4698,6 +4741,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4698 | 4741 | //layer change function |
4699 | 4742 | $scope.LayerChange = function (windowviewid) { |
4700 | 4743 | |
4744 | + | |
4701 | 4745 | $scope.DisableUI(); |
4702 | 4746 | $rootScope.CloseListManager(); |
4703 | 4747 | $scope.isLayerChange = true; |
... | ... | @@ -4871,7 +4915,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4871 | 4915 | } |
4872 | 4916 | |
4873 | 4917 | //2. |
4874 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
4918 | + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); | |
4919 | + console.log("CalculateImageCordinates call from 4723"); | |
4920 | + | |
4875 | 4921 | $scope.CalculateImageCordinates(viewOrientationId,windowviewid); |
4876 | 4922 | |
4877 | 4923 | //3. |
... | ... | @@ -5258,7 +5304,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5258 | 5304 | var sub_id_annotation = "black_annotation" + TPspeechBubbleCounter+"_"+windowviewid + '-' + termNumber; |
5259 | 5305 | var pointClicked_annotation = parseInt(x) + parseInt(y); |
5260 | 5306 | var Exists_annotation = $('#canvasDivDA_' + windowviewid).find("div[id=" + pointClicked_annotation + "]").length; |
5261 | - $scope.createSpeechBubbleBasedOnTransparencyWithCtrl(pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation,windowviewid,TPspeechBubbleCounter); | |
5307 | + $scope.createSpeechBubbleBasedOnTransparencyWithCtrl(pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation, windowviewid, TPspeechBubbleCounter); | |
5262 | 5308 | $scope.speechbubbleList.push({ xaxis: x, yaxis: y, ids: sub_id_annotation }); |
5263 | 5309 | $scope.SetwindowStoreData(windowviewid,'speachBubbleArrayAnnotation',$scope.speechList1); |
5264 | 5310 | $('.appendDragg_annotation').draggable({ |
... | ... | @@ -5507,7 +5553,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5507 | 5553 | if ($('#dot_annotation_' + windowviewid).length > 0) { |
5508 | 5554 | $('#dot_annotation_' + windowviewid).show(); |
5509 | 5555 | } |
5510 | - $('#bord_annotation_' + windowviewid).css({ "width": "0px", "display": "block" }); | |
5556 | + //$('#bord_annotation_' + windowviewid).css({ "width": "0px", "display": "block" }); | |
5511 | 5557 | |
5512 | 5558 | if ($('#dot_' + windowviewid).length > 0) { |
5513 | 5559 | $('#dot_' + windowviewid).show(); |
... | ... | @@ -5677,7 +5723,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5677 | 5723 | document.getElementById('sppeachBubble_' + windowviewid + '-' + termNumber).style.top = (Globe[0].currentY) + 'px'; |
5678 | 5724 | } |
5679 | 5725 | |
5680 | - $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation,windowviewid,TPspeechBubbleCounter) { | |
5726 | + $scope.createSpeechBubbleBasedOnTransparencyWithCtrl = function (pointClicked_annotation, Exists_annotation, x, y, sub_id_annotation, windowviewid, TPspeechBubbleCounter) { | |
5681 | 5727 | |
5682 | 5728 | var sppechBubbleHTML_annotation = "<div id ='" + pointClicked_annotation + "' class='com_anno_"+windowviewid+"'><div style='z-index:59000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + TPspeechBubbleCounter + "'></div><div data=" + TPspeechBubbleCounter + " id=" + sub_id_annotation + " class='appendDragg_annotation' style='z-index:60000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size: 12px;background-color:#19100e;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + TPspeechBubbleCounter + " class='dynCross_anno_"+windowviewid+"' style='width:18px' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:59000;' id='bord_annotation" + TPspeechBubbleCounter +"_" + windowviewid+ "'></div></div>"; |
5683 | 5729 | if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) { |
... | ... | @@ -5725,6 +5771,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5725 | 5771 | else { |
5726 | 5772 | $('#canvasDivDA_' + windowviewid).find("div[id=" + pointClicked_annotation + "]").css("display", "block"); |
5727 | 5773 | } |
5774 | + | |
5728 | 5775 | } |
5729 | 5776 | } |
5730 | 5777 | $scope.createSpeechBubbleBasedOnTransparencyWithoutCtrl = function (x, y, windowviewid, termNumber) { |
... | ... | @@ -5989,7 +6036,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5989 | 6036 | |
5990 | 6037 | var currentlayer=$scope.GetwindowStoreData(windowviewid,'currentLayerNumber'); |
5991 | 6038 | //Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
5992 | - if ($('#txtLayerNumberDA_' + windowviewid).val() != 0 && currentlayer != undefined) { | |
6039 | + if ($('#txtLayerNumberDA_' + windowviewid).val() != 0 && currentlayer != undefined && currentlayer != 0) { | |
5993 | 6040 | |
5994 | 6041 | var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers'); |
5995 | 6042 | |
... | ... | @@ -6053,8 +6100,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6053 | 6100 | |
6054 | 6101 | |
6055 | 6102 | function mouseUpListener(e) { |
6056 | - var len= (e.currentTarget.id).split("_").length; | |
6057 | - var windowviewid = (e.currentTarget.id).split("_")[len-1]; | |
6103 | + var len = (e.currentTarget.id).split("_").length; | |
6104 | + var windowviewid = (e.currentTarget.id).split("_")[len - 1]; | |
6058 | 6105 | e.preventDefault(); |
6059 | 6106 | |
6060 | 6107 | //to prevent screen scroll on ipad while drawing TB |
... | ... | @@ -6065,7 +6112,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6065 | 6112 | $scope.SetwindowStoreData(windowviewid, 'IsNormalModeBeforeTBDraw', $scope.GetwindowStoreData(windowviewid, 'isNormalMode')); |
6066 | 6113 | $scope.SetwindowStoreData(windowviewid, 'IsHighlightModeBeforeTBDraw', $scope.GetwindowStoreData(windowviewid, 'isHighlight')); |
6067 | 6114 | |
6068 | - // alert($scope.GetwindowStoreData(windowviewid, 'IsNormalModeBeforeTBDraw')); | |
6115 | + // alert($scope.GetwindowStoreData(windowviewid, 'IsNormalModeBeforeTBDraw')); | |
6069 | 6116 | //$('.com_'+windowviewid).remove(); |
6070 | 6117 | //$('#dot_'+windowviewid).remove(); |
6071 | 6118 | //$('#bord_'+windowviewid).remove(); |
... | ... | @@ -6113,11 +6160,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6113 | 6160 | var previewRectangleWidth = $('.rectangle').width(); |
6114 | 6161 | var previewRectangleHeight = $('.rectangle').height() |
6115 | 6162 | |
6116 | - $scope.SetwindowStoreData(windowviewid,'currentLayerNumber',parseInt($('#txtLayerNumberDA_' + windowviewid).val())); | |
6163 | + $scope.SetwindowStoreData(windowviewid, 'currentLayerNumber', parseInt($('#txtLayerNumberDA_' + windowviewid).val())); | |
6117 | 6164 | |
6118 | 6165 | $('.rectangle').remove(); |
6119 | 6166 | |
6120 | - var currentMousePosition = $scope.getMousePos(e.pageX,e.pageY,windowviewid); | |
6167 | + var currentMousePosition = $scope.getMousePos(e.pageX, e.pageY, windowviewid); | |
6121 | 6168 | |
6122 | 6169 | |
6123 | 6170 | var canavsDivScrollPos = $scope.getCanavsDivScrollPosition(windowviewid); |
... | ... | @@ -6135,11 +6182,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6135 | 6182 | //Save TranparencyBox and slider for CurriculmBuilder |
6136 | 6183 | //$rootScope.commonTBEndX = TransparencyEndX; |
6137 | 6184 | //$rootScope.commonTBEndY = TransparencyBoxEndY; |
6138 | - var transparencyBounds = $scope.GetwindowStoreData(windowviewid,'transparencyBounds'); | |
6139 | - transparencyBounds.push({ | |
6140 | - 'h': $scope.TransparencyEndX, 'x': $scope.TransparencyBoxStartX, | |
6141 | - 'w': $scope.TransparencyBoxEndY, 'y': $scope.TransparencyBoxStartY | |
6142 | - }); | |
6185 | + //var transparencyBounds = $scope.GetwindowStoreData(windowviewid,'transparencyBounds'); | |
6186 | + //transparencyBounds.push({ | |
6187 | + // 'h': $scope.TransparencyEndX, 'x': $scope.TransparencyBoxStartX, | |
6188 | + // 'w': $scope.TransparencyBoxEndY, 'y': $scope.TransparencyBoxStartY | |
6189 | + //}); | |
6190 | + //$scope.SetwindowStoreData(windowviewid, 'transparencyBounds', transparencyBounds); | |
6143 | 6191 | |
6144 | 6192 | if ($scope.TransparencyBoxStartX == $scope.TransparencyEndX && $scope.TransparencyBoxStartY == $scope.TransparencyBoxEndY) { |
6145 | 6193 | |
... | ... | @@ -6164,29 +6212,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6164 | 6212 | $('#btnTranparency_' + windowviewid).removeClass('btn-black'); |
6165 | 6213 | $('#btnTranparency_' + windowviewid).addClass('tButtonActive'); |
6166 | 6214 | |
6167 | - $scope.SetwindowStoreData(windowviewid,'layerNumberBeforeTBDraw',parseInt($('#txtLayerNumberDA_' + windowviewid).val())); | |
6215 | + $scope.SetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw', parseInt($('#txtLayerNumberDA_' + windowviewid).val())); | |
6168 | 6216 | // $scope.layerNumberBeforeTBDraw = parseInt($('#txtLayerNumberDA_' + windowviewid).val()); |
6169 | 6217 | |
6170 | - //draw temp box to store the canvas data with original transparecy | |
6171 | - if (document.getElementById('tempCanvas_' + windowviewid) != null) { | |
6172 | - $('#tempCanvas_' + windowviewid).remove(); | |
6173 | - } | |
6174 | - if (document.getElementById('tempCanvas_'+ windowviewid) == null || document.getElementById('tempCanvas_'+ windowviewid) == undefined) { | |
6175 | - var tempCanvas = document.createElement('canvas'); | |
6176 | - tempCanvas.id = 'tempCanvas_' + windowviewid; | |
6177 | - tempCanvas.height = TransparencyBoxEndY - $scope.startY; | |
6178 | - tempCanvas.width = TransparencyEndX - $scope.startX; | |
6179 | - tempCanvas.style.position = "absolute"; | |
6180 | - tempCanvas.style.left = 200 + 'px'; | |
6181 | - tempCanvas.style.top = 200 + 'px'; | |
6182 | - tempCanvas.style.backgroundColor = "transparent"; | |
6183 | - tempCanvas.style.visibility = 'hidden'; | |
6184 | - tempCanvas.style.border = "black 1px solid"; | |
6185 | - document.getElementById("canvasDivDA_" + windowviewid).appendChild(tempCanvas); | |
6186 | - } | |
6187 | - | |
6218 | + | |
6188 | 6219 | |
6189 | - $scope.SetwindowStoreData(windowviewid,'isTransparencyBtnClicked',false); | |
6220 | + $scope.SetwindowStoreData(windowviewid, 'isTransparencyBtnClicked', false); | |
6190 | 6221 | |
6191 | 6222 | |
6192 | 6223 | |
... | ... | @@ -6210,189 +6241,294 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6210 | 6241 | } |
6211 | 6242 | |
6212 | 6243 | |
6213 | - var new_startx = (TransparencyEndX < $scope.TransparencyBoxStartX) ? TransparencyEndX : $scope.TransparencyBoxStartX; | |
6214 | - var new_starty = (TransparencyBoxEndY < $scope.TransparencyBoxStartY) ? TransparencyBoxEndY : $scope.TransparencyBoxStartY; | |
6215 | - var new_endx = (TransparencyEndX < $scope.TransparencyBoxStartX) ? $scope.TransparencyBoxStartX : TransparencyEndX; | |
6216 | - var new_endy= (TransparencyBoxEndY < $scope.TransparencyBoxStartY) ? $scope.TransparencyBoxStartY:TransparencyBoxEndY ; | |
6217 | - | |
6218 | - $scope.TransparencyBoxStartX = new_startx; | |
6219 | - TransparencyEndX = new_endx; | |
6220 | - $scope.TransparencyBoxStartY = new_starty; | |
6221 | - TransparencyBoxEndY = new_endy; | |
6244 | + var new_startx = (TransparencyEndX < $scope.TransparencyBoxStartX) ? TransparencyEndX : $scope.TransparencyBoxStartX; | |
6245 | + var new_starty = (TransparencyBoxEndY < $scope.TransparencyBoxStartY) ? TransparencyBoxEndY : $scope.TransparencyBoxStartY; | |
6246 | + var new_endx = (TransparencyEndX < $scope.TransparencyBoxStartX) ? $scope.TransparencyBoxStartX : TransparencyEndX; | |
6247 | + var new_endy = (TransparencyBoxEndY < $scope.TransparencyBoxStartY) ? $scope.TransparencyBoxStartY : TransparencyBoxEndY; | |
6222 | 6248 | |
6249 | + $scope.TransparencyBoxStartX = new_startx; | |
6250 | + var TransparencyEndX = new_endx; | |
6251 | + $scope.TransparencyBoxStartY = new_starty; | |
6252 | + var TransparencyBoxEndY = new_endy; | |
6253 | + $scope.TBoxEndX = TransparencyEndX; | |
6254 | + $scope.TBoxEndY = TransparencyBoxEndY; | |
6255 | + $scope.TBHeight = height; | |
6256 | + $scope.TBWidth = width; | |
6257 | + | |
6258 | + $scope.DrawTransparencyBox(windowviewid); | |
6259 | + } | |
6260 | + | |
6261 | + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mousedown", mouseDownListener); | |
6262 | + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mousemove", mouseMoveListener); | |
6263 | + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mouseup", mouseUpListener); | |
6223 | 6264 | |
6224 | 6265 | var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid, 'BodyRegionCordinatesData'); |
6225 | - $.each(BodyRegionDictionary, function (index, value) { | |
6266 | + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchstart", mouseDownListener); | |
6226 | 6267 | |
6268 | + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchmove", mouseMoveListener); | |
6227 | 6269 | |
6228 | - var tBoxDimesions = $scope.getTBoxDimesions($scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, value.X, value.Y, value.Height, value.Width); | |
6270 | + document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchend", mouseUpListener); | |
6271 | + | |
6272 | + | |
6273 | + | |
6274 | + //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. | |
6275 | + $('#btnTranparency_' + windowviewid).removeClass('tButtonActive'); | |
6276 | + $('#btnTranparency_' + windowviewid).addClass('btn-black'); | |
6277 | + $('#btnIdentify_' + windowviewid).removeClass('btn-black'); | |
6278 | + $('#btnIdentify_' + windowviewid).addClass('btn-primary'); | |
6279 | + | |
6280 | + // clear canvas before drawing transparency box | |
6281 | + if ($rootScope.isAnnotationWindowOpen == true) { | |
6282 | + $('#canvasDA_' + windowviewid).removeLayers(); | |
6283 | + var paintCanvasObj = document.getElementById("canvasPaintDA_" + windowviewid); | |
6284 | + if (paintCanvasObj != null) { | |
6285 | + var ctx = paintCanvasObj.getContext("2d"); | |
6286 | + ctx.clearRect(0, 0, 2277, 3248); | |
6287 | + } | |
6288 | + var sktch = $("#canvasPaintDA_" + windowviewid).sketch(); | |
6289 | + $("#canvasPaintDA_" + windowviewid).sketch().actions = []; | |
6290 | + $("#annotationpaintbrushsize").removeClass("activebtncolor"); | |
6291 | + $("#annotationpainteraser").removeClass("activebtncolor"); | |
6292 | + if ($("#DrawMode").hasClass("annotationtoolbartab")) { | |
6293 | + if ($scope.GetwindowStoreData(windowviewid, 'isTBoxModestyVisible') == true) { | |
6294 | + | |
6295 | + $rootScope.switchCanvas(); | |
6229 | 6296 | |
6230 | - var transparencyBoxHeight = tBoxDimesions.transparencyBoxHeight; | |
6231 | - var transparencyBoxWidth = tBoxDimesions.transparencyBoxWidth; | |
6232 | - var transparencyBoxBottom = tBoxDimesions.transparencyBoxBottom; | |
6233 | - var transparencyBoxRight = tBoxDimesions.transparencyBoxRight; | |
6234 | - var bodyRegionRight = tBoxDimesions.bodyRegionRight; | |
6235 | - var bodyRegionBottom = tBoxDimesions.bodyRegionBottom; | |
6236 | - var width = 0; | |
6237 | - var height = 0; | |
6238 | - if (TransparencyEndX < $scope.TransparencyBoxStartX) { | |
6239 | - width = $scope.TransparencyBoxStartX - TransparencyEndX; | |
6240 | - } | |
6241 | - else { | |
6242 | - width = TransparencyEndX - $scope.TransparencyBoxStartX; | |
6243 | - } | |
6244 | - if (TransparencyBoxEndY < $scope.TransparencyBoxStartY) { | |
6245 | - height = $scope.TransparencyBoxStartY - TransparencyBoxEndY; | |
6246 | 6297 | } |
6247 | 6298 | else { |
6248 | - height = TransparencyBoxEndY - $scope.TransparencyBoxStartY; | |
6299 | + var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index"); | |
6300 | + var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index"); | |
6301 | + drawCanvasZindex = parseInt(drawCanvasZindex) - 1; | |
6302 | + paintCanvasZindex = parseInt(paintCanvasZindex) - 1; | |
6303 | + if (drawCanvasZindex > paintCanvasZindex) { | |
6304 | + $(".ui-wrapper").css("z-index", drawCanvasZindex); | |
6305 | + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex); | |
6306 | + } | |
6307 | + else { | |
6308 | + $(".ui-wrapper").css("z-index", paintCanvasZindex); | |
6309 | + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex); | |
6310 | + } | |
6249 | 6311 | } |
6250 | 6312 | |
6251 | - var new_x, new_y; | |
6313 | + } | |
6314 | + else { | |
6315 | + $rootScope.switchToTransparencycanvas(); | |
6316 | + } | |
6317 | + } | |
6318 | + else { | |
6252 | 6319 | |
6253 | - new_x = (TransparencyEndX < $scope.TransparencyBoxStartX) ? TransparencyEndX : $scope.TransparencyBoxStartX; | |
6254 | - new_y = (TransparencyBoxEndY < $scope.TransparencyBoxStartY) ? TransparencyBoxEndY : $scope.TransparencyBoxStartY; | |
6320 | + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', 12000); | |
6255 | 6321 | |
6322 | + $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex')); | |
6256 | 6323 | |
6257 | - var transparencyCanvas = document.createElement('canvas'); | |
6258 | - var tBox = document.getElementById('transparencyCanvas_'+ windowviewid); | |
6259 | - if (tBox == null) { | |
6324 | + } | |
6325 | + //hide the speechbubble | |
6260 | 6326 | |
6261 | - transparencyCanvas.id = 'transparencyCanvas_'+ windowviewid; | |
6262 | - $scope.transparencyCanvasId = transparencyCanvas.id; | |
6263 | - transparencyCanvas.height = height; | |
6264 | - transparencyCanvas.width = width; | |
6265 | - transparencyCanvas.style.position = "absolute"; | |
6266 | - //transparencyCanvas.style.left = $scope.startX + 'px' // x + "px"; | |
6267 | - //transparencyCanvas.style.top = $scope.startY + "px"//y + "px"; | |
6268 | - transparencyCanvas.style.left = new_x + 'px' // x + "px"; | |
6269 | - transparencyCanvas.style.top = new_y + "px" | |
6270 | - transparencyCanvas.style.border = "black 1px solid"; | |
6271 | - transparencyCanvas.style.backgroundColor = "transparent"; | |
6272 | - transparencyCanvas.style.zIndex = 200; | |
6273 | - document.getElementById("canvasDivDA_" + windowviewid).appendChild(transparencyCanvas); | |
6274 | - $scope.transparencyChangeCounter = 0; | |
6275 | 6327 | |
6276 | - $('#transparencyCanvas_' + windowviewid).resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeTransparencyBox(windowviewid); }, start: function (event, ui) { clearTransCanvas(windowviewid); } }); | |
6328 | + if ($rootScope.isAnnotationWindowOpen == true) | |
6329 | + $rootScope.isTBCompleted = true; | |
6330 | + } | |
6331 | + } | |
6277 | 6332 | |
6278 | - $scope.transparencyCanvasHeight = transparencyCanvas.height; | |
6279 | - $scope.transparencyCanvasWidth = transparencyCanvas.width; | |
6333 | +// $scope.DrawTransparencyBox = function (TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, windowviewid) { | |
6280 | 6334 | |
6281 | - //bind click listener | |
6282 | - transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener); | |
6335 | + $scope.DrawTransparencyBox = function (windowviewid) { | |
6336 | + var newDimes = null; | |
6337 | + // if ($scope.GetwindowStoreData(windowviewid, 'zoomInOut') == 25) { | |
6338 | + if ( $scope.GetwindowStoreData(windowviewid, 'isTransparencyActivated') && $scope.GetwindowStoreData(windowviewid, 'isZoomed') == true) { | |
6339 | + // alert("ZOOM"); | |
6340 | + newDimes = $scope.scaleTransparencyBox(windowviewid); | |
6283 | 6341 | |
6284 | - $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid,'UIWrapperZIndex')); | |
6342 | + $scope.TransparencyBoxStartX = newDimes.scaledX1; | |
6343 | + TransparencyEndX = newDimes.scaledX2; | |
6344 | + $scope.TransparencyBoxStartY = newDimes.scaledY1; | |
6345 | + TransparencyBoxEndY = newDimes.scaledY2; | |
6346 | + $scope.TBoxEndX = newDimes.scaledX2; | |
6347 | + $scope.TBoxEndY = newDimes.scaledY2; | |
6348 | + $scope.TBHeight = newDimes.scaledHeight; | |
6349 | + $scope.TBWidth = newDimes.scaledWidth; | |
6350 | + } | |
6351 | + $scope.transparencyDrawnRegions = []; | |
6352 | + $scope.canThirdBRDrawn = false; | |
6285 | 6353 | |
6286 | - } | |
6287 | - if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { | |
6354 | + var TransparencyBoxStartX = newDimes != null ? newDimes.scaledX1 : $scope.TransparencyBoxStartX, TransparencyEndX = newDimes != null ? newDimes.scaledX2 : $scope.TBoxEndX, TransparencyBoxStartY = newDimes != null ? newDimes.scaledY1 : $scope.TransparencyBoxStartY, TransparencyBoxEndY = newDimes != null ? newDimes.scaledY2 : $scope.TBoxEndY; | |
6355 | + //draw temp box to store the canvas data with original transparecy | |
6356 | + if (document.getElementById('tempCanvas_' + windowviewid) != null) { | |
6357 | + $('#tempCanvas_' + windowviewid).remove(); | |
6358 | + } | |
6359 | + if (document.getElementById('tempCanvas_' + windowviewid) == null || document.getElementById('tempCanvas_' + windowviewid) == undefined) { | |
6360 | + var tempCanvas = document.createElement('canvas'); | |
6361 | + tempCanvas.id = 'tempCanvas_' + windowviewid; | |
6362 | + tempCanvas.height = TransparencyBoxEndY - TransparencyBoxStartY; | |
6363 | + tempCanvas.width = TransparencyEndX - TransparencyBoxStartX; | |
6364 | + tempCanvas.style.position = "absolute"; | |
6365 | + tempCanvas.style.left = 200 + 'px'; | |
6366 | + tempCanvas.style.top = 200 + 'px'; | |
6367 | + tempCanvas.style.backgroundColor = "transparent"; | |
6368 | + tempCanvas.style.visibility = 'hidden'; | |
6369 | + tempCanvas.style.border = "black 1px solid"; | |
6370 | + document.getElementById("canvasDivDA_" + windowviewid).appendChild(tempCanvas); | |
6371 | + } | |
6372 | + var transparencyCanvas = document.createElement('canvas'); | |
6373 | + var tBox = document.getElementById('transparencyCanvas_' + windowviewid); | |
6288 | 6374 | |
6289 | - $scope.SetwindowStoreData(windowviewid,'isTBDrawnOnBodyRegion',true); | |
6375 | + if (document.getElementById('transparencyCanvas_' + windowviewid) != null) { | |
6376 | + $('#transparencyCanvas_' + windowviewid).remove(); | |
6377 | + $('#transparencyCanvas_' + windowviewid).parent().remove(); | |
6378 | + } | |
6379 | + if (document.getElementById('transparencyCanvas_' + windowviewid) == null) { | |
6290 | 6380 | |
6291 | - if (value.bodyRegionId == '3') { | |
6381 | + transparencyCanvas.id = 'transparencyCanvas_' + windowviewid; | |
6382 | + $scope.transparencyCanvasId = transparencyCanvas.id; | |
6383 | + transparencyCanvas.height = TransparencyBoxEndY - TransparencyBoxStartY;; | |
6384 | + transparencyCanvas.width = TransparencyEndX - TransparencyBoxStartX; | |
6385 | + transparencyCanvas.style.position = "absolute"; | |
6386 | + //transparencyCanvas.style.left = $scope.startX + 'px' // x + "px"; | |
6387 | + //transparencyCanvas.style.top = $scope.startY + "px"//y + "px"; | |
6388 | + transparencyCanvas.style.left = TransparencyBoxStartX + 'px'//new_x + 'px' // x + "px"; | |
6389 | + transparencyCanvas.style.top = TransparencyBoxStartY + 'px'// + "px" | |
6390 | + transparencyCanvas.style.border = "black 1px solid"; | |
6391 | + transparencyCanvas.style.backgroundColor = "transparent"; | |
6392 | + transparencyCanvas.style.zIndex = 200; | |
6393 | + document.getElementById("canvasDivDA_" + windowviewid).appendChild(transparencyCanvas); | |
6394 | + $scope.transparencyChangeCounter = 0; | |
6292 | 6395 | |
6293 | - var BR_SixTBData = new jinqJs() | |
6294 | - .from($scope.transparencyDrawnRegions) | |
6295 | - .where('BRID == 6') | |
6296 | - .select(); | |
6396 | + $('#transparencyCanvas_' + windowviewid).resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeTransparencyBox(windowviewid); }, start: function (event, ui) { clearTransCanvas(windowviewid); } }); | |
6297 | 6397 | |
6298 | - if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) { | |
6398 | + $scope.transparencyCanvasHeight = transparencyCanvas.height; | |
6399 | + $scope.transparencyCanvasWidth = transparencyCanvas.width; | |
6299 | 6400 | |
6300 | - $scope.canThirdBRDrawn = true; | |
6401 | + //bind click listener | |
6402 | + transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener); | |
6301 | 6403 | |
6302 | - } | |
6404 | + $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex')); | |
6405 | + | |
6406 | + } | |
6407 | + | |
6408 | + var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid, 'BodyRegionCordinatesData'); | |
6409 | + $.each(BodyRegionDictionary, function (index, value) { | |
6410 | + | |
6411 | + | |
6412 | + var tBoxDimesions = $scope.getTBoxDimesions(TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, value.X, value.Y, value.Height, value.Width); | |
6413 | + | |
6414 | + var transparencyBoxHeight = tBoxDimesions.transparencyBoxHeight; | |
6415 | + var transparencyBoxWidth = tBoxDimesions.transparencyBoxWidth; | |
6416 | + var transparencyBoxBottom = tBoxDimesions.transparencyBoxBottom; | |
6417 | + var transparencyBoxRight = tBoxDimesions.transparencyBoxRight; | |
6418 | + var bodyRegionRight = tBoxDimesions.bodyRegionRight; | |
6419 | + var bodyRegionBottom = tBoxDimesions.bodyRegionBottom; | |
6420 | + | |
6421 | + | |
6422 | + | |
6423 | + if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { | |
6424 | + | |
6425 | + $scope.SetwindowStoreData(windowviewid, 'isTBDrawnOnBodyRegion', true); | |
6426 | + | |
6427 | + if (value.bodyRegionId == '3') { | |
6428 | + | |
6429 | + var BR_SixTBData = new jinqJs() | |
6430 | + .from($scope.transparencyDrawnRegions) | |
6431 | + .where('BRID == 6') | |
6432 | + .select(); | |
6433 | + | |
6434 | + if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) { | |
6303 | 6435 | |
6436 | + $scope.canThirdBRDrawn = true; | |
6304 | 6437 | |
6305 | 6438 | } |
6306 | - var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); | |
6307 | - if (bodyVid == "9" || bodyVid == "11" || bodyVid == "2" || bodyVid == "3" || bodyVid == "6" || bodyVid == "7") { | |
6308 | - if (value.bodyRegionId == "6") { | |
6309 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6310 | - } | |
6311 | - else { | |
6312 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6313 | - } | |
6439 | + | |
6440 | + | |
6441 | + } | |
6442 | + var bodyVid = $scope.GetwindowStoreData(windowviewid, 'voId'); | |
6443 | + if (bodyVid == "9" || bodyVid == "11" || bodyVid == "2" || bodyVid == "3" || bodyVid == "6" || bodyVid == "7") { | |
6444 | + if (value.bodyRegionId == "6") { | |
6445 | + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6314 | 6446 | } |
6315 | 6447 | else { |
6316 | - if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) { | |
6317 | - | |
6318 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6319 | - } | |
6448 | + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6449 | + } | |
6450 | + } | |
6451 | + else { | |
6452 | + if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) { | |
6320 | 6453 | |
6321 | - else { | |
6454 | + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6455 | + } | |
6322 | 6456 | |
6323 | - if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) { | |
6457 | + else { | |
6324 | 6458 | |
6325 | - //1. draw 6th | |
6326 | - var BRSixData = new jinqJs() | |
6327 | - .from(BodyRegionDictionary) | |
6328 | - .where('bodyRegionId == 6') | |
6329 | - .select(); | |
6330 | - var isMirror = BRSixData[0].IsMirror; | |
6331 | - if (isMirror == 'Yes') { | |
6332 | - //draw mirror arm | |
6333 | - $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'Yes', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6334 | - //draw non mirror arm | |
6335 | - $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'No', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6336 | - //draw 3rd BR | |
6337 | - $timeout(function () { | |
6338 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6339 | - }, 200); | |
6340 | - } | |
6341 | - else { | |
6342 | - //draw mirror arm | |
6343 | - $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'No', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6344 | - //draw mirror arm | |
6345 | - $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'Yes', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6346 | - //draw mirror arm | |
6347 | - $timeout(function () { | |
6348 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6349 | - }, 200); | |
6350 | - } | |
6459 | + if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) { | |
6351 | 6460 | |
6461 | + //1. draw 6th | |
6462 | + var BRSixData = new jinqJs() | |
6463 | + .from(BodyRegionDictionary) | |
6464 | + .where('bodyRegionId == 6') | |
6465 | + .select(); | |
6466 | + var isMirror = BRSixData[0].IsMirror; | |
6467 | + if (isMirror == 'Yes') { | |
6468 | + //draw mirror arm | |
6469 | + $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'Yes', TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6470 | + //draw non mirror arm | |
6471 | + $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'No', TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6472 | + //draw 3rd BR | |
6473 | + $timeout(function () { | |
6474 | + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6475 | + }, 200); | |
6352 | 6476 | } |
6353 | 6477 | else { |
6354 | - var BR_SixTBData = new jinqJs() | |
6355 | - .from($scope.transparencyDrawnRegions) | |
6356 | - .where('BRID == 6') | |
6357 | - .select(); | |
6358 | - if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) { } | |
6359 | - else | |
6360 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6478 | + //draw mirror arm | |
6479 | + $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'No', TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6480 | + //draw mirror arm | |
6481 | + $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'Yes', TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6482 | + //draw mirror arm | |
6483 | + $timeout(function () { | |
6484 | + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6485 | + }, 200); | |
6361 | 6486 | } |
6362 | - } | |
6363 | 6487 | |
6488 | + } | |
6489 | + else { | |
6490 | + var BR_SixTBData = new jinqJs() | |
6491 | + .from($scope.transparencyDrawnRegions) | |
6492 | + .where('BRID == 6') | |
6493 | + .select(); | |
6494 | + if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) { } | |
6495 | + else | |
6496 | + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6497 | + } | |
6364 | 6498 | } |
6365 | 6499 | |
6366 | 6500 | } |
6367 | - else { | |
6368 | - //when user draw TB outside body than no bodyRegion | |
6369 | - //is covred and nothing is drawn so the function is not called in which we are enabling UI | |
6370 | - $scope.EnableUI(); | |
6371 | - } | |
6372 | - }) | |
6373 | 6501 | |
6374 | - //for modesty | |
6375 | - var modestyImageInfo=$scope.GetwindowStoreData(windowviewid,'modestyImageInfo'); | |
6376 | - if (modestyImageInfo.length > 0) { | |
6502 | + } | |
6503 | + else { | |
6504 | + //when user draw TB outside body than no bodyRegion | |
6505 | + //is covred and nothing is drawn so the function is not called in which we are enabling UI | |
6506 | + $scope.EnableUI(); | |
6507 | + } | |
6508 | + }) | |
6377 | 6509 | |
6378 | - $.each(modestyImageInfo, function (index, value) { | |
6510 | + //for modesty | |
6511 | + var modestyImageInfo = $scope.GetwindowStoreData(windowviewid, 'modestyImageInfo'); | |
6512 | + if (modestyImageInfo.length > 0) { | |
6379 | 6513 | |
6380 | - var tBoxDimesions = $scope.getTBoxDimesions($scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, value.x, value.y, value.Height, value.Width); | |
6514 | + $.each(modestyImageInfo, function (index, value) { | |
6381 | 6515 | |
6382 | - var transparencyBoxHeight = tBoxDimesions.transparencyBoxHeight; | |
6383 | - var transparencyBoxWidth = tBoxDimesions.transparencyBoxWidth; | |
6384 | - var transparencyBoxBottom = tBoxDimesions.transparencyBoxBottom; | |
6385 | - var transparencyBoxRight = tBoxDimesions.transparencyBoxRight; | |
6386 | - var bodyRegionRight = tBoxDimesions.bodyRegionRight; | |
6387 | - var bodyRegionBottom = tBoxDimesions.bodyRegionBottom; | |
6516 | + var tBoxDimesions = $scope.getTBoxDimesions(TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, value.x, value.y, value.Height, value.Width); | |
6388 | 6517 | |
6389 | - if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.x <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.y <= transparencyBoxBottom) { | |
6518 | + var transparencyBoxHeight = tBoxDimesions.transparencyBoxHeight; | |
6519 | + var transparencyBoxWidth = tBoxDimesions.transparencyBoxWidth; | |
6520 | + var transparencyBoxBottom = tBoxDimesions.transparencyBoxBottom; | |
6521 | + var transparencyBoxRight = tBoxDimesions.transparencyBoxRight; | |
6522 | + var bodyRegionRight = tBoxDimesions.bodyRegionRight; | |
6523 | + var bodyRegionBottom = tBoxDimesions.bodyRegionBottom; | |
6390 | 6524 | |
6391 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.x, value.y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false,false, windowviewid); | |
6525 | + if (TransparencyBoxStartX <= bodyRegionRight && value.x <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.y <= transparencyBoxBottom) { | |
6392 | 6526 | |
6393 | - } | |
6394 | - }) | |
6395 | - } | |
6527 | + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.x, value.y, value.IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false, windowviewid); | |
6528 | + | |
6529 | + } | |
6530 | + }) | |
6531 | + } | |
6396 | 6532 | |
6397 | 6533 | // var transparencySliderHTML = |
6398 | 6534 | // '<div class="ui-widget-content" id="transparencyScale_' + windowviewid + '" style="width: 350px; height: 150px;visibility:hidden;display:block;float:left">' + |
... | ... | @@ -6419,96 +6555,88 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6419 | 6555 | |
6420 | 6556 | |
6421 | 6557 | |
6422 | - // $('#transparencyScale').modal('show'); | |
6423 | - $('#transparencyScale_' + windowviewid).css('position', 'fixed'); | |
6424 | - $('#transparencyScale_' + windowviewid).draggable({ containment: 'window', scroll: false }); | |
6558 | + // $('#transparencyScale').modal('show'); | |
6559 | + $('#transparencyScale_' + windowviewid).css('position', 'fixed'); | |
6560 | + $('#transparencyScale_' + windowviewid).draggable({ containment: 'window', scroll: false }); | |
6425 | 6561 | if ($rootScope.isCallFromOtherModule) { |
6426 | 6562 | $('#transparencyScale_' + windowviewid).draggable({ containment: '#canvasDivDA_' + windowviewid }); |
6427 | - | |
6428 | - $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', transparencyBounds); | |
6563 | + $scope.SetwindowStoreData(windowviewid, 'transparencyBounds', []); | |
6564 | + var transparencyBounds = $scope.GetwindowStoreData(windowviewid, 'transparencyBounds'); | |
6565 | + transparencyBounds.push({ | |
6566 | + 'h': $scope.TBoxEndX, 'x': $scope.TransparencyBoxStartX, | |
6567 | + 'w': $scope.TBoxEndY, 'y': $scope.TransparencyBoxStartY | |
6568 | + }); | |
6569 | + //$scope.SetwindowStoreData(windowviewid, 'transparencyBounds', transparencyBounds); | |
6429 | 6570 | //$scope.SetwindowStoreData(windowviewid, 'transparencyValue', 0); |
6430 | 6571 | //$scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', 0); |
6431 | 6572 | $scope.SetwindowStoreData(windowviewid, 'transparencyX', $scope.TBDrawStartX); |
6432 | 6573 | $scope.SetwindowStoreData(windowviewid, 'transparencyY', $scope.TBDrawStartY ); |
6433 | 6574 | } |
6434 | - $('#transparencyScale_' + windowviewid).css('top', $scope.TBDrawStartY - 10) | |
6435 | - $('#transparencyScale_' + windowviewid).css('left', $scope.TBDrawStartX + 130) | |
6436 | - $('#transparencyScale_' + windowviewid).css('visibility', 'visible') | |
6437 | - $('#transparencyScale_' + windowviewid).css("z-index", "100000") //Dated:16-07-2016 Issue#4962:Transparency box should be on top. | |
6438 | - $("#tbSlider_" + windowviewid + " .ui-slider-range-min").css("width", "100%"); | |
6439 | - $("#tbSlider_" + windowviewid + " .ui-slider-handle").css("left", "100%"); | |
6440 | - } | |
6575 | + $('#transparencyScale_' + windowviewid).css('top', $scope.TBDrawStartY - 10) | |
6576 | + $('#transparencyScale_' + windowviewid).css('left', $scope.TBDrawStartX + 130) | |
6577 | + $('#transparencyScale_' + windowviewid).css('visibility', 'visible') | |
6578 | + $('#transparencyScale_' + windowviewid).css("z-index", "100000") //Dated:16-07-2016 Issue#4962:Transparency box should be on top. | |
6579 | + $("#tbSlider_" + windowviewid + " .ui-slider-range-min").css("width", "100%"); | |
6580 | + $("#tbSlider_" + windowviewid + " .ui-slider-handle").css("left", "100%"); | |
6441 | 6581 | } |
6582 | + | |
6442 | 6583 | |
6443 | - document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mousedown", mouseDownListener); | |
6444 | - document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mousemove", mouseMoveListener); | |
6445 | - document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("mouseup", mouseUpListener); | |
6446 | - | |
6447 | - | |
6448 | - document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchstart", mouseDownListener); | |
6449 | - | |
6450 | - document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchmove", mouseMoveListener); | |
6451 | - | |
6452 | - document.getElementById("canvasDivDA_" + windowviewid).removeEventListener("touchend", mouseUpListener); | |
6453 | - | |
6454 | - | |
6455 | - | |
6456 | - //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. | |
6457 | - $('#btnTranparency_' + windowviewid).removeClass('tButtonActive'); | |
6458 | - $('#btnTranparency_' + windowviewid).addClass('btn-black'); | |
6459 | - $('#btnIdentify_' + windowviewid).removeClass('btn-black'); | |
6460 | - $('#btnIdentify_' + windowviewid).addClass('btn-primary'); | |
6461 | - | |
6462 | - // clear canvas before drawing transparency box | |
6463 | - if ($rootScope.isAnnotationWindowOpen == true) { | |
6464 | - $('#canvasDA_' + windowviewid).removeLayers(); | |
6465 | - var paintCanvasObj = document.getElementById("canvasPaintDA_" + windowviewid); | |
6466 | - if (paintCanvasObj != null) { | |
6467 | - var ctx = paintCanvasObj.getContext("2d"); | |
6468 | - ctx.clearRect(0, 0, 2277, 3248); | |
6469 | - } | |
6470 | - var sktch = $("#canvasPaintDA_" + windowviewid).sketch(); | |
6471 | - $("#canvasPaintDA_" + windowviewid).sketch().actions = []; | |
6472 | - $("#annotationpaintbrushsize").removeClass("activebtncolor"); | |
6473 | - $("#annotationpainteraser").removeClass("activebtncolor"); | |
6474 | - if ($("#DrawMode").hasClass("annotationtoolbartab")) { | |
6475 | - if ($scope.GetwindowStoreData(windowviewid, 'isTBoxModestyVisible') == true) { | |
6476 | - | |
6477 | - $rootScope.switchCanvas(); | |
6478 | - | |
6479 | - } | |
6480 | - else { | |
6481 | - var drawCanvasZindex = $('#canvasDA_' + windowviewid).css("z-index"); | |
6482 | - var paintCanvasZindex = $("#canvasPaintDA_" + windowviewid).css("z-index"); | |
6483 | - drawCanvasZindex = parseInt(drawCanvasZindex) - 1; | |
6484 | - paintCanvasZindex = parseInt(paintCanvasZindex) - 1; | |
6485 | - if (drawCanvasZindex > paintCanvasZindex) { | |
6486 | - $(".ui-wrapper").css("z-index", drawCanvasZindex); | |
6487 | - $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex); | |
6488 | - } | |
6489 | - else { | |
6490 | - $(".ui-wrapper").css("z-index", paintCanvasZindex); | |
6491 | - $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex); | |
6492 | - } | |
6493 | - } | |
6494 | - | |
6495 | - } | |
6496 | - else { | |
6497 | - $rootScope.switchToTransparencycanvas(); | |
6498 | - } | |
6584 | + $scope.scaleTransparencyBox = function(windowviewid) { | |
6585 | + var nzoom = $scope.GetwindowStoreData(windowviewid, 'zoomInOut'); | |
6586 | + var existingZoon=0; | |
6587 | + if (nzoom == 25) { | |
6588 | + existingZoon = 75; | |
6499 | 6589 | } |
6500 | 6590 | else { |
6591 | + existingZoon = 25; | |
6592 | + } | |
6593 | + var X = 0; | |
6594 | + var scaledY = 0; | |
6595 | + var scaledHeight = 0; | |
6596 | + var scaledWidth = 0; | |
6501 | 6597 | |
6502 | - $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', 12000); | |
6598 | + /* $scope.TransparencyBoxStartX = new_startx; | |
6599 | + TransparencyEndX = new_endx; | |
6600 | + $scope.TransparencyBoxStartY = new_starty; | |
6601 | + TransparencyBoxEndY = new_endy; | |
6602 | + $scope.TBoxEndX = TransparencyEndX; | |
6603 | + $scope.TBoxEndY = TransparencyBoxEndY; | |
6604 | + $scope.TBHeight = height; | |
6605 | + $scope.TBWidth = width; | |
6606 | + */ | |
6607 | + //if (mirrorValue != 0) { | |
6608 | + // var mirroredX = parseInt(mirrorValue) + parseInt(x); | |
6609 | + // var newX = (mirroredX * nzoom); | |
6610 | + // mirroredX = (newX / existingZoon); | |
6611 | + // X = mirroredX; | |
6612 | + //} | |
6613 | + //else { | |
6614 | + var newStartX = ($scope.TransparencyBoxStartX * nzoom); | |
6615 | + var X1 = (newStartX / existingZoon); | |
6616 | + //} | |
6617 | + var newEndX = ($scope.TBoxEndX * nzoom); | |
6618 | + var X2 = (newEndX / existingZoon); | |
6503 | 6619 | |
6504 | - $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid, 'UIWrapperZIndex')); | |
6620 | + var newStatY = ($scope.TransparencyBoxStartY * nzoom); | |
6621 | + var Y1 = (newStatY / existingZoon); | |
6505 | 6622 | |
6506 | - } | |
6507 | - //hide the speechbubble | |
6623 | + var newEndY = ($scope.TBoxEndY * nzoom); | |
6624 | + var Y2 = (newEndY / existingZoon); | |
6508 | 6625 | |
6626 | + var newHeight = ($scope.TBHeight * nzoom); | |
6627 | + var ht = (newHeight / existingZoon); | |
6509 | 6628 | |
6510 | - if ($rootScope.isAnnotationWindowOpen == true) | |
6511 | - $rootScope.isTBCompleted = true; | |
6629 | + var newWidth = ($scope.TBWidth * nzoom); | |
6630 | + var wt = (newWidth / existingZoon); | |
6631 | + | |
6632 | + return { | |
6633 | + scaledX1: X1, | |
6634 | + scaledY1: Y1, | |
6635 | + scaledX2: X2, | |
6636 | + scaledY2: Y2, | |
6637 | + scaledHeight: ht, | |
6638 | + scaledWidth: wt | |
6639 | + } | |
6512 | 6640 | } |
6513 | 6641 | |
6514 | 6642 | $scope.CalculateDimensionsAndDrawTBox = function (windowviewid) { |
... | ... | @@ -6540,13 +6668,42 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6540 | 6668 | $scope.TransparencyBoxStartY = value.y; |
6541 | 6669 | $scope.TransparencyEndX = value.h; |
6542 | 6670 | $scope.TransparencyBoxEndY = value.w; |
6671 | + | |
6672 | + $scope.TBoxEndX = value.h; | |
6673 | + $scope.TBoxEndY = value.w; | |
6674 | + | |
6543 | 6675 | }) |
6544 | - $scope.TBDrawStartX = $scope.GetwindowStoreData(windowviewid, 'transparencyX'); | |
6545 | - $scope.TBDrawStartY = $scope.GetwindowStoreData(windowviewid, 'transparencyY'); | |
6676 | + | |
6677 | + $scope.TBHeight = $scope.GetwindowStoreData(windowviewid, 'transparencyX'); | |
6678 | + $scope.TBWidth = $scope.GetwindowStoreData(windowviewid, 'transparencyY'); | |
6679 | + | |
6680 | + $scope.TBDrawStartX = $scope.GetwindowStoreData(windowviewid, 'transparencyX'); | |
6681 | + $scope.TBDrawStartY = $scope.GetwindowStoreData(windowviewid, 'transparencyY'); | |
6546 | 6682 | $scope.IncludedBodyRegions = []; |
6547 | 6683 | $scope.transparencyDrawnRegions = []; |
6548 | 6684 | $scope.canThirdBRDrawn = false; |
6549 | 6685 | |
6686 | + //var newDimes = $scope.scaleTransparencyBox(windowviewid); | |
6687 | + //if(newDimes != null){ | |
6688 | + // $scope.startX = newDimes.scaledX1; | |
6689 | + // $scope.startY = newDimes.scaledY1; | |
6690 | + | |
6691 | + // $scope.TransparencyBoxStartX = newDimes.scaledX1; | |
6692 | + // $scope.TransparencyEndX = newDimes.scaledX2; | |
6693 | + // $scope.TransparencyBoxStartY = newDimes.scaledY1; | |
6694 | + // $scope.TransparencyBoxEndY = newDimes.scaledY2; | |
6695 | + | |
6696 | + // $scope.TBDrawStartX = newDimes.scaledHeight; | |
6697 | + // $scope.TBDrawStartY = newDimes.scaledWidth; | |
6698 | + | |
6699 | + // $scope.TBoxEndX = newDimes.scaledX2; | |
6700 | + // $scope.TBoxEndY = newDimes.scaledY2; | |
6701 | + // $scope.TBHeight = newDimes.scaledHeight; | |
6702 | + // $scope.TBWidth = newDimes.scaledWidth; | |
6703 | + | |
6704 | + // } | |
6705 | + | |
6706 | + | |
6550 | 6707 | //var tranparencyLayer; |
6551 | 6708 | |
6552 | 6709 | //if ($scope.GetwindowStoreData(windowviewid, "isTransparencyActivated") == true && (($scope.GetwindowStoreData(windowviewid, "isNormalBtnClicked") == true || $scope.GetwindowStoreData(windowviewid, "isHighlightlBtnClicked") == true))) { |
... | ... | @@ -6600,7 +6757,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6600 | 6757 | document.getElementById("canvasDivDA_" + windowviewid).appendChild(tempCanvas); |
6601 | 6758 | } |
6602 | 6759 | |
6603 | - //$scope.SetwindowStoreData(windowviewid, 'layerNumber', tranparencyLayer); | |
6760 | + | |
6761 | + | |
6604 | 6762 | |
6605 | 6763 | var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid, 'BodyRegionCordinatesData'); |
6606 | 6764 | |
... | ... | @@ -6876,6 +7034,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6876 | 7034 | |
6877 | 7035 | $scope.loadTransparencyImage = function (bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged, isResized, windowviewid) { |
6878 | 7036 | |
7037 | + $scope.SetwindowStoreData(windowviewid, 'isCallForTransparencyImage', true); | |
7038 | + // $scope.SetwindowStoreData(windowviewid, 'isZoomed',false); | |
6879 | 7039 | var transparencyCanvas = document.getElementById('transparencyCanvas_' + windowviewid); |
6880 | 7040 | |
6881 | 7041 | TransparencyBoxStartX = parseInt((transparencyCanvas.style.left).replace('px', '')); |
... | ... | @@ -6894,13 +7054,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6894 | 7054 | var WidthforTransImage = TBImageDimensions.WidthforTransImageTB; |
6895 | 7055 | var HeightforTransImage = TBImageDimensions.HeightforTransImageTB; |
6896 | 7056 | var YforTransImage = TBImageDimensions.YforTransImageTB; |
7057 | + //var tranparencyLayer; | |
6897 | 7058 | |
7059 | + //var isResized = $scope.GetwindowStoreData(windowviewid, "isResized"); | |
6898 | 7060 | |
6899 | 7061 | //0. get current layer number |
6900 | 7062 | if (isResized || isLayerChanged) { |
6901 | 7063 | //do nothing |
6902 | 7064 | $scope.SetwindowStoreData(windowviewid,'transNumber',100); |
6903 | 7065 | $("#tbSlider_" + windowviewid).slider('value', 100); |
7066 | + //tranparencyLayer = parseInt($('#txtLayerNumberDA_' + windowviewid).val()); | |
6904 | 7067 | |
6905 | 7068 | } |
6906 | 7069 | else { |
... | ... | @@ -6931,6 +7094,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6931 | 7094 | $scope.SetwindowStoreData(windowviewid,'layerNumber',tranparencyLayer); |
6932 | 7095 | $scope.SetwindowStoreData(windowviewid, 'layerNumberTransparency', tranparencyLayer); |
6933 | 7096 | } |
7097 | + //$scope.SetwindowStoreData(windowviewid, 'layerNumber', tranparencyLayer); | |
7098 | + //console.log(" $scope.GetwindowStoreData(windowviewid, 'layerNumber')===" + $scope.GetwindowStoreData(windowviewid, 'layerNumber')); | |
6934 | 7099 | |
6935 | 7100 | $('#txtLayerNumberDA_' + windowviewid).val( $scope.GetwindowStoreData(windowviewid,'layerNumber')); |
6936 | 7101 | $scope.SetwindowStoreData(windowviewid, 'isTransparent', true); |
... | ... | @@ -7129,6 +7294,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7129 | 7294 | |
7130 | 7295 | } |
7131 | 7296 | |
7297 | + $scope.SetwindowStoreData(windowviewid, 'isCallForTransparencyImage', false); | |
7132 | 7298 | |
7133 | 7299 | |
7134 | 7300 | if ($scope.GetwindowStoreData(windowviewid,'isHighLight') != true) { |
... | ... | @@ -7580,8 +7746,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7580 | 7746 | |
7581 | 7747 | |
7582 | 7748 | } |
7749 | + | |
7583 | 7750 | $scope.SetwindowStoreData(windowviewid, 'isTransparencyActivated', true); |
7584 | 7751 | $scope.EnableUI(); |
7752 | + | |
7753 | + $scope.SetwindowStoreData(windowviewid, 'isZoomed',false); | |
7754 | + | |
7585 | 7755 | } |
7586 | 7756 | |
7587 | 7757 | $scope.changeTransparency = function (windowviewid) { |
... | ... | @@ -7910,179 +8080,190 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7910 | 8080 | |
7911 | 8081 | if (tCanvasHeight != $scope.transparencyCanvasHeight || tCanvasWidth != $scope.transparencyCanvasWidth) { |
7912 | 8082 | |
8083 | + $scope.TransparencyBoxStartX = tBoxStartX; | |
8084 | + $scope.TransparencyBoxStartY = tBoxStartY; | |
8085 | + $scope.TBoxEndX = tBoxEndX; | |
8086 | + $scope.TBoxEndY = tBoxEndY; | |
8087 | + $scope.TBHeight = tBoxEndY - tBoxStartY; | |
8088 | + $scope.TBWidth = tBoxEndX - tBoxStartX; | |
7913 | 8089 | |
7914 | - var transparencyCanvas = document.createElement('canvas'); | |
7915 | - transparencyCanvas.id = 'transparencyCanvas_' + windowviewid; | |
7916 | - $scope.transparencyCanvas = tCanvas.id; | |
7917 | - transparencyCanvas.height = tCanvasHeight; | |
7918 | - transparencyCanvas.width = tCanvasWidth; | |
7919 | - transparencyCanvas.style.position = "absolute"; | |
7920 | - transparencyCanvas.style.left = tCanvas.style.left; // x + "px"; | |
7921 | - transparencyCanvas.style.top = tCanvas.style.top//y + "px"; | |
7922 | - transparencyCanvas.style.border = "black 1px solid"; | |
7923 | - transparencyCanvas.style.zIndex = 200; | |
7924 | - | |
7925 | - | |
7926 | - document.getElementById('canvasDivDA_' + windowviewid).appendChild(transparencyCanvas); | |
7927 | - | |
7928 | - $('#transparencyCanvas_' + windowviewid).resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeTransparencyBox(windowviewid); }, start: function (event, ui) { clearTransCanvas(windowviewid); } }); | |
7929 | - $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid,'UIWrapperZIndex')); | |
7930 | - | |
7931 | - //bind click listener | |
7932 | - transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener); | |
7933 | - } | |
7934 | - $scope.transparencyCanvasHeight = tCanvasHeight; | |
7935 | - $scope.transparencyCanvasWidth = tCanvasWidth; | |
7936 | - | |
7937 | - | |
7938 | - //create temp cavas to retain the original anavs data for use in transparency change as | |
7939 | - //if u use original canvas data for transprency change then at 0 transparency all data will become transparent and if u increase transparency with this data then the canavs will be blank | |
7940 | - if (document.getElementById('tempCanvas_' + windowviewid) != null) { | |
7941 | - $('#tempCanvas_'+ windowviewid).remove(); | |
7942 | - } | |
7943 | - var tempCanvas = document.createElement('canvas'); | |
7944 | - tempCanvas.id = 'tempCanvas_' + windowviewid; | |
7945 | - $scope.tempCanvas = tempCanvas.id; | |
7946 | - tempCanvas.height = $scope.transparencyCanvasHeight; | |
7947 | - tempCanvas.width = $scope.transparencyCanvasWidth; | |
7948 | - tempCanvas.style.position = "absolute"; | |
7949 | - tempCanvas.style.left = 200 + 'px'; | |
7950 | - tempCanvas.style.backgroundColor = "transparent"; | |
7951 | - tempCanvas.style.visibility = 'hidden'; | |
7952 | - // tempCanvas.style.border = "black 1px solid"; | |
7953 | - | |
7954 | - document.getElementById('canvasDivDA_' + windowviewid).appendChild(tempCanvas); | |
7955 | - | |
7956 | - var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid,'BodyRegionCordinatesData'); | |
7957 | - | |
7958 | - $scope.IncludedBodyRegions = []; | |
7959 | - $scope.transparencyDrawnRegions = []; | |
7960 | - $scope.canThirdBRDrawn = false; | |
7961 | - var counter = 0; | |
7962 | - var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); | |
7963 | - $.each(BodyRegionDictionary, function (index, value) { | |
7964 | - | |
7965 | - var bodyRegionRight = parseInt(value.X) + parseInt(value.Width); | |
7966 | - var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height); | |
7967 | - var TBRight = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.left).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.width).replace('px', '')); | |
7968 | - var TBBottom = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.top).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.height).replace('px', '')); | |
7969 | - var TBStartX = parseInt((document.getElementById('transparencyCanvas_'+ windowviewid).style.left).replace('px', '')); | |
7970 | - var TBStartY = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.top).replace('px', '')); | |
7971 | - | |
7972 | - if (TBStartX <= bodyRegionRight && value.X <= TBRight && TBStartY <= bodyRegionBottom && value.Y <= TBBottom) { | |
7973 | - | |
7974 | - if ($scope.GetwindowStoreData(windowviewid,'isTBDrawnOnBodyRegion') == false) { | |
7975 | - var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers'); | |
7976 | - var layer=$scope.GetwindowStoreData(windowviewid,'layerNumber'); | |
7977 | - if (layer < totalayer) { | |
7978 | - | |
7979 | - var layerup=layer+1; | |
7980 | - $scope.SetwindowStoreData(windowviewid,'layerNumber',layerup); | |
7981 | - } | |
7982 | - | |
7983 | - } | |
7984 | - | |
7985 | - if (value.bodyRegionId == '3') { | |
7986 | - | |
7987 | - var BR_SixTBData = new jinqJs() | |
7988 | - .from($scope.transparencyDrawnRegions) | |
7989 | - .where('BRID == 6') | |
7990 | - .select(); | |
8090 | + $scope.SetwindowStoreData(windowviewid, "isResized", true); | |
7991 | 8091 | |
7992 | - if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) { | |
7993 | 8092 | |
7994 | - $scope.canThirdBRDrawn = true; | |
8093 | + $scope.DrawTransparencyBox(windowviewid); | |
7995 | 8094 | |
7996 | - } | |
8095 | + // var transparencyCanvas = document.createElement('canvas'); | |
8096 | + // transparencyCanvas.id = 'transparencyCanvas_' + windowviewid; | |
8097 | + // $scope.transparencyCanvas = tCanvas.id; | |
8098 | + // transparencyCanvas.height = tCanvasHeight; | |
8099 | + // transparencyCanvas.width = tCanvasWidth; | |
8100 | + // transparencyCanvas.style.position = "absolute"; | |
8101 | + // transparencyCanvas.style.left = tCanvas.style.left; // x + "px"; | |
8102 | + // transparencyCanvas.style.top = tCanvas.style.top//y + "px"; | |
8103 | + // transparencyCanvas.style.border = "black 1px solid"; | |
8104 | + // transparencyCanvas.style.zIndex = 200; | |
7997 | 8105 | |
7998 | 8106 | |
7999 | - } | |
8000 | - | |
8001 | - if ((bodyVid == "9" || bodyVid == "11" || bodyVid == "2" || bodyVid == "3" || bodyVid == "6" ||bodyVid == "7")) { | |
8002 | - if (value.bodyRegionId == "6") { | |
8003 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8004 | - } | |
8005 | - else { | |
8006 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8007 | - } | |
8008 | - } | |
8009 | - else { | |
8010 | - if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) { | |
8107 | + // document.getElementById('canvasDivDA_' + windowviewid).appendChild(transparencyCanvas); | |
8011 | 8108 | |
8012 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8013 | - } | |
8109 | + // $('#transparencyCanvas_' + windowviewid).resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeTransparencyBox(windowviewid); }, start: function (event, ui) { clearTransCanvas(windowviewid); } }); | |
8110 | + // $(".ui-wrapper").css("z-index", $scope.GetwindowStoreData(windowviewid,'UIWrapperZIndex')); | |
8014 | 8111 | |
8015 | - else { | |
8016 | - | |
8017 | - if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) { | |
8018 | - | |
8019 | - //1. draw 6th | |
8020 | - var BRSixData = new jinqJs() | |
8021 | - .from(BodyRegionDictionary) | |
8022 | - .where('bodyRegionId == 6') | |
8023 | - .select(); | |
8024 | - var isMirror = BRSixData[0].IsMirror; | |
8025 | - if (isMirror == 'Yes') { | |
8026 | - //draw mirror arm | |
8027 | - $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'Yes', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8028 | - //draw non mirror arm | |
8029 | - $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'No', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8030 | - //draw 3rd BR | |
8031 | - $timeout(function () { | |
8032 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8033 | - }, 200); | |
8034 | - } | |
8035 | - else { | |
8036 | - //draw mirror arm | |
8037 | - $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'No', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8038 | - //draw non mirror arm | |
8039 | - $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'Yes', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8040 | - //draw 3rd BR | |
8041 | - $timeout(function () { | |
8042 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8043 | - }, 200); | |
8044 | - } | |
8112 | + // //bind click listener | |
8113 | + // transparencyCanvas.addEventListener('click', TransparencyCanvasClickListener); | |
8114 | + //} | |
8115 | + //$scope.transparencyCanvasHeight = tCanvasHeight; | |
8116 | + //$scope.transparencyCanvasWidth = tCanvasWidth; | |
8045 | 8117 | |
8046 | 8118 | |
8047 | - } | |
8048 | - else { | |
8049 | - var BR_SixTBData = new jinqJs() | |
8050 | - .from($scope.transparencyDrawnRegions) | |
8051 | - .where('BRID == 6') | |
8052 | - .select(); | |
8053 | - if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) { | |
8054 | - //do not draw 6 BR again, its already drawn | |
8055 | - } | |
8056 | - else | |
8057 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8058 | - } | |
8059 | - } | |
8060 | - } | |
8061 | - $scope.SetwindowStoreData(windowviewid,'isTBDrawnOnBodyRegion',true); | |
8062 | - } | |
8119 | + ////create temp cavas to retain the original anavs data for use in transparency change as | |
8120 | + ////if u use original canvas data for transprency change then at 0 transparency all data will become transparent and if u increase transparency with this data then the canavs will be blank | |
8121 | + //if (document.getElementById('tempCanvas_' + windowviewid) != null) { | |
8122 | + // $('#tempCanvas_'+ windowviewid).remove(); | |
8123 | + //} | |
8124 | + //var tempCanvas = document.createElement('canvas'); | |
8125 | + //tempCanvas.id = 'tempCanvas_' + windowviewid; | |
8126 | + //$scope.tempCanvas = tempCanvas.id; | |
8127 | + //tempCanvas.height = $scope.transparencyCanvasHeight; | |
8128 | + //tempCanvas.width = $scope.transparencyCanvasWidth; | |
8129 | + //tempCanvas.style.position = "absolute"; | |
8130 | + //tempCanvas.style.left = 200 + 'px'; | |
8131 | + //tempCanvas.style.backgroundColor = "transparent"; | |
8132 | + //tempCanvas.style.visibility = 'hidden'; | |
8133 | + //// tempCanvas.style.border = "black 1px solid"; | |
8134 | + | |
8135 | + //document.getElementById('canvasDivDA_' + windowviewid).appendChild(tempCanvas); | |
8136 | + | |
8137 | + //var BodyRegionDictionary = $scope.GetwindowStoreData(windowviewid,'BodyRegionCordinatesData'); | |
8138 | + | |
8139 | + //$scope.IncludedBodyRegions = []; | |
8140 | + //$scope.transparencyDrawnRegions = []; | |
8141 | + //$scope.canThirdBRDrawn = false; | |
8142 | + //var counter = 0; | |
8143 | + //var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId'); | |
8144 | + //$.each(BodyRegionDictionary, function (index, value) { | |
8145 | + | |
8146 | + // var bodyRegionRight = parseInt(value.X) + parseInt(value.Width); | |
8147 | + // var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height); | |
8148 | + // var TBRight = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.left).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.width).replace('px', '')); | |
8149 | + // var TBBottom = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.top).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.height).replace('px', '')); | |
8150 | + // var TBStartX = parseInt((document.getElementById('transparencyCanvas_'+ windowviewid).style.left).replace('px', '')); | |
8151 | + // var TBStartY = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.top).replace('px', '')); | |
8152 | + | |
8153 | + // if (TBStartX <= bodyRegionRight && value.X <= TBRight && TBStartY <= bodyRegionBottom && value.Y <= TBBottom) { | |
8154 | + | |
8155 | + // if ($scope.GetwindowStoreData(windowviewid,'isTBDrawnOnBodyRegion') == false) { | |
8156 | + // var totalayer=$scope.GetwindowStoreData(windowviewid,'totalLayers'); | |
8157 | + // var layer=$scope.GetwindowStoreData(windowviewid,'layerNumber'); | |
8158 | + // if (layer < totalayer) { | |
8159 | + | |
8160 | + // var layerup=layer+1; | |
8161 | + // $scope.SetwindowStoreData(windowviewid,'layerNumber',layerup); | |
8162 | + // } | |
8163 | + | |
8164 | + // } | |
8165 | + | |
8166 | + // if (value.bodyRegionId == '3') { | |
8167 | + | |
8168 | + // var BR_SixTBData = new jinqJs() | |
8169 | + // .from($scope.transparencyDrawnRegions) | |
8170 | + // .where('BRID == 6') | |
8171 | + // .select(); | |
8172 | + | |
8173 | + // if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) { | |
8174 | + | |
8175 | + // $scope.canThirdBRDrawn = true; | |
8176 | + | |
8177 | + // } | |
8178 | + | |
8179 | + | |
8180 | + // } | |
8181 | + | |
8182 | + // if ((bodyVid == "9" || bodyVid == "11" || bodyVid == "2" || bodyVid == "3" || bodyVid == "6" ||bodyVid == "7")) { | |
8183 | + // if (value.bodyRegionId == "6") { | |
8184 | + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8185 | + // } | |
8186 | + // else { | |
8187 | + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8188 | + // } | |
8189 | + // } | |
8190 | + // else { | |
8191 | + // if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) { | |
8192 | + | |
8193 | + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8194 | + // } | |
8195 | + | |
8196 | + // else { | |
8197 | + | |
8198 | + // if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) { | |
8199 | + | |
8200 | + // //1. draw 6th | |
8201 | + // var BRSixData = new jinqJs() | |
8202 | + // .from(BodyRegionDictionary) | |
8203 | + // .where('bodyRegionId == 6') | |
8204 | + // .select(); | |
8205 | + // var isMirror = BRSixData[0].IsMirror; | |
8206 | + // if (isMirror == 'Yes') { | |
8207 | + // //draw mirror arm | |
8208 | + // $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'Yes', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8209 | + // //draw non mirror arm | |
8210 | + // $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'No', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8211 | + // //draw 3rd BR | |
8212 | + // $timeout(function () { | |
8213 | + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8214 | + // }, 200); | |
8215 | + // } | |
8216 | + // else { | |
8217 | + // //draw mirror arm | |
8218 | + // $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'No', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8219 | + // //draw non mirror arm | |
8220 | + // $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'Yes', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8221 | + // //draw 3rd BR | |
8222 | + // $timeout(function () { | |
8223 | + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8224 | + // }, 200); | |
8225 | + // } | |
8226 | + | |
8227 | + | |
8228 | + // } | |
8229 | + // else { | |
8230 | + // var BR_SixTBData = new jinqJs() | |
8231 | + // .from($scope.transparencyDrawnRegions) | |
8232 | + // .where('BRID == 6') | |
8233 | + // .select(); | |
8234 | + // if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) { | |
8235 | + // //do not draw 6 BR again, its already drawn | |
8236 | + // } | |
8237 | + // else | |
8238 | + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8239 | + // } | |
8240 | + // } | |
8241 | + // } | |
8242 | + // $scope.SetwindowStoreData(windowviewid,'isTBDrawnOnBodyRegion',true); | |
8243 | + // } | |
8063 | 8244 | |
8064 | 8245 | |
8065 | - }) | |
8246 | + //}) | |
8066 | 8247 | |
8067 | - var isModestyOn=$scope.GetwindowStoreData(windowviewid,'isModestyOn'); | |
8068 | - var modestyImageInfo=$scope.GetwindowStoreData(windowviewid,'modestyImageInfo'); | |
8069 | - //for modesty | |
8070 | - if (isModestyOn == true && modestyImageInfo.length > 0) { | |
8071 | - $.each(modestyImageInfo, function (index, value) { | |
8248 | + //var isModestyOn=$scope.GetwindowStoreData(windowviewid,'isModestyOn'); | |
8249 | + //var modestyImageInfo=$scope.GetwindowStoreData(windowviewid,'modestyImageInfo'); | |
8250 | + ////for modesty | |
8251 | + //if (isModestyOn == true && modestyImageInfo.length > 0) { | |
8252 | + // $.each(modestyImageInfo, function (index, value) { | |
8072 | 8253 | |
8073 | - var bodyRegionRight = parseInt(value.x) + parseInt(value.Width); | |
8074 | - var bodyRegionBottom = parseInt(value.y) + parseInt(value.Height); | |
8075 | - var TBRight = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.left).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.width).replace('px', '')); | |
8076 | - var TBBottom = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.top).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.height).replace('px', '')); | |
8077 | - var TBStartX = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.left).replace('px', '')); | |
8078 | - var TBStartY = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.top).replace('px', '')); | |
8254 | + // var bodyRegionRight = parseInt(value.x) + parseInt(value.Width); | |
8255 | + // var bodyRegionBottom = parseInt(value.y) + parseInt(value.Height); | |
8256 | + // var TBRight = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.left).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.width).replace('px', '')); | |
8257 | + // var TBBottom = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.top).replace('px', '')) + parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.height).replace('px', '')); | |
8258 | + // var TBStartX = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.left).replace('px', '')); | |
8259 | + // var TBStartY = parseInt((document.getElementById('transparencyCanvas_' + windowviewid).style.top).replace('px', '')); | |
8079 | 8260 | |
8080 | - if (TBStartX <= bodyRegionRight && value.x <= TBRight && TBStartY <= bodyRegionBottom && value.y <= TBBottom) { | |
8261 | + // if (TBStartX <= bodyRegionRight && value.x <= TBRight && TBStartY <= bodyRegionBottom && value.y <= TBBottom) { | |
8081 | 8262 | |
8082 | - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.x, value.y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8263 | + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.x, value.y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true, windowviewid); | |
8083 | 8264 | |
8084 | - } | |
8085 | - }) | |
8265 | + // } | |
8266 | + // }) | |
8086 | 8267 | } |
8087 | 8268 | |
8088 | 8269 | } |
... | ... | @@ -8823,6 +9004,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8823 | 9004 | |
8824 | 9005 | if ($scope.GetwindowStoreData(windowviewid, 'isTransparent')) { |
8825 | 9006 | currentlayer = $scope.GetwindowStoreData(windowviewid, 'layerNumberBeforeTBDraw'); |
9007 | + $scope.SetwindowStoreData(windowviewid, 'currentLayerNumber', currentlayer); | |
8826 | 9008 | } |
8827 | 9009 | var sliderVal = parseInt(totalayer) - parseInt(currentlayer); |
8828 | 9010 | |
... | ... | @@ -8852,7 +9034,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8852 | 9034 | $('.ui-wrapper').remove(); |
8853 | 9035 | |
8854 | 9036 | $scope.SetwindowStoreData(windowviewid,'layerNumber',currentlayer); |
8855 | - $scope.SetwindowStoreData(windowviewid,'transNumber',100); | |
9037 | + $scope.SetwindowStoreData(windowviewid, 'transNumber', 100); | |
9038 | + | |
9039 | + $scope.SetwindowStoreData(windowviewid, 'isTransparencyBtnClicked', false); | |
9040 | + | |
9041 | + $scope.SetwindowStoreData(windowviewid, 'isZoomed', false); | |
9042 | + $scope.SetwindowStoreData(windowviewid, 'isResized', false); | |
9043 | + | |
8856 | 9044 | |
8857 | 9045 | } |
8858 | 9046 | var modestyTempCanvases = $("canvas[id*='tempCanvasModesty']"); |
... | ... | @@ -8968,9 +9156,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8968 | 9156 | |
8969 | 9157 | $scope.enableZoom = function (event) { |
8970 | 9158 | |
8971 | - var len= (event.currentTarget.id).split("_").length; | |
9159 | + | |
9160 | + var len = (event.currentTarget.id).split("_").length; | |
8972 | 9161 | var windowviewid = (event.currentTarget.id).split("_")[len-1]; |
8973 | 9162 | |
9163 | + | |
8974 | 9164 | $("#OnIdentify").removeClass("annotationtoolbartab"); |
8975 | 9165 | $("#DrawMode").removeClass("annotationtoolbartab"); |
8976 | 9166 | $('.btnCursor').removeClass('activebtncolor'); |
... | ... | @@ -8991,7 +9181,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8991 | 9181 | $('#btnTranparency_' + windowviewid).removeClass("disabled"); |
8992 | 9182 | $('#btnTranparency_' + windowviewid).css("pointer-events", "auto"); |
8993 | 9183 | |
8994 | - $rootScope.isTransparencyBoxActivated = false; | |
9184 | + // $rootScope.isTransparencyBoxActivated = false; | |
8995 | 9185 | $scope.SetwindowStoreData(windowviewid,'isNormalMode',false); |
8996 | 9186 | $scope.SetwindowStoreData(windowviewid,'isGenderChnage',false); |
8997 | 9187 | $scope.SetwindowStoreData(windowviewid,'isViewChange',false); |
... | ... | @@ -9006,10 +9196,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9006 | 9196 | |
9007 | 9197 | if ($scope.GetwindowStoreData(windowviewid,'isTransparencyActivated')) { |
9008 | 9198 | |
9009 | - $scope.CloseTransparencyBox(windowviewid); | |
9199 | + //$scope.CloseTransparencyBox(windowviewid); | |
9200 | + $scope.SetwindowStoreData(windowviewid, 'isZoomed', true); | |
9010 | 9201 | |
9011 | 9202 | } |
9012 | - $scope.SetwindowStoreData(windowviewid,'isZoomed',true); | |
9203 | + //$scope.SetwindowStoreData(windowviewid,'isZoomed',true); | |
9013 | 9204 | //1. |
9014 | 9205 | |
9015 | 9206 | $scope.flushCanvas(windowviewid); |
... | ... | @@ -9024,7 +9215,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9024 | 9215 | $('#zoomValueDA_' + windowviewid).attr('value', $scope.GetwindowStoreData(windowviewid,'zoomInOut')); |
9025 | 9216 | } |
9026 | 9217 | |
9027 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
9218 | + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); | |
9028 | 9219 | $scope.CalculateImageCordinates(viewOrientationId,windowviewid); |
9029 | 9220 | |
9030 | 9221 | |
... | ... | @@ -9047,6 +9238,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9047 | 9238 | $('#sppeachBubble_'+windowviewid).remove(); |
9048 | 9239 | } |
9049 | 9240 | |
9241 | + $scope.removeAllTermNumberForSaveCB(windowviewid); | |
9242 | + | |
9050 | 9243 | |
9051 | 9244 | } |
9052 | 9245 | |
... | ... | @@ -9161,7 +9354,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9161 | 9354 | $scope.flushCanvas(windowviewid); |
9162 | 9355 | |
9163 | 9356 | //3. |
9164 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
9357 | + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); | |
9358 | + | |
9165 | 9359 | $scope.CalculateImageCordinates(viewOrientationId,windowviewid); |
9166 | 9360 | |
9167 | 9361 | |
... | ... | @@ -9209,6 +9403,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9209 | 9403 | $scope.SetwindowStoreData(windowviewid, 'mode', "NORMAL"); |
9210 | 9404 | $scope.SetwindowStoreData(windowviewid, 'isNormalBtnClicked', true); |
9211 | 9405 | |
9406 | + | |
9212 | 9407 | $scope.SetwindowStoreData(windowviewid, 'previousHighlightList', []); |
9213 | 9408 | |
9214 | 9409 | $('#btnTranparency_' + windowviewid).removeClass("disabled"); |
... | ... | @@ -9271,6 +9466,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9271 | 9466 | } |
9272 | 9467 | |
9273 | 9468 | var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); |
9469 | + | |
9274 | 9470 | $scope.CalculateImageCordinates(viewOrientationId, windowviewid); |
9275 | 9471 | |
9276 | 9472 | var CanvasDivLeftPosition = $scope.GetwindowStoreData(windowviewid, 'CanvasDivLeftPosition'); |
... | ... | @@ -9330,6 +9526,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9330 | 9526 | |
9331 | 9527 | $scope.enableExtract = function (isCalledFromButton,windowviewid) { |
9332 | 9528 | $scope.SetwindowStoreData(windowviewid, 'mode', "EXTRACT"); |
9529 | + | |
9333 | 9530 | $scope.DisableUI(); |
9334 | 9531 | |
9335 | 9532 | console.log('isCalledFromButton= ' + isCalledFromButton); |
... | ... | @@ -9471,6 +9668,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9471 | 9668 | // $scope.CloseTransparencyBox(windowviewid); |
9472 | 9669 | $scope.GetwindowStoreData(windowviewid, 'isHighLight', true); |
9473 | 9670 | //Added Code by sandy to create Draw transparencybox autometically for save CB |
9671 | + //Need to Uncooment this Line-04-05-2020 | |
9474 | 9672 | //$scope.CalculateDimensionsAndDrawTBox(windowviewid); |
9475 | 9673 | //$timeout(function () { |
9476 | 9674 | |
... | ... | @@ -10347,6 +10545,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10347 | 10545 | } |
10348 | 10546 | else { |
10349 | 10547 | //actual term number is not found in thsi view menas previously selected body part does not exist in this view |
10548 | + | |
10350 | 10549 | $scope.CalculateImageCordinates(viewOrientationId, windowviewid) |
10351 | 10550 | } |
10352 | 10551 | } |
... | ... | @@ -10768,7 +10967,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10768 | 10967 | $scope.SetwindowStoreData(windowviewid,'isHighLight',true); |
10769 | 10968 | |
10770 | 10969 | if ($scope.GetwindowStoreData(windowviewid,'isExtract') == true) { |
10771 | - $scope.SetwindowStoreData(windowviewid,'isExtract',false); | |
10970 | + $scope.SetwindowStoreData(windowviewid, 'isExtract', false); | |
10971 | + | |
10772 | 10972 | $scope.CalculateImageCordinates(viewOrientationId, windowviewid); |
10773 | 10973 | } |
10774 | 10974 | else |
... | ... | @@ -11437,7 +11637,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11437 | 11637 | $('#spinner').css('visibility', 'visible'); |
11438 | 11638 | |
11439 | 11639 | //redraw body of respective layer |
11440 | - var viewOrientationId=$scope.GetwindowStoreData(windowviewid,'viewOrientationId'); | |
11640 | + var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); | |
11641 | + | |
11441 | 11642 | $scope.CalculateImageCordinates(viewOrientationId, windowviewid); |
11442 | 11643 | }, 500); |
11443 | 11644 | ... | ... |