Commit 0a33dd98e467c13a46308d64c5221eac2b7d2352

Authored by Nikita Kulshreshtha
1 parent 91a8c8ed

disable tbox on extract

disable  extract on Tbox
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;
  14 + $scope.isTransparencyActivated = false;
15 15 $rootScope.BodyLayerData;
16 16 $rootScope.VocabTermData;
17 17  
... ... @@ -3422,31 +3422,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3422 3422  
3423 3423 $scope.createTransparencyBox = function () {
3424 3424  
  3425 + $scope.isTransparencyActivated = true;
3425 3426  
3426   - //if listanager is visisble then close it
3427   -
3428   - $rootScope.isListManagerSelected = false;
3429   - $rootScope.CloseListManager();
  3427 + //do not create TBOX if in extarct mode otherwise create
  3428 + if ($rootScope.isExtract == false) {
3430 3429  
  3430 + $("#btnExtract").addClass("disabled");
3431 3431  
3432   - $scope.isTransparencyActivated = true;
3433   - // alert('transparencyClicked' + $scope.isTransparencyActivated)
3434   - $('#btnTranparency').addClass('tButtonActive');
3435   - $('#btnIdentity').removeClass(' btn-primary');
3436   - $('#btnIdentity').addClass('btn-black');
  3432 + //if listanager is visisble then close it
  3433 + $rootScope.isListManagerSelected = false;
  3434 + $rootScope.CloseListManager();
3437 3435  
3438   - var canvasDiv = document.getElementById('canvasDiv');
3439   - $scope.verticalScrollPosition = canvasDiv.scrollTop;
3440   - $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
3441 3436  
3442   - var canvasDiv = document.getElementById('canvasDiv');
3443   - canvasDiv.addEventListener("mousedown", mouseDownListener);
  3437 +
  3438 + // alert('transparencyClicked' + $scope.isTransparencyActivated)
  3439 + $('#btnTranparency').addClass('tButtonActive');
  3440 + $('#btnIdentity').removeClass(' btn-primary');
  3441 + $('#btnIdentity').addClass('btn-black');
3444 3442  
3445   - canvasDiv.addEventListener("mousemove", mouseMoveListener);
  3443 + var canvasDiv = document.getElementById('canvasDiv');
  3444 + $scope.verticalScrollPosition = canvasDiv.scrollTop;
  3445 + $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
3446 3446  
3447   - canvasDiv.addEventListener("mouseup", mouseUpListener)
  3447 + var canvasDiv = document.getElementById('canvasDiv');
  3448 + canvasDiv.addEventListener("mousedown", mouseDownListener);
3448 3449  
3449   -
  3450 + canvasDiv.addEventListener("mousemove", mouseMoveListener);
  3451 +
  3452 + canvasDiv.addEventListener("mouseup", mouseUpListener)
  3453 +
  3454 + }
  3455 + else {
  3456 +
  3457 + // console.log("extract button is active");
  3458 +
  3459 + }
3450 3460 }
3451 3461  
3452 3462 function mouseDownListener(e) {
... ... @@ -4522,6 +4532,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4522 4532  
4523 4533 $scope.CloseTransparencyBox = function () {
4524 4534  
  4535 + //To enable extract button
  4536 + $scope.isTransparencyActivated = false;
  4537 + $("#btnExtract").removeClass("disabled");
  4538 +
4525 4539 $('.com_anno').css('display', 'none');
4526 4540  
4527 4541 $('#sppeachBubble_annotation').css('display', 'none');
... ... @@ -4957,61 +4971,77 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4957 4971 //if listanager is visisble then close it
4958 4972  
4959 4973 // $rootScope.isListManagerSelected = false;
4960   - $rootScope.CloseListManager();
4961   - //1.
4962   - $rootScope.isLoading = true;
4963   - $('#spinner').css('visibility', 'visible');
4964 4974  
4965   - //2.
4966   - $scope.terminateCurrentlyRunningWPs();
4967 4975  
4968   - //3.
4969   - if ($rootScope.isExtract == true) {
  4976 + if ($scope.isTransparencyActivated == true) {
  4977 +
  4978 + $("#btnExtract").addClass("disabled");
4970 4979  
4971 4980 }
  4981 +
  4982 +
4972 4983 else {
4973   - $rootScope.isExtract = true;
4974 4984  
  4985 +
  4986 + $rootScope.CloseListManager();
  4987 + //1.
  4988 + $rootScope.isLoading = true;
  4989 + $('#spinner').css('visibility', 'visible');
  4990 +
  4991 + //2.
  4992 + $scope.terminateCurrentlyRunningWPs();
4975 4993  
4976   - if ($rootScope.isNormalMode == true) {
  4994 + //3.
  4995 + if ($rootScope.isExtract == true) {
4977 4996  
4978   - $rootScope.isHighLight = false;
4979   - $rootScope.isNormalMode = false;
4980 4997 }
4981 4998 else {
4982   - $rootScope.isNormalMode = false;
4983   - $rootScope.isHighLight = false;
4984   - }
  4999 + $rootScope.isExtract = true;
  5000 + //disable transparency button
  5001 +
  5002 + $("#btnTranparency").addClass("disabled");
4985 5003  
4986   - //4.
4987   - console.log('highLightBody from enableExtract')
4988   - $scope.highLightBody();
4989 5004  
  5005 + if ($rootScope.isNormalMode == true) {
4990 5006  
4991   - }
  5007 + $rootScope.isHighLight = false;
  5008 + $rootScope.isNormalMode = false;
  5009 + }
  5010 + else {
  5011 + $rootScope.isNormalMode = false;
  5012 + $rootScope.isHighLight = false;
  5013 + }
4992 5014  
4993   - //5. unhighlight other
4994   - //$scope.Normal = "";
4995   - //$scope.Extract = "LeftButtonsDefaultState";
4996   - //$scope.Highlight = "";
  5015 + //4.
  5016 + console.log('highLightBody from enableExtract')
  5017 + $scope.highLightBody();
4997 5018  
4998   - $("#btnExtract").addClass("btn-primary");
4999   - $("#btnExtract").removeClass("btn-black");
5000 5019  
5001   - if (!$("#btnNormalMode").hasClass("btn-black")) {
5002   - $("#btnNormalMode").addClass("btn-black");
5003   - }
  5020 + }
5004 5021  
5005   - if (!$("#btnHighLight").hasClass("btn-black")) {
5006   - $("#btnHighLight").addClass("btn-black");
5007   - }
  5022 + //5. unhighlight other
  5023 + //$scope.Normal = "";
  5024 + //$scope.Extract = "LeftButtonsDefaultState";
  5025 + //$scope.Highlight = "";
5008 5026  
5009   - if ($("#btnNormalMode").hasClass("btn-primary")) {
5010   - $("#btnNormalMode").removeClass("btn-primary");
5011   - }
  5027 + $("#btnExtract").addClass("btn-primary");
  5028 + $("#btnExtract").removeClass("btn-black");
5012 5029  
5013   - if ($("#btnHighLight").hasClass("btn-primary")) {
5014   - $("#btnHighLight").removeClass("btn-primary");
  5030 + if (!$("#btnNormalMode").hasClass("btn-black")) {
  5031 + $("#btnNormalMode").addClass("btn-black");
  5032 + }
  5033 +
  5034 + if (!$("#btnHighLight").hasClass("btn-black")) {
  5035 + $("#btnHighLight").addClass("btn-black");
  5036 + }
  5037 +
  5038 + if ($("#btnNormalMode").hasClass("btn-primary")) {
  5039 + $("#btnNormalMode").removeClass("btn-primary");
  5040 + }
  5041 +
  5042 + if ($("#btnHighLight").hasClass("btn-primary")) {
  5043 + $("#btnHighLight").removeClass("btn-primary");
  5044 + }
5015 5045 }
5016 5046 }
5017 5047  
... ...