Commit 27b67d4fec71fdf17475fe905828f228d4058171
1 parent
98d24e4f
resolved bug.
rename a function.
Showing
1 changed file
with
13 additions
and
10 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
11 | 11 | $scope.imagePath = ""; |
12 | 12 | $rootScope.BodyRegionData; |
13 | 13 | $rootScope.BodyRegionCordinatesData; |
14 | - $scope.isTransparencyActivated = false; | |
14 | + $scope.isTransparencyActivated = false; | |
15 | 15 | $rootScope.BodyLayerData; |
16 | 16 | $rootScope.VocabTermData; |
17 | 17 | |
... | ... | @@ -37,6 +37,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
37 | 37 | //for transarency scale |
38 | 38 | $scope.TBDrawStartX; |
39 | 39 | $scope.TBDrawStartY; |
40 | + $scope.isTBDrawnOnBodyRegion; | |
40 | 41 | $rootScope.path = "~/../content/images/speeachBubbleClose.png"; |
41 | 42 | $rootScope.isHighLight = false; |
42 | 43 | $rootScope.coloredImageCanvasList = []; |
... | ... | @@ -3896,9 +3897,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3896 | 3897 | |
3897 | 3898 | |
3898 | 3899 | function mouseUpListener(e) { |
3899 | - // $selection.remove(); | |
3900 | - // debugger; | |
3901 | - | |
3900 | + | |
3901 | + $scope.isTBDrawnOnBodyRegion = false; | |
3902 | 3902 | //alert('mouse up'); |
3903 | 3903 | console.log('MOUSE UP'); |
3904 | 3904 | $(".com").remove(); |
... | ... | @@ -3984,7 +3984,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3984 | 3984 | document.getElementById('canvasDiv').appendChild(transparencyCanvas); |
3985 | 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 | 3989 | $scope.transparencyCanvasHeight = transparencyCanvas.height; |
3990 | 3990 | $scope.transparencyCanvasWidth = transparencyCanvas.width; |
... | ... | @@ -3997,6 +3997,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3997 | 3997 | } |
3998 | 3998 | if ($scope.TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && $scope.TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { |
3999 | 3999 | |
4000 | + $scope.isTBDrawnOnBodyRegion = true; | |
4000 | 4001 | |
4001 | 4002 | if (($rootScope.voId == "9" || $rootScope.voId == "11")) { |
4002 | 4003 | if (value.bodyRegionId == "6") { |
... | ... | @@ -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 | 4812 | clearTransCanvas(); |
4813 | 4813 | if ($('#speechBubbleTrns').length > 0) { |
4814 | 4814 | $('#speechBubbleTrns').remove(); |
... | ... | @@ -4850,6 +4850,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4850 | 4850 | |
4851 | 4851 | $scope.isResized = true; |
4852 | 4852 | |
4853 | + if ($scope.isTBDrawnOnBodyRegion == false) { | |
4854 | + $scope.layerNumber = $scope.layerNumber + 1; | |
4855 | + } | |
4853 | 4856 | |
4854 | 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 | 4871 | |
4869 | 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 | 4875 | $(".ui-wrapper").css("z-index", "600"); |
4873 | 4876 | |
4874 | 4877 | //bind click listener |
... | ... | @@ -4918,7 +4921,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4918 | 4921 | |
4919 | 4922 | |
4920 | 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 | ... | ... |