diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index fbf7a84..f5e5c66 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -1781,7 +1781,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
transparencyTempCanvas.style.position = "absolute";
transparencyTempCanvas.style.left = X + 'px' // x + "px";
transparencyTempCanvas.style.top = Y + "px"//y + "px";
- transparencyTempCanvas.style.visibility = 'hidden';
+ transparencyTempCanvas.style.visibility = 'hidden';
//transparencyTempCanvas.style.visibility = 'visible';
// transparencyCanvas.style.zIndex = 4000;
document.getElementById('canvasDiv').appendChild(transparencyTempCanvas);
@@ -1875,15 +1875,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var imageData = imageD.data;
var length = imageData.length;
- // set every fourth value to 50
- for (var i = 3; i < length; i += 4) {
- imageData[i] = ((255) * (parseInt(transNumber))) / 100;
+ //change background of image from transparent to white
+ if ($scope.voId == 9 || $scope.voId == 11) {
+ for (var i = 3; i < length; i += 4) {
+ imageData[i] = '#FFFFFFFF';
+ }
+
+ tempCtx.putImageData(imageD, 0, 0);
+
+ var imageDWhite = tempCtx.getImageData(0, 0, Width, Height);
+ var imageDataWhite = imageDWhite.data;
+ var lengthW = imageDataWhite.length;
+ //
+ for (var i = 3; i < lengthW; i += 4) {
+ imageDataWhite[i] = ((255) * (parseInt(transNumber))) / 100;
+ }
+
+ // imageD.data = imageData;
+ // and put the imagedata back to the canvas
+ // debugger
+ tempCtx.putImageData(imageDWhite, 0, 0);
}
+ else {
+
- // imageD.data = imageData;
- // and put the imagedata back to the canvas
- // debugger
- tempCtx.putImageData(imageD, 0, 0);
+ // set every fourth value to 50
+ for (var i = 3; i < length; i += 4) {
+ imageData[i] = ((255) * (parseInt(transNumber))) / 100;
+ }
+
+ // imageD.data = imageData;
+ // and put the imagedata back to the canvas
+ // debugger
+ tempCtx.putImageData(imageD, 0, 0);
+ }
+
}
@@ -2408,8 +2434,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.layerNumber = 0;
$scope.isTransparencyActivated = false;
//})
+
+ debugger;
+ var tempCanvases = $("canvas[id*='transparencyTempCanvas']");
+ for (var i = 0; i < tempCanvases.length; i++) {
+ tempCanvases[i].remove();
+ }
+
+ $('.ui-wrapper').remove();
+
+ //$("canvas[name*='transparencyTempCanvas']").nextUntil($("canvas[name*='transparencyTempCanvas']"))
+ //.remove();
}
- $('#transparencyScale').css('visibility', 'hidden')
+ $('#transparencyScale').css('visibility', 'hidden');
+
$scope.isTransparencyActivated = false;
// document.getElementById('btnTranparency').className = 't-transparency'
$('#btnTranparency').removeClass('tButtonActive');
@@ -2489,12 +2527,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.OnGenderChange = function (event) {
// debugger;
//use $scope.correspondingBodyViewIds for getting correspnding viewid
- // alert('gender changed= ' + event.currentTarget.attributes[1].value)
+ // alert('gender changed= ' + event.currentTarget.attributes[1].value)
+
+ // $(".enableGender li").removeClass("active");
+ // $(event.currentTarget.attributes[2].value).parent().addClass("active");
+
+
+
if ((event.currentTarget.attributes[1].value == 'Male') && (localStorage.getItem("genderId") == 'Female')) {
localStorage.setItem("genderId", 'Male');
- $scope.changeGender()
+ $scope.changeGender();
}