Commit 6e6effe3a35b3888f4be327e1a2f95a821b7b4e0

Authored by Nikita Kulshreshtha
1 parent 9c3f0aab

fixed in normal cse. need to see on resize and layer chnage

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -4383,7 +4383,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4383,7 +4383,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4383 4383
4384 } 4384 }
4385 4385
4386 - if (($rootScope.voId == "9" || $rootScope.voId == "11")) { 4386 + if (($rootScope.voId == "9" || $rootScope.voId == "11" || $rootScope.voId == "2" || $rootScope.voId == "3" || $rootScope.voId == "6" || $rootScope.voId == "7")) {
4387 if (value.bodyRegionId == "6") { 4387 if (value.bodyRegionId == "6") {
4388 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); 4388 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false);
4389 } 4389 }
@@ -5526,57 +5526,67 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -5526,57 +5526,67 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
5526 5526
5527 } 5527 }
5528 //$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); 5528 //$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);
  5529 + //if (($rootScope.voId == "9" || $rootScope.voId == "11" || $rootScope.voId == "2" || $rootScope.voId == "3" || $rootScope.voId == "6" || $rootScope.voId == "7")) {
  5530 + // if (value.bodyRegionId == "6") {
  5531 + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false);
  5532 + // }
  5533 + // else {
  5534 + // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false);
  5535 + // }
  5536 + //}
  5537 + // else
  5538 + // {
  5539 + if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) {
5529 5540
5530 - if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) { 5541 + $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);
  5542 + }
5531 5543
5532 - $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);  
5533 - } 5544 + else {
5534 5545
5535 - else { 5546 + if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) {
  5547 +
  5548 + //1. draw 6th
  5549 + var BRSixData = new jinqJs()
  5550 + .from(BodyRegionDictionary)
  5551 + .where('bodyRegionId == 6')
  5552 + .select();
  5553 + var isMirror = BRSixData[0].IsMirror;
  5554 + if (isMirror == 'Yes') {
  5555 + //draw mirror arm
  5556 + $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);
  5557 + //draw non mirror arm
  5558 + $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);
  5559 + //draw 3rd BR
  5560 + $timeout(function () {
  5561 + $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);
  5562 + }, 200);
  5563 + }
  5564 + else {
  5565 + //draw mirror arm
  5566 + $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);
  5567 + //draw non mirror arm
  5568 + $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);
  5569 + //draw 3rd BR
  5570 + $timeout(function () {
  5571 + $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);
  5572 + }, 200);
  5573 + }
5536 5574
5537 - if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) {  
5538 5575
5539 - //1. draw 6th  
5540 - var BRSixData = new jinqJs()  
5541 - .from(BodyRegionDictionary)  
5542 - .where('bodyRegionId == 6')  
5543 - .select();  
5544 - var isMirror = BRSixData[0].IsMirror;  
5545 - if (isMirror == 'Yes') {  
5546 - //draw mirror arm  
5547 - $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);  
5548 - //draw non mirror arm  
5549 - $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);  
5550 - //draw 3rd BR  
5551 - $timeout(function () {  
5552 - $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);  
5553 - }, 200);  
5554 } 5576 }
5555 else { 5577 else {
5556 - //draw mirror arm  
5557 - $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);  
5558 - //draw non mirror arm  
5559 - $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);  
5560 - //draw 3rd BR  
5561 - $timeout(function () { 5578 + var BR_SixTBData = new jinqJs()
  5579 + .from($scope.transparencyDrawnRegions)
  5580 + .where('BRID == 6')
  5581 + .select();
  5582 + if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) {
  5583 + //do not draw 6 BR again, its already drawn
  5584 + }
  5585 + else
5562 $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); 5586 $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);
5563 - }, 200);  
5564 - }  
5565 -  
5566 -  
5567 - }  
5568 - else {  
5569 - var BR_SixTBData = new jinqJs()  
5570 - .from($scope.transparencyDrawnRegions)  
5571 - .where('BRID == 6')  
5572 - .select();  
5573 - if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) {  
5574 - //do not draw 6 BR again, its already drawn  
5575 } 5587 }
5576 - else  
5577 - $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);  
5578 } 5588 }
5579 - } 5589 + // }
5580 $scope.isTBDrawnOnBodyRegion = true; 5590 $scope.isTBDrawnOnBodyRegion = true;
5581 } 5591 }
5582 5592