Commit ef5fc94ab968439ff2f16c7235890169223f68f5

Authored by Amrita Vishnoi
1 parent 6511dc5a

Bug#21464 is merged manually

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