Commit 51b63df6bd59e562ad8946648fb9bcff09ff87c0

Authored by Nikita Kulshreshtha
1 parent 96e4a996

bug is fixed

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -4674,7 +4674,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4674,7 +4674,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4674 4674
4675 $scope.loadTransparencyImage = function (bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged, isResized) { 4675 $scope.loadTransparencyImage = function (bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged, isResized) {
4676 4676
4677 - alert('bodyRegionId = ' + bodyRegionId)  
4678 var transparencyCanvas = document.getElementById('transparencyCanvas'); 4677 var transparencyCanvas = document.getElementById('transparencyCanvas');
4679 4678
4680 TransparencyBoxStartX = parseInt((transparencyCanvas.style.left).replace('px', '')); 4679 TransparencyBoxStartX = parseInt((transparencyCanvas.style.left).replace('px', ''));
@@ -4694,6 +4693,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4694,6 +4693,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4694 var HeightforTransImage = TBImageDimensions.HeightforTransImageTB; 4693 var HeightforTransImage = TBImageDimensions.HeightforTransImageTB;
4695 var YforTransImage = TBImageDimensions.YforTransImageTB; 4694 var YforTransImage = TBImageDimensions.YforTransImageTB;
4696 4695
  4696 +
4697 //0. get current layer number 4697 //0. get current layer number
4698 if (isResized) { 4698 if (isResized) {
4699 //do nothing 4699 //do nothing
@@ -5008,7 +5008,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -5008,7 +5008,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
5008 5008
5009 var modestyCanavs = document.getElementById(modestyTransCanvases[j].id); 5009 var modestyCanavs = document.getElementById(modestyTransCanvases[j].id);
5010 5010
5011 - if ((parseInt(lowerlayerNumberForModesty) <= parseInt($scope.layerNumber)) && (HigherlayerNumberForModesty) > parseInt($scope.layerNumber)) { 5011 + if ($rootScope.isModestyOn == true && (parseInt(lowerlayerNumberForModesty) <= parseInt($scope.layerNumber)) && (HigherlayerNumberForModesty) > parseInt($scope.layerNumber)) {
5012 5012
5013 modestyCanavs.style.visibility = 'visible'; 5013 modestyCanavs.style.visibility = 'visible';
5014 } 5014 }
@@ -5045,7 +5045,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5045,7 +5045,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5045 XforCopyImage = 0; 5045 XforCopyImage = 0;
5046 WidthforCopyImage = Width; 5046 WidthforCopyImage = Width;
5047 WidthforTransImage = Width; 5047 WidthforTransImage = Width;
5048 - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { 5048 +
  5049 + if ((bodyRegionId.match('modestyImg'))) {
5049 XforTransImage = 0; 5050 XforTransImage = 0;
5050 } 5051 }
5051 else 5052 else
@@ -5059,7 +5060,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5059,7 +5060,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5059 5060
5060 WidthforTransImage = parseInt(TransparencyEndX) - parseInt(X); 5061 WidthforTransImage = parseInt(TransparencyEndX) - parseInt(X);
5061 5062
5062 - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { 5063 + if ((bodyRegionId.match('modestyImg'))) {
5063 XforTransImage = 0; 5064 XforTransImage = 0;
5064 } 5065 }
5065 else 5066 else
@@ -5072,7 +5073,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5072,7 +5073,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5072 WidthforCopyImage = parseInt(X) + parseInt(Width) - parseInt(TransparencyBoxStartX); 5073 WidthforCopyImage = parseInt(X) + parseInt(Width) - parseInt(TransparencyBoxStartX);
5073 WidthforTransImage = parseInt(X) + parseInt(Width) - parseInt(TransparencyBoxStartX); 5074 WidthforTransImage = parseInt(X) + parseInt(Width) - parseInt(TransparencyBoxStartX);
5074 5075
5075 - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { 5076 + if ((bodyRegionId.match('modestyImg'))) {
5076 5077
5077 XforTransImage = parseInt(TransparencyBoxStartX) - parseInt(X); 5078 XforTransImage = parseInt(TransparencyBoxStartX) - parseInt(X);
5078 } 5079 }
@@ -5083,7 +5084,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5083,7 +5084,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5083 XforCopyImage = parseInt(TransparencyBoxStartX) - parseInt(X);//parseInt(X) + parseInt(Width) - parseInt(scope.TransparencyBoxStartX)// scope.TransparencyBoxStartX ; 5084 XforCopyImage = parseInt(TransparencyBoxStartX) - parseInt(X);//parseInt(X) + parseInt(Width) - parseInt(scope.TransparencyBoxStartX)// scope.TransparencyBoxStartX ;
5084 WidthforCopyImage = parseInt(TransparencyEndX) - parseInt(TransparencyBoxStartX); 5085 WidthforCopyImage = parseInt(TransparencyEndX) - parseInt(TransparencyBoxStartX);
5085 WidthforTransImage = parseInt(TransparencyEndX) - parseInt(TransparencyBoxStartX); 5086 WidthforTransImage = parseInt(TransparencyEndX) - parseInt(TransparencyBoxStartX);
5086 - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { 5087 + if ((bodyRegionId.match('modestyImg'))) {
5087 5088
5088 XforTransImage = parseInt(TransparencyBoxStartX) - parseInt(X); 5089 XforTransImage = parseInt(TransparencyBoxStartX) - parseInt(X);
5089 } 5090 }
@@ -5100,7 +5101,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5100,7 +5101,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5100 HeightforCopyImage = Height; 5101 HeightforCopyImage = Height;
5101 5102
5102 HeightforTransImage = Height; 5103 HeightforTransImage = Height;
5103 - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { 5104 +
  5105 + if ((bodyRegionId.match('modestyImg'))) {
5104 YforTransImage = 0; 5106 YforTransImage = 0;
5105 } 5107 }
5106 else 5108 else
@@ -5113,7 +5115,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5113,7 +5115,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5113 5115
5114 HeightforTransImage = (parseInt(TransparencyBoxEndY)) - parseInt(Y)// - parseInt(scope.TransparencyBoxStartY)); 5116 HeightforTransImage = (parseInt(TransparencyBoxEndY)) - parseInt(Y)// - parseInt(scope.TransparencyBoxStartY));
5115 5117
5116 - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { 5118 + if ((bodyRegionId.match('modestyImg'))) {
5117 YforTransImage = 0; 5119 YforTransImage = 0;
5118 } 5120 }
5119 else 5121 else
@@ -5125,8 +5127,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5125,8 +5127,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5125 YforCopyImage = parseInt(TransparencyBoxStartY) - parseInt(Y); 5127 YforCopyImage = parseInt(TransparencyBoxStartY) - parseInt(Y);
5126 HeightforCopyImage = parseInt(Y) + parseInt(Height) - parseInt(TransparencyBoxStartY); 5128 HeightforCopyImage = parseInt(Y) + parseInt(Height) - parseInt(TransparencyBoxStartY);
5127 HeightforTransImage = parseInt(Y) + parseInt(Height) - parseInt(TransparencyBoxStartY); 5129 HeightforTransImage = parseInt(Y) + parseInt(Height) - parseInt(TransparencyBoxStartY);
5128 - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) {  
5129 - YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y); 5130 +
  5131 + if ((bodyRegionId.match('modestyImg'))) {
  5132 + YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y);
5130 5133
5131 } 5134 }
5132 else 5135 else
@@ -5138,7 +5141,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5138,7 +5141,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5138 YforCopyImage = parseInt(TransparencyBoxStartY) - parseInt(Y); 5141 YforCopyImage = parseInt(TransparencyBoxStartY) - parseInt(Y);
5139 HeightforCopyImage = parseInt(TransparencyBoxEndY) - parseInt(TransparencyBoxStartY); 5142 HeightforCopyImage = parseInt(TransparencyBoxEndY) - parseInt(TransparencyBoxStartY);
5140 HeightforTransImage = parseInt(TransparencyBoxEndY) - parseInt(TransparencyBoxStartY); 5143 HeightforTransImage = parseInt(TransparencyBoxEndY) - parseInt(TransparencyBoxStartY);
5141 - if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { 5144 +
  5145 + if ((bodyRegionId.match('modestyImg'))) {
5142 YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y); 5146 YforTransImage = parseInt(TransparencyBoxStartY) - parseInt(Y);
5143 5147
5144 } 5148 }
@@ -5215,6 +5219,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5215,6 +5219,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5215 5219
5216 $scope.DrawOnTBWithSelectedTransparency = function (tempCanvasID, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage, Height, Width, bodyRegionId, isLayerChanged, isResized) { 5220 $scope.DrawOnTBWithSelectedTransparency = function (tempCanvasID, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage, Height, Width, bodyRegionId, isLayerChanged, isResized) {
5217 5221
  5222 +
  5223 +
5218 var transNumber = $scope.transNumber;//txtTransparencyChange.value; 5224 var transNumber = $scope.transNumber;//txtTransparencyChange.value;
5219 //this changes the transparency when transparency is already activated and user resizes or chage the layer 5225 //this changes the transparency when transparency is already activated and user resizes or chage the layer
5220 5226
@@ -5290,12 +5296,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5290,12 +5296,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5290 5296
5291 } 5297 }
5292 5298
5293 - alert('$rootScope.isModestyOn = ' + $rootScope.isModestyOn)  
5294 ctx.putImageData(imageD1, 0, 0); 5299 ctx.putImageData(imageD1, 0, 0);
5295 if ($rootScope.isModestyOn) 5300 if ($rootScope.isModestyOn)
5296 - document.getElementById('modestyTransCanvasId').style.visibility = 'visible'; 5301 + document.getElementById('modestyTransCanavs_' + bodyRegionId).style.visibility = 'visible';
5297 else 5302 else
5298 - document.getElementById('modestyTransCanvasId').style.visibility = 'hidden'; 5303 + document.getElementById('modestyTransCanavs_' + bodyRegionId).style.visibility = 'hidden';
5299 5304
5300 } 5305 }
5301 5306