diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 7875fb1..40548ee 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -5865,12 +5865,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
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, false, windowviewid);
+ $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, false, windowviewid);
//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, false, windowviewid);
+ $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, false, windowviewid);
//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, false, windowviewid);
+ $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, false, windowviewid);
}, 200);
}
else {
@@ -6751,8 +6751,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.changeTransparency = function (windowviewid) {
//this changes the transparency when user click on transparency scale(we have already set the original
//data on tras canvas irrespective of the trans number, so we can chnage the transparnecy of original data not the manipulated)
-
- var transNumber = $scope.GetwindowStoreData(windowviewid,'transNumber');
+ console.log("INSIDE CHANGETRANS>>>>>>>>")
+ var transNumber = $scope.GetwindowStoreData(windowviewid, 'transNumber');
+ console.log("transNumber= " + transNumber);
var bodyVid=$scope.GetwindowStoreData(windowviewid,'voId');
var isHighLight=$scope.GetwindowStoreData(windowviewid,'isHighLight');
var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
@@ -6828,18 +6829,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var imageData1 = imageDa1.data;
var length = imageData1.length;
- if (isHighLight) {
- if (bodyVid == "9" || bodyVid == "11") {
-
- var c = 0;
- for (var i = 0; i < imageData1.length; i += 4) {
- if (imageData1[i] == imageData1[i + 1] && imageData1[i + 1] == imageData1[i + 2] && imageData1[i + 2] === 0) {
- imageData1[i + 3] = 0;
- }
- }
- ctx.putImageData(imageDa1, 0, 0);
- }
- }
// set every fourth value to selected transparency
var imageDa = ctx.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight);
@@ -7675,7 +7664,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var originalTransparencyData = tempCanvasContext.getImageData(0, 0, $scope.transparencyCanvasWidth, $scope.transparencyCanvasHeight);
if ($scope.GetwindowStoreData(windowviewid, 'isHighLight') == true) {
- $timeout(function () {
+ //$timeout(function () {
//var tempTransCanvas = document.getElementById(tempCanvasID);
//var tempCanvasContext = tempTransCanvas.getContext('2d');
@@ -7686,11 +7675,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
img.src = dataURL;
img.onload = function () {
- console.log("TBIMG LOADDDDDDDDLLLLLL")
+
var DAData = new BitmapData(parseInt(tempCanavs.width), parseInt(tempCanavs.height));
DAData.draw(img);
- var colorMode = $scope.applyGrayMatrix(img, ctx);
+ var colorMode = $scope.applyGrayMatrix(img, tempCanvasContext);
if (colorMode != undefined || colorMode != null) {
@@ -7717,9 +7706,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
- }, 50);
+ //}, 50);
}
else {
+
ctx.putImageData(originalTransparencyData, 0, 0);
}
@@ -7736,10 +7726,60 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
var modestyTransCanvasId = 'modestyTransCanavs_' + brId + "_" + windowviewid;
if (document.getElementById(modestyTransTempCanvasId) != null) {
+
var tempCanvasContext = document.getElementById(modestyTransTempCanvasId).getContext('2d');
var originalTransparencyData = tempCanvasContext.getImageData(0, 0, value.Width, value.Height);
var ctx = document.getElementById(modestyTransCanvasId).getContext('2d');
- ctx.putImageData(originalTransparencyData, 0, 0);
+
+ if ($scope.GetwindowStoreData(windowviewid, 'isHighLight') == true) {
+ //$timeout(function () {
+
+ //var tempTransCanvas = document.getElementById(tempCanvasID);
+ //var tempCanvasContext = tempTransCanvas.getContext('2d');
+
+ var dataURL = document.getElementById(modestyTransTempCanvasId).toDataURL();
+
+ var img = new Image();
+ img.src = dataURL;
+
+ img.onload = function () {
+
+ var DAData = new BitmapData(parseInt(document.getElementById(modestyTransTempCanvasId).width), parseInt(document.getElementById(modestyTransTempCanvasId).height));
+ DAData.draw(img);
+
+ var colorMode = $scope.applyGrayMatrix(img, tempCanvasContext);
+
+ if (colorMode != undefined || colorMode != null) {
+
+ var zeroPoint = new Point();
+
+ DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
+
+ ctx.putImageData(DAData.data, 0, 0);
+
+
+
+ //black issue
+ var imgData = ctx.getImageData(0, 0, ocument.getElementById(modestyTransTempCanvasId).ocument.getElementById(modestyTransTempCanvasId), transCanvas.height);
+ var data = imgData.data;
+ var c = 0;
+ for (var i = 0; i < data.length; i += 4) {
+ if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) {
+ data[i + 3] = 0;
+ }
+
+ }
+ ctx.putImageData(imgData, 0, 0);
+ }
+ }
+
+
+ //}, 50);
+ }
+ else {
+
+ ctx.putImageData(originalTransparencyData, 0, 0);
+ }
}
})
}