Commit c374b9763a88810c4ba20e50400250aa7044f3c3

Authored by Nikita Kulshreshtha
1 parent f8bc5ef8

renamed a variable.

added commnets.
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -2884,12 +2884,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2884 2884  
2885 2885 if (value.bodyRegionId == '3') {
2886 2886  
2887   - var BR6 = new jinqJs()
  2887 + var BR_SixTBData = new jinqJs()
2888 2888 .from($scope.transparencyDrawnRegions)
2889 2889 .where('BRID == 6')
2890 2890 .select();
2891 2891  
2892   - if (BR6 != null && BR6 != undefined && BR6.length > 0) {
  2892 + if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) {
2893 2893  
2894 2894 $scope.canThirdBRDrawn = true;
2895 2895  
... ... @@ -2924,42 +2924,37 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2924 2924 .select();
2925 2925 var isMirror = BRSixData[0].IsMirror;
2926 2926 if (isMirror == 'Yes') {
  2927 + //draw mirror arm
2927 2928 $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);
  2929 + //draw non mirror arm
2928 2930 $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);
2929   - $timeout(function () {
2930   - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
  2931 + //draw 3rd BR
  2932 + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
2931 2933  
2932   - },200)// $scope.transparencyDrawnRegions.push({'BRID':'6'});
  2934 +
2933 2935 }
2934 2936 else {
  2937 + //draw mirror arm
2935 2938 $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);
  2939 + //draw non mirror arm
2936 2940 $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);
2937   - $timeout(function () {
  2941 + //draw 3rd BR
2938 2942 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
2939   - }, 200)// $scope.transparencyDrawnRegions.push({ 'BRID': '6' });
  2943 +
2940 2944 }
2941   - //$timeout(function () {
2942   -
2943   - // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
2944   -
2945   - // }, 500);
2946   -
2947   - //2. draw 3rd
2948   -
  2945 +
2949 2946 }
2950 2947 else {
2951   - var BR6 = new jinqJs()
  2948 + var BR_SixTBData = new jinqJs()
2952 2949 .from($scope.transparencyDrawnRegions)
2953 2950 .where('BRID == 6')
2954 2951 .select();
2955   - if (value.bodyRegionId == "6" && BR6 != undefined && BR6 != null && BR6.length>0) { }
  2952 + if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length>0) { }
2956 2953 else
2957 2954 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false);
2958 2955 }
2959 2956 }
2960 2957  
2961   -
2962   - //$scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, TransparencyBoxStartX, transparencyBoxRight, TransparencyBoxStartY, transparencyBoxBottom, $scope, true, false);
2963 2958 }
2964 2959  
2965 2960  
... ... @@ -4235,12 +4230,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4235 4230  
4236 4231 if (value.bodyRegionId == '3') {
4237 4232  
4238   - var BR6 = new jinqJs()
  4233 + var BR_SixTBData = new jinqJs()
4239 4234 .from($scope.transparencyDrawnRegions)
4240 4235 .where('BRID == 6')
4241 4236 .select();
4242 4237  
4243   - if (BR6 != null && BR6 != undefined && BR6.length > 0) {
  4238 + if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) {
4244 4239  
4245 4240 $scope.canThirdBRDrawn = true;
4246 4241  
... ... @@ -4274,32 +4269,31 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4274 4269 .select();
4275 4270 var isMirror = BRSixData[0].IsMirror;
4276 4271 if (isMirror == 'Yes') {
  4272 + //draw mirror arm
4277 4273 $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);
  4274 + //draw non mirror arm
4278 4275 $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);
  4276 + //draw 3rd BR
4279 4277 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
4280   - // $scope.transparencyDrawnRegions.push({'BRID':'6'});
  4278 +
4281 4279 }
4282 4280 else {
  4281 + //draw mirror arm
4283 4282 $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);
  4283 + //draw mirror arm
4284 4284 $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);
  4285 + //draw mirror arm
4285 4286 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
4286   - // $scope.transparencyDrawnRegions.push({ 'BRID': '6' });
  4287 +
