From 6e6effe3a35b3888f4be327e1a2f95a821b7b4e0 Mon Sep 17 00:00:00 2001 From: nikita Date: Fri, 25 Aug 2017 16:15:51 +0530 Subject: [PATCH] fixed in normal cse. need to see on resize and layer chnage --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------ 1 file changed, 52 insertions(+), 42 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 6e2b55e..c3aaea8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -4383,7 +4383,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } - if (($rootScope.voId == "9" || $rootScope.voId == "11")) { + if (($rootScope.voId == "9" || $rootScope.voId == "11" || $rootScope.voId == "2" || $rootScope.voId == "3" || $rootScope.voId == "6" || $rootScope.voId == "7")) { 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, false); } @@ -5526,57 +5526,67 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } //$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 (($rootScope.voId == "9" || $rootScope.voId == "11" || $rootScope.voId == "2" || $rootScope.voId == "3" || $rootScope.voId == "6" || $rootScope.voId == "7")) { + // 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, 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, false); + // } + //} + // else + // { + if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) { - 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, 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, true); - } + else { - 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, 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, 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, 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, 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, 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, true); + }, 200); + } - 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, 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, 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, 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, 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, true); - //draw 3rd BR - $timeout(function () { + 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, true); - }, 200); - } - - - } - 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, true); } - } + // } $scope.isTBDrawnOnBodyRegion = true; } -- libgit2 0.21.4