Commit 06514d4024ec8f70f7125d88415991ef241a37da
1 parent
fb6cba87
layer number should shown same as the transaprency layer on tbox draw-fixed
Showing
1 changed file
with
14 additions
and
4 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -1202,6 +1202,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1202 | 1202 | |
1203 | 1203 | //layer change function |
1204 | 1204 | $scope.LayerChange = function () { |
1205 | + // alert('layer chnage') | |
1206 | + | |
1205 | 1207 | var canvasDiv = document.getElementById('canvasDiv'); |
1206 | 1208 | $scope.imageVerticalScrollPosition = canvasDiv.scrollTop; |
1207 | 1209 | $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; |
... | ... | @@ -1212,6 +1214,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1212 | 1214 | |
1213 | 1215 | |
1214 | 1216 | if ($scope.isTransparencyActivated) { |
1217 | + | |
1215 | 1218 | //crete temp canavs to store the original data which will be used to chnange the transparency |
1216 | 1219 | if (document.getElementById('tempCanvas') != null) { |
1217 | 1220 | $('#tempCanvas').remove(); |
... | ... | @@ -1265,6 +1268,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1265 | 1268 | // alert(' $.each(BodyRegionDictionary3. bodyRegionRight: ' + bodyRegionRight + ', bodyRegionBottom: ' + bodyRegionBottom) |
1266 | 1269 | if (TransparencyBoxStartX <= bodyRegionRight && value.X <= transparencyBoxRight && TransparencyBoxStartY <= bodyRegionBottom && value.Y <= transparencyBoxBottom) { |
1267 | 1270 | //var transNumber = parseInt(document.getElementById("txtTransparencyChange").value); |
1271 | + debugger; | |
1268 | 1272 | $scope.layerNumber = parseInt(txtlayerNumber.value); |
1269 | 1273 | |
1270 | 1274 | |
... | ... | @@ -1276,6 +1280,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1276 | 1280 | } |
1277 | 1281 | |
1278 | 1282 | else { |
1283 | + $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); | |
1279 | 1284 | |
1280 | 1285 | $rootScope.isLoading = true; |
1281 | 1286 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -1454,7 +1459,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1454 | 1459 | function mouseUpListener(e) { |
1455 | 1460 | // $selection.remove(); |
1456 | 1461 | // debugger; |
1457 | - | |
1462 | + | |
1463 | + $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); | |
1458 | 1464 | $('.rectangle').remove(); |
1459 | 1465 | |
1460 | 1466 | var currentMousePosition = $scope.getMousePos(e); |
... | ... | @@ -1592,6 +1598,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1592 | 1598 | $('#btnTranparency').removeClass('btn-black'); |
1593 | 1599 | |
1594 | 1600 | $('#btnTranparency').addClass('tButtonActive'); |
1601 | + debugger; | |
1602 | + $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber))+1); | |
1595 | 1603 | } |
1596 | 1604 | |
1597 | 1605 | $scope.loadTransparencyImage = function (bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged) { |
... | ... | @@ -1735,6 +1743,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1735 | 1743 | //do nothing |
1736 | 1744 | } |
1737 | 1745 | else if (isLayerChanged) { |
1746 | + debugger | |
1738 | 1747 | $scope.layerNumber = parseInt($('#txtlayerNumber').val()); |
1739 | 1748 | } |
1740 | 1749 | else { |
... | ... | @@ -1988,7 +1997,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1988 | 1997 | PreviousBodyRegionX = XforTransImage; |
1989 | 1998 | previousBodyRegionId = bodyRegionId; |
1990 | 1999 | |
1991 | - $scope.layerNumber = parseInt($scope.layerNumber - 1); | |
2000 | + // $scope.layerNumber = parseInt($scope.layerNumber - 1); | |
1992 | 2001 | |
1993 | 2002 | } |
1994 | 2003 | |
... | ... | @@ -2437,10 +2446,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2437 | 2446 | //var txtTransparencyChange = document.getElementById("txtTransparencyChange"); |
2438 | 2447 | //txtTransparencyChange.value = 0; |
2439 | 2448 | // document.getElementById('txtLayerNumber').value = 0; |
2440 | - $("#txtlayerNumber").val(parseInt($scope.layerNumber)); | |
2449 | + debugger; | |
2441 | 2450 | |
2442 | 2451 | |
2443 | - $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber)); | |
2452 | + $('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.currentLayerNumber)); | |
2453 | + $("#txtlayerNumber").val(parseInt($scope.currentLayerNumber)); | |
2444 | 2454 | |
2445 | 2455 | |
2446 | 2456 | if (document.getElementById('tempCanvas') != null) { | ... | ... |