Commit 6b41c04b848b52fc041f98b476364e6a2679fbe0
1 parent
c982ce6d
now the skintone is changed when TBox activated in normal mode but issue in highlight mode
Showing
1 changed file
with
37 additions
and
26 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -11,7 +11,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
11 | 11 | $scope.imagePath = ""; |
12 | 12 | $rootScope.BodyRegionData; |
13 | 13 | $rootScope.BodyRegionCordinatesData; |
14 | - $scope.isTransparencyActivated = false; | |
14 | + $rootScope.isTransparencyActivated = false; | |
15 | 15 | $rootScope.BodyLayerData; |
16 | 16 | $rootScope.VocabTermData; |
17 | 17 | |
... | ... | @@ -979,10 +979,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
979 | 979 | var canDiv = document.getElementById('canvasDiv'); |
980 | 980 | var canDivChildCount = canDiv.childElementCount; |
981 | 981 | if (canDivChildCount > 0) { |
982 | - canDiv.innerHTML = ''; | |
983 | 982 | |
984 | - //remove transparency scale | |
985 | - $('#transparencyScale').css('visibility', 'hidden'); | |
983 | + if ($rootScope.isTransparencyActivated) { | |
984 | + $scope.flushCanvas(); | |
985 | + $('#transparencyScale').css('visibility', 'visible'); | |
986 | + } | |
987 | + else { | |
988 | + canDiv.innerHTML = ''; | |
989 | + //remove transparency scale | |
990 | + $('#transparencyScale').css('visibility', 'hidden'); | |
991 | + } | |
992 | + | |
986 | 993 | } |
987 | 994 | |
988 | 995 | if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) { |
... | ... | @@ -2536,7 +2543,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2536 | 2543 | $scope.HighlightBodyByTermList = function (TermList) { |
2537 | 2544 | |
2538 | 2545 | $("#btnTranparency").attr('disabled', 'disabled'); |
2539 | - $scope.currentLayerNumber = $scope.layerNumber; | |
2546 | + $rootScope.currentLayerNumber = $scope.layerNumber; | |
2540 | 2547 | |
2541 | 2548 | $scope.layerNumber = $('#txtlayerNumber').val(); |
2542 | 2549 | |
... | ... | @@ -2828,7 +2835,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2828 | 2835 | document.getElementById("daView").style.pointerEvents="none"; |
2829 | 2836 | $('.ui-slider').slider('disable'); |
2830 | 2837 | $("#btnTranparency").attr('disabled', 'disabled'); |
2831 | - $scope.currentLayerNumber = $scope.layerNumber; | |
2838 | + $rootScope.currentLayerNumber = $scope.layerNumber; | |
2832 | 2839 | |
2833 | 2840 | $scope.layerNumber = $('#txtlayerNumber').val(); |
2834 | 2841 | |
... | ... | @@ -3310,7 +3317,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3310 | 3317 | // $('#daLoaderLabel').css('visibility', 'visible'); |
3311 | 3318 | |
3312 | 3319 | |
3313 | - if ($scope.isTransparencyActivated) { | |
3320 | + if ($rootScope.isTransparencyActivated) { | |
3314 | 3321 | |
3315 | 3322 | //crete temp canavs to store the original data which will be used to chnange the transparency |
3316 | 3323 | if (document.getElementById('tempCanvas') != null) { |
... | ... | @@ -3461,11 +3468,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3461 | 3468 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
3462 | 3469 | if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { |
3463 | 3470 | $('#txtlayerNumber').val(dataLength - 1); |
3464 | - $scope.currentLayerNumber = parseInt(dataLength - 1); | |
3471 | + $rootScope.currentLayerNumber = parseInt(dataLength - 1); | |
3465 | 3472 | $scope.layerNumber = parseInt(dataLength - 1); |
3466 | 3473 | } |
3467 | 3474 | else |
3468 | - $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); | |
3475 | + $rootScope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); | |
3469 | 3476 | |
3470 | 3477 | //$scope.isMousUp(); |
3471 | 3478 | |
... | ... | @@ -4311,9 +4318,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4311 | 4318 | |
4312 | 4319 | document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener); |
4313 | 4320 | //Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
4314 | - if ($("#txtlayerNumber").val() != 0 && $scope.currentLayerNumber != undefined) { | |
4315 | - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.currentLayerNumber)); | |
4316 | - $("#txtlayerNumber").val(parseInt($scope.currentLayerNumber)); | |
4321 | + if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) { | |
4322 | + $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber)); | |
4323 | + $("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber)); | |
4317 | 4324 | } |
4318 | 4325 | |
4319 | 4326 | } |
... | ... | @@ -4358,7 +4365,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4358 | 4365 | var previewRectangleHeight = $('.rectangle').height() |
4359 | 4366 | |
4360 | 4367 | |
4361 | - $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); | |
4368 | + $rootScope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); | |
4362 | 4369 | $('.rectangle').remove(); |
4363 | 4370 | |
4364 | 4371 | var currentMousePosition = $scope.getMousePos(e); |
... | ... | @@ -4406,7 +4413,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4406 | 4413 | } |
4407 | 4414 | |
4408 | 4415 | |
4409 | - $scope.isTransparencyActivated = true; | |
4416 | + $rootScope.isTransparencyActivated = true; | |
4410 | 4417 | |
4411 | 4418 | var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData; |
4412 | 4419 | |
... | ... | @@ -4582,7 +4589,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4582 | 4589 | |
4583 | 4590 | $('#btnTranparency').addClass('tButtonActive'); |
4584 | 4591 | |
4585 | - // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1); | |
4592 | + // $('#txtlayerNumber').val((parseInt($rootScope.currentLayerNumber)) + 1); | |
4586 | 4593 | //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
4587 | 4594 | $('#btnTranparency').removeClass('tButtonActive'); |
4588 | 4595 | $('#btnTranparency').addClass('btn-black'); |
... | ... | @@ -6293,7 +6300,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6293 | 6300 | |
6294 | 6301 | // $rootScope.switchCanvas(); |
6295 | 6302 | //To enable extract button |
6296 | - $scope.isTransparencyActivated = false; | |
6303 | + $rootScope.isTransparencyActivated = false; | |
6297 | 6304 | $("#btnExtract").removeClass("disabled"); |
6298 | 6305 | |
6299 | 6306 | |
... | ... | @@ -6339,12 +6346,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6339 | 6346 | |
6340 | 6347 | |
6341 | 6348 | |
6342 | - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.currentLayerNumber)); | |
6349 | + $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber)); | |
6343 | 6350 | //if ($scope.isGenderChnage || $rootScope.isViewChange) { |
6344 | 6351 | // $("#txtlayerNumber").val(parseInt(0)); |
6345 | 6352 | //} |
6346 | 6353 | //else |
6347 | - $("#txtlayerNumber").val(parseInt($scope.currentLayerNumber)); | |
6354 | + $("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber)); | |
6348 | 6355 | |
6349 | 6356 | |
6350 | 6357 | if (document.getElementById('tempCanvas') != null) { |
... | ... | @@ -6356,7 +6363,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6356 | 6363 | //var scope = angular.element(document.getElementById("DAView")).scope(); |
6357 | 6364 | //scope.$apply(function () { |
6358 | 6365 | // $scope.layerNumber = 0; |
6359 | - // $scope.isTransparencyActivated = false; | |
6366 | + // $rootScope.isTransparencyActivated = false; | |
6360 | 6367 | //}) |
6361 | 6368 | |
6362 | 6369 | |
... | ... | @@ -6369,7 +6376,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6369 | 6376 | |
6370 | 6377 | //$("canvas[name*='transparencyTempCanvas']").nextUntil($("canvas[name*='transparencyTempCanvas']")) |
6371 | 6378 | //.remove(); |
6372 | - $scope.layerNumber = $scope.currentLayerNumber; | |
6379 | + $scope.layerNumber = $rootScope.currentLayerNumber; | |
6373 | 6380 | $scope.transNumber = 100; |
6374 | 6381 | $(".slider").slider({ value: 100 }) |
6375 | 6382 | } |
... | ... | @@ -6385,7 +6392,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6385 | 6392 | |
6386 | 6393 | $('#transparencyScale').css('visibility', 'hidden'); |
6387 | 6394 | |
6388 | - //$scope.isTransparencyActivated = false; | |
6395 | + //$rootScope.isTransparencyActivated = false; | |
6389 | 6396 | // document.getElementById('btnTranparency').className = 't-transparency' |
6390 | 6397 | $('#btnTranparency').removeClass('tButtonActive'); |
6391 | 6398 | $('#btnTranparency').addClass('btn-black'); |
... | ... | @@ -6533,7 +6540,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6533 | 6540 | |
6534 | 6541 | $scope.terminateCurrentlyRunningWPs(); |
6535 | 6542 | |
6536 | - if ($scope.isTransparencyActivated) { | |
6543 | + if ($rootScope.isTransparencyActivated) { | |
6537 | 6544 | |
6538 | 6545 | $scope.CloseTransparencyBox(); |
6539 | 6546 | |
... | ... | @@ -6758,8 +6765,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6758 | 6765 | $scope.enableNormalMode = function () { |
6759 | 6766 | $("#btnTranparency").removeClass("disabled"); |
6760 | 6767 | |
6761 | - if ($scope.isTransparencyActivated) { | |
6762 | - $scope.layerNumber = $scope.currentLayerNumber; | |
6768 | + if ($rootScope.isTransparencyActivated) { | |
6769 | + $scope.layerNumber = $rootScope.currentLayerNumber; | |
6763 | 6770 | } |
6764 | 6771 | else { |
6765 | 6772 | $scope.layerNumber = $('#txtlayerNumber').val(); |
... | ... | @@ -6870,7 +6877,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6870 | 6877 | $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft(); |
6871 | 6878 | |
6872 | 6879 | |
6873 | - if ($scope.isTransparencyActivated == true) { | |
6880 | + if ($rootScope.isTransparencyActivated == true) { | |
6874 | 6881 | |
6875 | 6882 | $("#btnExtract").addClass("disabled"); |
6876 | 6883 | |
... | ... | @@ -7957,8 +7964,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7957 | 7964 | $scope.layerNumber = parseInt($('#txtlayerNumber').val()); |
7958 | 7965 | //alert('mouseUp'); |
7959 | 7966 | |
7967 | + if ($rootScope.isTransparencyActivated && $rootScope.currentLayerNumber == 0) { | |
7968 | + $scope.layerNumber = $rootScope.currentLayerNumber; | |
7969 | + $scope.loadSelectedBodyView(data.reloadDABodyViewId); | |
7960 | 7970 | |
7961 | - if ($scope.layerNumber == 0) { | |
7971 | + } | |
7972 | + else if ($scope.layerNumber == 0) { | |
7962 | 7973 | $scope.loadSelectedBodyView(data.reloadDABodyViewId); |
7963 | 7974 | } |
7964 | 7975 | // $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ... | ... |