diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 062be34..55ecf6a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2938,34 +2938,36 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var grayCanvasMRY; //draw a canvas for same bodyregion wich will be flipped after coloring the body system - if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) { + if ($rootScope.voId == "1" || $rootScope.voId == "4" || $rootScope.voId == "5" || $rootScope.voId == "8") { + if (TermExistInBodyRegionId == 4 || TermExistInBodyRegionId == 5 || TermExistInBodyRegionId == 6) { - var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR'; - var grayCanvasMR = document.getElementById(grayCanvasMRID); - grayCanvasMRX = grayCanvasMR.style.left; - grayCanvasMRY = grayCanvasMR.style.top; + var grayCanvasMRID = 'imageCanvas' + TermExistInBodyRegionId + '_MR'; + var grayCanvasMR = document.getElementById(grayCanvasMRID); + grayCanvasMRX = grayCanvasMR.style.left; + grayCanvasMRY = grayCanvasMR.style.top; - var FlipedImgCanvas = document.createElement('canvas'); - FlipedImgCanvas.height = canvasHeight; - FlipedImgCanvas.width = canvasWidth; - FlipedImgCanvas.setAttribute("data-IsMirrored", "Y") - FlipedImgCanvas.style.position = "absolute"; - FlipedImgCanvas.style.left = canvasX + "px"; - FlipedImgCanvas.style.top = canvasY + "px"; - FlipedImgCanvas.style.visibility = 'hidden'; - FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR'; + var FlipedImgCanvas = document.createElement('canvas'); + FlipedImgCanvas.height = canvasHeight; + FlipedImgCanvas.width = canvasWidth; + FlipedImgCanvas.setAttribute("data-IsMirrored", "Y") + FlipedImgCanvas.style.position = "absolute"; + FlipedImgCanvas.style.left = canvasX + "px"; + FlipedImgCanvas.style.top = canvasY + "px"; + FlipedImgCanvas.style.visibility = 'hidden'; + FlipedImgCanvas.id = 'imageCanvas' + TermExistInBodyRegionId + '_MR'; - //remove previous canavs - $('#' + grayCanvasMRID).remove(); + //remove previous canavs + $('#' + grayCanvasMRID).remove(); - //add new canvas on same location and after flipping it will be added to mirrored position - document.getElementById('canvasDiv').appendChild(FlipedImgCanvas); - //put grayData + //add new canvas on same location and after flipping it will be added to mirrored position + document.getElementById('canvasDiv').appendChild(FlipedImgCanvas); + //put grayData - var filppedCanvasContx = FlipedImgCanvas.getContext("2d"); - filppedCanvasContx.putImageData(gData, 0, 0); + var filppedCanvasContx = FlipedImgCanvas.getContext("2d"); + filppedCanvasContx.putImageData(gData, 0, 0); + } } grayImageDataVar = null;