Commit 2d6e04de8aabd96a1423fa60410d03cb8bd78929

Authored by Amrita Vishnoi
2 parents 58e6b68d 91a26525

Merge branch 'Bug#21464' of http://52.6.196.163/ADAM/AIAHTML5 into DevStable30Aug17

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -2940,34 +2940,36 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -2940,34 +2940,36 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
2940 var grayCanvasMRY; 2940 var grayCanvasMRY;
2941 2941
2942 //draw a canvas for same bodyregion wich will be flipped after coloring the body system 2942 //draw a canvas for same bodyregion wich will be flipped after coloring the body system
2943 - if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) { 2943 + if ($rootScope.voId == "1" || $rootScope.voId == "4" || $rootScope.voId == "5" || $rootScope.voId == "8") {
  2944 + if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) {
2944 2945
2945 2946
2946 - var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR';  
2947 - var grayCanvasMR = document.getElementById(grayCanvasMRID);  
2948 - grayCanvasMRX = grayCanvasMR.style.left;  
2949 - grayCanvasMRY = grayCanvasMR.style.top; 2947 + var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR';
  2948 + var grayCanvasMR = document.getElementById(grayCanvasMRID);
  2949 + grayCanvasMRX = grayCanvasMR.style.left;
  2950 + grayCanvasMRY = grayCanvasMR.style.top;
2950 2951
2951 - var FlipedImgCanvas = document.createElement('canvas');  
2952 - FlipedImgCanvas.height = canvasHeight;  
2953 - FlipedImgCanvas.width = canvasWidth;  
2954 - FlipedImgCanvas.setAttribute("data-IsMirrored", "Y")  
2955 - FlipedImgCanvas.style.position = "absolute";  
2956 - FlipedImgCanvas.style.left = canvasX + "px";  
2957 - FlipedImgCanvas.style.top = canvasY + "px";  
2958 - FlipedImgCanvas.style.visibility = 'hidden';  
2959 - FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR'; 2952 + var FlipedImgCanvas = document.createElement('canvas');
  2953 + FlipedImgCanvas.height = canvasHeight;
  2954 + FlipedImgCanvas.width = canvasWidth;
  2955 + FlipedImgCanvas.setAttribute("data-IsMirrored", "Y")
  2956 + FlipedImgCanvas.style.position = "absolute";
  2957 + FlipedImgCanvas.style.left = canvasX + "px";
  2958 + FlipedImgCanvas.style.top = canvasY + "px";
  2959 + FlipedImgCanvas.style.visibility = 'hidden';
  2960 + FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR';
2960 2961
2961 - //remove previous canavs  
2962 - $('#' + grayCanvasMRID).remove(); 2962 + //remove previous canavs
  2963 + $('#' + grayCanvasMRID).remove();
2963 2964
2964 - //add new canvas on same location and after flipping it will be added to mirrored position  
2965 - document.getElementById('canvasDiv').appendChild(FlipedImgCanvas);  
2966 - //put grayData 2965 + //add new canvas on same location and after flipping it will be added to mirrored position
  2966 + document.getElementById('canvasDiv').appendChild(FlipedImgCanvas);
  2967 + //put grayData
2967 2968
2968 - var filppedCanvasContx = FlipedImgCanvas.getContext("2d");  
2969 - filppedCanvasContx.putImageData(gData, 0, 0); 2969 + var filppedCanvasContx = FlipedImgCanvas.getContext("2d");
  2970 + filppedCanvasContx.putImageData(gData, 0, 0);
2970 2971
  2972 + }
2971 } 2973 }
2972 2974
2973 grayImageDataVar = null; 2975 grayImageDataVar = null;