From 789fb21c05d45c1282ec93561db62398aeace703 Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 12 Apr 2017 12:17:59 +0530 Subject: [PATCH] resize issue is fixed but black issue on modesty. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 64 +++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 7f3232f..edab59e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2972,7 +2972,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo 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); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); } else { @@ -2987,23 +2987,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo 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); + $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, 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); + $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, false); //draw 3rd BR $timeout(function () { - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false, false); },200); } 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); + $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, 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); + $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, false); //draw 3rd BR $timeout(function () { - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false, false); }, 200); } @@ -3015,7 +3015,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .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); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, true, false, false); } } @@ -4036,16 +4036,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo 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); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, 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); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); } } else { 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); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); } else { @@ -4060,22 +4060,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo 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); + $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, 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); + $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, false); //draw 3rd BR $timeout(function () { - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); }, 200); } 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); + $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, 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); + $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, false); //draw mirror arm $timeout(function () { - $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); }, 200); } @@ -4087,7 +4087,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .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); + $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, TransparencyEndX, $scope.TransparencyBoxStartY, TransparencyBoxEndY, $scope, false, false, false); } } @@ -4222,7 +4222,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } - $scope.loadTransparencyImage = function (bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged) { + $scope.loadTransparencyImage = function (bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged, isResized) { var transparencyCanvas = document.getElementById('transparencyCanvas'); @@ -4245,7 +4245,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var YforTransImage = TBImageDimensions.YforTransImageTB; //0. get current layer number - if ($scope.isResized) { + if (isResized) { //do nothing } else if (isLayerChanged) { @@ -5047,8 +5047,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } - $scope.isResized = true; - + if (tCanvasHeight != $scope.transparencyCanvasHeight || tCanvasWidth != $scope.transparencyCanvasWidth) { @@ -5139,7 +5138,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo 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); + $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); } else { @@ -5154,22 +5153,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo 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); + $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); //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); + $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); //draw 3rd BR $timeout(function () { - $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.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); },200); } 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); + $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); //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); + $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); //draw 3rd BR $timeout(function () { - $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.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); }, 200); } @@ -5184,7 +5183,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //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.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); } } $scope.isTBDrawnOnBodyRegion = true; @@ -5211,13 +5210,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (TBStartX <= bodyRegionRight && value.x <= TBRight && TBStartY <= bodyRegionBottom && value.y <= TBBottom) { - $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.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); } }) } - - $scope.isResized = false; + } -- libgit2 0.21.4