Commit a966bef7c15381e176ea529ea1c560b0afba820d

Authored by Amrita Vishnoi
2 parents b6559926 27b67d4f

Merge branch 'Bug#12343' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
11 $scope.imagePath = ""; 11 $scope.imagePath = "";
12 $rootScope.BodyRegionData; 12 $rootScope.BodyRegionData;
13 $rootScope.BodyRegionCordinatesData; 13 $rootScope.BodyRegionCordinatesData;
14 - $scope.isTransparencyActivated = false; 14 + $scope.isTransparencyActivated = false;
15 $rootScope.BodyLayerData; 15 $rootScope.BodyLayerData;
16 $rootScope.VocabTermData; 16 $rootScope.VocabTermData;
17 17
@@ -37,6 +37,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -37,6 +37,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
37 //for transarency scale 37 //for transarency scale
38 $scope.TBDrawStartX; 38 $scope.TBDrawStartX;
39 $scope.TBDrawStartY; 39 $scope.TBDrawStartY;
  40 + $scope.isTBDrawnOnBodyRegion;
40 $rootScope.path = "~/../content/images/speeachBubbleClose.png"; 41 $rootScope.path = "~/../content/images/speeachBubbleClose.png";
41 $rootScope.isHighLight = false; 42 $rootScope.isHighLight = false;
42 $rootScope.coloredImageCanvasList = []; 43 $rootScope.coloredImageCanvasList = [];
@@ -3896,9 +3897,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -3896,9 +3897,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3896 3897
3897 3898
3898 function mouseUpListener(e) { 3899 function mouseUpListener(e) {
3899 - // $selection.remove();  
3900 - // debugger;  
3901 - 3900 +
  3901 + $scope.isTBDrawnOnBodyRegion = false;
3902 //alert('mouse up'); 3902 //alert('mouse up');
3903 console.log('MOUSE UP'); 3903 console.log('MOUSE UP');
3904 $(".com").remove(); 3904 $(".com").remove();
@@ -3984,7 +3984,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -3984,7 +3984,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3984 document.getElementById('canvasDiv').appendChild(transparencyCanvas); 3984 document.getElementById('canvasDiv').appendChild(transparencyCanvas);
3985 $scope.transparencyChangeCounter = 0; 3985 $scope.transparencyChangeCounter = 0;
3986 3986
3987 - $('#transparencyCanvas').resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeCanvas(); }, start: function (event, ui) { clearTransCanvas(); } }); 3987 + $('#transparencyCanvas').resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeTransparencyBox(); }, start: function (event, ui) { clearTransCanvas(); } });
3988 3988
3989 $scope.transparencyCanvasHeight = transparencyCanvas.height; 3989 $scope.transparencyCanvasHeight = transparencyCanvas.height;
3990 $scope.transparencyCanvasWidth = transparencyCanvas.width; 3990 $scope.transparencyCanvasWidth = transparencyCanvas.width;
@@ -3997,6 +3997,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -3997,6 +3997,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3997 } 3997 }
3998 if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { 3998 if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) {
3999 3999
  4000 + $scope.isTBDrawnOnBodyRegion = true;
4000 4001
4001 if (($rootScope.voId == "9" || $rootScope.voId == "11")) { 4002 if (($rootScope.voId == "9" || $rootScope.voId == "11")) {
4002 if (value.bodyRegionId == "6") { 4003 if (value.bodyRegionId == "6") {
@@ -4806,9 +4807,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -4806,9 +4807,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4806 4807
4807 4808
4808 4809
4809 - function resizeCanvas() {  
4810 - //debugger;  
4811 - // alert('reload') 4810 + function resizeTransparencyBox() {
  4811 +
4812 clearTransCanvas(); 4812 clearTransCanvas();
4813 if ($('#speechBubbleTrns').length > 0) { 4813 if ($('#speechBubbleTrns').length > 0) {
4814 $('#speechBubbleTrns').remove(); 4814 $('#speechBubbleTrns').remove();
@@ -4850,6 +4850,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -4850,6 +4850,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4850 4850
4851 $scope.isResized = true; 4851 $scope.isResized = true;
4852 4852
  4853 + if ($scope.isTBDrawnOnBodyRegion == false) {
  4854 + $scope.layerNumber = $scope.layerNumber + 1;
  4855 + }
4853 4856
4854 if (tCanvasHeight != $scope.transparencyCanvasHeight || tCanvasWidth != $scope.transparencyCanvasWidth) { 4857 if (tCanvasHeight != $scope.transparencyCanvasHeight || tCanvasWidth != $scope.transparencyCanvasWidth) {
4855 4858
@@ -4868,7 +4871,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -4868,7 +4871,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4868 4871
4869 document.getElementById('canvasDiv').appendChild(transparencyCanvas); 4872 document.getElementById('canvasDiv').appendChild(transparencyCanvas);
4870 4873
4871 - $('#transparencyCanvas').resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeCanvas(); }, start: function (event, ui) { clearTransCanvas(); } }); 4874 + $('#transparencyCanvas').resizable({ handles: "e,s,se,w,n,ne,nw,sw", stop: function (event, ui) { resizeTransparencyBox(); }, start: function (event, ui) { clearTransCanvas(); } });
4872 $(".ui-wrapper").css("z-index", "600"); 4875 $(".ui-wrapper").css("z-index", "600");
4873 4876
4874 //bind click listener 4877 //bind click listener
@@ -4918,7 +4921,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -4918,7 +4921,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4918 4921
4919 4922
4920 $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); 4923 $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);
4921 - 4924 + $scope.isTBDrawnOnBodyRegion = true;
4922 } 4925 }
4923 4926
4924 4927