4287 4288 }
4288   - //$timeout(function () {
4289   -
4290   - // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
4291   -
4292   - // }, 500);
4293   -
4294   - //2. draw 3rd
4295   -
  4289 +
4296 4290 }
4297 4291 else {
4298   - var BR6 = new jinqJs()
  4292 + var BR_SixTBData = new jinqJs()
4299 4293 .from($scope.transparencyDrawnRegions)
4300 4294 .where('BRID == 6')
4301 4295 .select();
4302   - if (value.bodyRegionId == "6" && BR6 != undefined && BR6 != null && BR6.length>0) { }
  4296 + if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length>0) { }
4303 4297 else
4304 4298 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
4305 4299 }
... ... @@ -5335,12 +5329,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5335 5329  
5336 5330 if (value.bodyRegionId == '3') {
5337 5331  
5338   - var BR6 = new jinqJs()
  5332 + var BR_SixTBData = new jinqJs()
5339 5333 .from($scope.transparencyDrawnRegions)
5340 5334 .where('BRID == 6')
5341 5335 .select();
5342 5336  
5343   - if (BR6 != null && BR6 != undefined && BR6.length > 0) {
  5337 + if (BR_SixTBData != null && BR_SixTBData != undefined && BR_SixTBData.length > 0) {
5344 5338  
5345 5339 $scope.canThirdBRDrawn = true;
5346 5340  
... ... @@ -5366,32 +5360,33 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5366 5360 .select();
5367 5361 var isMirror = BRSixData[0].IsMirror;
5368 5362 if (isMirror == 'Yes') {
  5363 + //draw mirror arm
5369 5364 $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);
  5365 + //draw non mirror arm
5370 5366 $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);
  5367 + //draw 3rd BR
5371 5368 $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);
5372   - // $scope.transparencyDrawnRegions.push({'BRID':'6'});
  5369 +
5373 5370 }
5374 5371 else {
  5372 + //draw mirror arm
5375 5373 $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);
  5374 + //draw non mirror arm
5376 5375 $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);
  5376 + //draw 3rd BR
5377 5377 $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);
5378   - // $scope.transparencyDrawnRegions.push({ 'BRID': '6' });
5379 5378 }
5380   - //$timeout(function () {
5381   -
5382   - // $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false);
5383   -
5384   - // }, 500);
5385   -
5386   - //2. draw 3rd
  5379 +
5387 5380  
5388 5381 }
5389 5382 else {
5390   - var BR6 = new jinqJs()
  5383 + var BR_SixTBData = new jinqJs()
5391 5384 .from($scope.transparencyDrawnRegions)
5392 5385 .where('BRID == 6')
5393 5386 .select();
5394   - if (value.bodyRegionId == "6" && BR6 != undefined && BR6 != null && BR6.length > 0) { }
  5387 + if (value.bodyRegionId == "6" && BR_SixTBData != undefined && BR_SixTBData != null && BR_SixTBData.length > 0) {
  5388 + //do not draw 6 BR again, its already drawn
  5389 + }
5395 5390 else
5396 5391 $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);
5397 5392 }
... ... @@ -5406,8 +5401,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5406 5401 //for modesty
5407 5402 if ($rootScope.isModestyOn == true && $scope.modestyImageInfo.length > 0) {
5408 5403 $.each($scope.modestyImageInfo, function (index, value) {
5409   - // alert(' $.each(BodyRegionDictionary1')
5410   -
5411 5404  
5412 5405 var bodyRegionRight = parseInt(value.x) + parseInt(value.Width);
5413 5406 var bodyRegionBottom = parseInt(value.y) + parseInt(value.Height);
... ... @@ -5428,9 +5421,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5428 5421 })
5429 5422 }
5430 5423  
5431   - // });
5432   - //$(".ui-wrapper").css("z-index", "600");
5433   - $scope.isResized = false;
  5424 + $scope.isResized = false;
5434 5425 }
5435 5426  
5436 5427  
... ...