Commit 58e6b68d35a385e6cebd03d51ef56005e94829ad

Authored by Amrita Vishnoi
2 parents ca615b74 5fbc9df7

Merge branch 'Bug#20467' of http://52.6.196.163/ADAM/AIAHTML5 into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -3317,10 +3317,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -3317,10 +3317,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3317 //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); 3317 //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value);
3318 3318
3319 $scope.layerNumber = parseInt(txtlayerNumber.value); 3319 $scope.layerNumber = parseInt(txtlayerNumber.value);
3320 - 3320 + if (($rootScope.voId == "9" || $rootScope.voId == "11" || $rootScope.voId == "2" || $rootScope.voId == "3" || $rootScope.voId == "6" || $rootScope.voId == "7")) {
  3321 + if (value.bodyRegionId == "6") {
  3322 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, true, false, false);
  3323 + }
  3324 + else {
  3325 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, true, false, false);
  3326 + }
  3327 + }
  3328 + else {
3321 if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) { 3329 if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) {
3322 3330
3323 - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); 3331 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false, false);
3324 } 3332 }
3325 3333
3326 else { 3334 else {
@@ -3366,6 +3374,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -3366,6 +3374,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3366 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false, false); 3374 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false, false);
3367 } 3375 }
3368 } 3376 }
  3377 + }
3369 3378
3370 } 3379 }
3371 3380
@@ -4386,7 +4395,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4386,7 +4395,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4386 4395
4387 } 4396 }
4388 4397
4389 - if (($rootScope.voId == "9" || $rootScope.voId == "11")) { 4398 + if (($rootScope.voId == "9" || $rootScope.voId == "11" || $rootScope.voId == "2" || $rootScope.voId == "3" || $rootScope.voId == "6" || $rootScope.voId == "7")) {
4390 if (value.bodyRegionId == "6") { 4399 if (value.bodyRegionId == "6") {
4391 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); 4400 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false);
4392 } 4401 }
@@ -5529,55 +5538,65 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -5529,55 +5538,65 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
5529 5538
5530 } 5539 }
5531 //$scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false); 5540 //$scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false);
  5541 + if (($rootScope.voId == "9" || $rootScope.voId == "11" || $rootScope.voId == "2" || $rootScope.voId == "3" || $rootScope.voId == "6" || $rootScope.voId == "7")) {
  5542 + if (value.bodyRegionId == "6") {
  5543 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5544 + }
  5545 + else {
  5546 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5547 + }
  5548 + }
  5549 + else
  5550 + {
  5551 + if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) {
5532 5552
5533 - if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) { 5553 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5554 + }
5534 5555
5535 - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);  
5536 - } 5556 + else {
5537 5557
5538 - else { 5558 + if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) {
  5559 +
  5560 + //1. draw 6th
  5561 + var BRSixData = new jinqJs()
  5562 + .from(BodyRegionDictionary)
  5563 + .where('bodyRegionId == 6')
  5564 + .select();
  5565 + var isMirror = BRSixData[0].IsMirror;
  5566 + if (isMirror == 'Yes') {
  5567 + //draw mirror arm
  5568 + $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'Yes', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5569 + //draw non mirror arm
  5570 + $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'No', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5571 + //draw 3rd BR
  5572 + $timeout(function () {
  5573 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5574 + }, 200);
  5575 + }
  5576 + else {
  5577 + //draw mirror arm
  5578 + $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'No', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5579 + //draw non mirror arm
  5580 + $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'Yes', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5581 + //draw 3rd BR
  5582 + $timeout(function () {
  5583 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
  5584 + }, 200);
  5585 + }
5539 5586
5540 - if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) {  
5541 5587
5542 - //1. draw 6th  
5543 - var BRSixData = new jinqJs()  
5544 - .from(BodyRegionDictionary)  
5545 - .where('bodyRegionId == 6')  
5546 - .select();  
5547 - var isMirror = BRSixData[0].IsMirror;  
5548 - if (isMirror == 'Yes') {  
5549 - //draw mirror arm  
5550 - $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'Yes', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);  
5551 - //draw non mirror arm  
5552 - $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'No', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);  
5553 - //draw 3rd BR  
5554 - $timeout(function () {  
5555 - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);  
5556 - }, 200);  
5557 } 5588 }
5558 else { 5589 else {
5559 - //draw mirror arm  
5560 - $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'No', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);  
5561 - //draw non mirror arm  
5562 - $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'Yes', $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);  
5563 - //draw 3rd BR  
5564 - $timeout(function () { 5590 + var BR_SixTBData = new jinqJs()
  5591 + .from($scope.transparencyDrawnRegions)
  5592 + .where('BRID == 6')
  5593 + .select();
  5594 + if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) {
  5595 + //do not draw 6 BR again, its already drawn
  5596 + }
  5597 + else
5565 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true); 5598 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
5566 - }, 200);  
5567 } 5599 }
5568 -  
5569 -  
5570 - }  
5571 - else {  
5572 - var BR_SixTBData = new jinqJs()  
5573 - .from($scope.transparencyDrawnRegions)  
5574 - .where('BRID == 6')  
5575 - .select();  
5576 - if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) {  
5577 - //do not draw 6 BR again, its already drawn  
5578 - }  
5579 - else  
5580 - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);  
5581 } 5600 }
5582 } 5601 }
5583 $scope.isTBDrawnOnBodyRegion = true; 5602 $scope.isTBDrawnOnBodyRegion = true;