diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index ad90e32..2e37ee0 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -2874,10 +2874,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData;
+ $scope.transparencyDrawnRegions = [];
+ $scope.canThirdBRDrawn = false;
+
+
$.each(BodyRegionDictionary, function (index, value) {
//debugger;
// alert(' $.each(BodyRegionDictionary1')
+ if (value.bodyRegionId == '3') {
+
+ var BR_SixTBData = new jinqJs()
+ .from($scope.transparencyDrawnRegions)
+ .where('BRID == 6')
+ .select();
+
+ if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) {
+
+ $scope.canThirdBRDrawn = true;
+
+ }
+
+
+ }
+
var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height);
@@ -2888,8 +2908,53 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// debugger;
$scope.layerNumber = parseInt(txtlayerNumber.value);
+ if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) {
+
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+ }
+
+ else {
+
+ if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) {
- $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, transparencyBoxRight, TransparencyBoxStartY, transparencyBoxBottom, $scope, true, false);
+ //1. draw 6th
+ var BRSixData = new jinqJs()
+ .from(BodyRegionDictionary)
+ .where('bodyRegionId == 6')
+ .select();
+ var isMirror = BRSixData[0].IsMirror;
+ if (isMirror == 'Yes') {
+ //draw mirror arm
+ $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'Yes', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
+ //draw non mirror arm
+ $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'No', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
+ //draw 3rd BR
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
+
+
+ }
+ else {
+ //draw mirror arm
+ $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'No', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
+ //draw non mirror arm
+ $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'Yes', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
+ //draw 3rd BR
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
+
+ }
+
+ }
+ else {
+ var BR_SixTBData = new jinqJs()
+ .from($scope.transparencyDrawnRegions)
+ .where('BRID == 6')
+ .select();
+ if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length>0) { }
+ else
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
+ }
+ }
+
}
@@ -4117,6 +4182,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.IncludedBodyRegions = [];
$scope.transparencyDrawnRegions = [];
+ $scope.canThirdBRDrawn = false;
$.each(BodyRegionDictionary, function (index, value) {
@@ -4162,19 +4228,80 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.isTBDrawnOnBodyRegion = true;
+ if (value.bodyRegionId == '3') {
+
+ var BR_SixTBData = new jinqJs()
+ .from($scope.transparencyDrawnRegions)
+ .where('BRID == 6')
+ .select();
+
+ if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) {
+
+ $scope.canThirdBRDrawn = true;
+
+ }
+
+
+ }
+
if (($rootScope.voId == "9" || $rootScope.voId == "11")) {
if (value.bodyRegionId == "6") {
$scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
}
else {
-
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
}
}
else {
- $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+ if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) {
+
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+ }
+
+ else {
- }
- }
+ if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) {
+
+ //1. draw 6th
+ var BRSixData = new jinqJs()
+ .from(BodyRegionDictionary)
+ .where('bodyRegionId == 6')
+ .select();
+ var isMirror = BRSixData[0].IsMirror;
+ if (isMirror == 'Yes') {
+ //draw mirror arm
+ $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'Yes', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+ //draw non mirror arm
+ $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'No', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+ //draw 3rd BR
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+
+ }
+ else {
+ //draw mirror arm
+ $scope.loadTransparencyImage(BRSixData[0].bodyRegionId, BRSixData[0].Height, BRSixData[0].Width, BRSixData[0].X, BRSixData[0].Y, 'No', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+ //draw mirror arm
+ $scope.loadTransparencyImage(BRSixData[1].bodyRegionId, BRSixData[1].Height, BRSixData[1].Width, BRSixData[1].X, BRSixData[1].Y, 'Yes', $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+ //draw mirror arm
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+
+ }
+
+ }
+ else {
+ var BR_SixTBData = new jinqJs()
+ .from($scope.transparencyDrawnRegions)
+ .where('BRID == 6')
+ .select();
+ if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length>0) { }
+ else
+ $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
+ }
+ }
+
+ }
+
+ }
})
//for modesty
@@ -4593,7 +4720,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
//set modesty image visiblility true/false as per layer
-
+ // if(bodyRegionId.match('modestyImg3'))
var layerInfo = new jinqJs()
.from($scope.layerInfoForModesty)
@@ -4625,6 +4752,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
+
}
}
@@ -4870,8 +4998,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// var ctx = transparencyCanvas.getContext('2d');
ctx.drawImage(tmpCanvasContext, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage)
- $scope.transparencyDrawnRegions.push(bodyRegionId);
-
+ // $scope.transparencyDrawnRegions.push(bodyRegionId);
+ $scope.transparencyDrawnRegions.push({'BRID': bodyRegionId});
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
@@ -5178,6 +5306,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.IncludedBodyRegions = [];
$scope.transparencyDrawnRegions = [];
+ $scope.canThirdBRDrawn = false;
// $scope.layerNo = parseInt(document.getElementById(''))
var counter = 0;
$.each(BodyRegionDictionary, function (index, value) {
@@ -5197,7 +5326,71 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if ($scope.isTBDrawnOnBodyRegion == false) {
$scope.layerNumber = $scope.layerNumber + 1;
}
- $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);
+
+ if (value.bodyRegionId == '3') {
+
+ var BR_SixTBData = new jinqJs()
+ .from($scope.transparencyDrawnRegions)
+ .where('BRID == 6')
+ .select();
+
+ if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) {
+
+ $scope.canThirdBRDrawn = true;
+
+ }
+
+
+ }
+ //$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);
+
+ if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) {
+
+ $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);
+ }
+
+ else {
+
+ if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == false) {
+
+ //1. draw 6th
+ var BRSixData = new jinqJs()
+ .from(BodyRegionDictionary)
+ .where('bodyRegionId == 6')
+ .select();
+ var isMirror = BRSixData[0].IsMirror;
+ if (isMirror == 'Yes') {
+ //draw mirror arm
+ $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);
+ //draw non mirror arm
+ $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);
+ //draw 3rd BR
+ $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);
+
+ }
+ else {
+ //draw mirror arm
+ $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);
+ //draw non mirror arm
+ $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);
+ //draw 3rd BR
+ $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);
+ }
+
+
+ }
+ else {
+ var BR_SixTBData = new jinqJs()
+ .from($scope.transparencyDrawnRegions)
+ .where('BRID == 6')
+ .select();
+ if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) {
+ //do not draw 6 BR again, its already drawn
+ }
+ else
+ $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);
+ }
+ }
$scope.isTBDrawnOnBodyRegion = true;
}
@@ -5208,8 +5401,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//for modesty
if ($rootScope.isModestyOn == true && $scope.modestyImageInfo.length > 0) {
$.each($scope.modestyImageInfo, function (index, value) {
- // alert(' $.each(BodyRegionDictionary1')
-
var bodyRegionRight = parseInt(value.x) + parseInt(value.Width);
var bodyRegionBottom = parseInt(value.y) + parseInt(value.Height);
@@ -5230,9 +5421,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
})
}
- // });
- //$(".ui-wrapper").css("z-index", "600");
- $scope.isResized = false;
+ $scope.isResized = false;
}