From 51b63df6bd59e562ad8946648fb9bcff09ff87c0 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 20 Nov 2017 15:47:12 +0530 Subject: [PATCH] bug is fixed --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 34e2a0e..2f57002 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -4674,7 +4674,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.loadTransparencyImage = function (bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged, isResized) { - alert('bodyRegionId = ' + bodyRegionId) var transparencyCanvas = document.getElementById('transparencyCanvas'); TransparencyBoxStartX = parseInt((transparencyCanvas.style.left).replace('px', '')); @@ -4694,6 +4693,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var HeightforTransImage = TBImageDimensions.HeightforTransImageTB; var YforTransImage = TBImageDimensions.YforTransImageTB; + //0. get current layer number if (isResized) { //do nothing @@ -5008,7 +5008,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var modestyCanavs = document.getElementById(modestyTransCanvases[j].id); - if ((parseInt(lowerlayerNumberForModesty) <= parseInt($scope.layerNumber)) && (HigherlayerNumberForModesty) > parseInt($scope.layerNumber)) { + if ($rootScope.isModestyOn == true && (parseInt(lowerlayerNumberForModesty) <= parseInt($scope.layerNumber)) && (HigherlayerNumberForModesty) > parseInt($scope.layerNumber)) { modestyCanavs.style.visibility = 'visible'; } @@ -5045,7 +5045,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l XforCopyImage = 0; WidthforCopyImage = Width; WidthforTransImage = Width; - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { + + if ((bodyRegionId.match('modestyImg'))) { XforTransImage = 0; } else @@ -5059,7 +5060,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l WidthforTransImage = parseInt(TransparencyEndX) - parseInt(X); - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { + if ((bodyRegionId.match('modestyImg'))) { XforTransImage = 0; } else @@ -5072,7 +5073,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l WidthforCopyImage = parseInt(X) + parseInt(Width) - parseInt(TransparencyBoxStartX); WidthforTransImage = parseInt(X) + parseInt(Width) - parseInt(TransparencyBoxStartX); - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { + if ((bodyRegionId.match('modestyImg'))) { XforTransImage = parseInt(TransparencyBoxStartX) - parseInt(X); } @@ -5083,7 +5084,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l XforCopyImage = parseInt(TransparencyBoxStartX) - parseInt(X);//parseInt(X) + parseInt(Width) - parseInt(scope.TransparencyBoxStartX)// scope.TransparencyBoxStartX ; WidthforCopyImage = parseInt(TransparencyEndX) - parseInt(TransparencyBoxStartX); WidthforTransImage = parseInt(TransparencyEndX) - parseInt(TransparencyBoxStartX); - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { + if ((bodyRegionId.match('modestyImg'))) { XforTransImage = parseInt(TransparencyBoxStartX) - parseInt(X); } @@ -5100,7 +5101,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l HeightforCopyImage = Height; HeightforTransImage = Height; - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { + + if ((bodyRegionId.match('modestyImg'))) { YforTransImage = 0; } else @@ -5113,7 +5115,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l HeightforTransImage = (parseInt(TransparencyBoxEndY)) - parseInt(Y)// - parseInt(scope.TransparencyBoxStartY)); - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { + if ((bodyRegionId.match('modestyImg'))) { YforTransImage = 0; } else @@ -5125,8 +5127,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l YforCopyImage = parseInt(TransparencyBoxStartY) - parseInt(Y); HeightforCopyImage = parseInt(Y) + parseInt(Height) - parseInt(TransparencyBoxStartY); HeightforTransImage = parseInt(Y) + parseInt(Height) - parseInt(TransparencyBoxStartY); - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { - YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y); + + if ((bodyRegionId.match('modestyImg'))) { + YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y); } else @@ -5138,7 +5141,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l YforCopyImage = parseInt(TransparencyBoxStartY) - parseInt(Y); HeightforCopyImage = parseInt(TransparencyBoxEndY) - parseInt(TransparencyBoxStartY); HeightforTransImage = parseInt(TransparencyBoxEndY) - parseInt(TransparencyBoxStartY); - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { + + if ((bodyRegionId.match('modestyImg'))) { YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y); } @@ -5215,6 +5219,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.DrawOnTBWithSelectedTransparency = function (tempCanvasID, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage, Height, Width, bodyRegionId, isLayerChanged, isResized) { + + var transNumber = $scope.transNumber;//txtTransparencyChange.value; //this changes the transparency when transparency is already activated and user resizes or chage the layer @@ -5290,12 +5296,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } - alert('$rootScope.isModestyOn = ' + $rootScope.isModestyOn) ctx.putImageData(imageD1, 0, 0); if ($rootScope.isModestyOn) - document.getElementById('modestyTransCanvasId').style.visibility = 'visible'; + document.getElementById('modestyTransCanavs_' + bodyRegionId).style.visibility = 'visible'; else - document.getElementById('modestyTransCanvasId').style.visibility = 'hidden'; + document.getElementById('modestyTransCanavs_' + bodyRegionId).style.visibility = 'hidden'; } -- libgit2 0.21.4