diff --git a/.gitignore b/.gitignore index e7c26cd..176497a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ _ReSharper*/ *.vssscc $tf*/ 400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj.user -300-PROTOTYPES/POC/AIAHTML5 -400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js.orig -400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js.orig +300-PROTOTYPES/POC/AIAHTML5 +400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js.orig +400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js.orig 400-SOURCECODE/AIAHTML5.Web/index.html.orig \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 80b48b2..818a27e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -885,7 +885,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; //set scrollbars on canvas and hide loading label - // $('#daLoaderLabel').css('visibility', 'hidden') + $('#daLoaderLabel').css('visibility', 'hidden') $('#canvasDiv').css('overflow', 'scroll') if (isiOSSafari) { @@ -1369,6 +1369,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo "haveMirror": 'true' } ); + } // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) @@ -1398,7 +1399,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //$rootScope.isLoading = false; //$('#spinner').css('visibility', 'hidden'); - + $scope.ColoredImageSRC.push $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); //$timeout(function () { @@ -1696,6 +1697,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } ); + } if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { @@ -3335,36 +3337,45 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }; - + $rootScope.isTransparencyBoxActivated = false; $scope.createTransparencyBox = function () { + + $rootScope.isTransparencyBoxActivated = true; + + if ($rootScope.isExtractButtonActive == false) { - - //if listanager is visisble then close it - + //if listanager is visisble then close it + $("#btnExtract").addClass("disabled"); $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); - $scope.isTransparencyActivated = true; - // alert('transparencyClicked' + $scope.isTransparencyActivated) - $('#btnTranparency').addClass('tButtonActive'); - $('#btnIdentity').removeClass(' btn-primary'); - $('#btnIdentity').addClass('btn-black'); + $scope.isTransparencyActivated = true; + + $('#btnTranparency').addClass('tButtonActive'); + $('#btnIdentity').removeClass(' btn-primary'); + $('#btnIdentity').addClass('btn-black'); - var canvasDiv = document.getElementById('canvasDiv'); - $scope.verticalScrollPosition = canvasDiv.scrollTop; - $scope.horizontlScrollPosition = canvasDiv.scrollLeft; + var canvasDiv = document.getElementById('canvasDiv'); + $scope.verticalScrollPosition = canvasDiv.scrollTop; + $scope.horizontlScrollPosition = canvasDiv.scrollLeft; - var canvasDiv = document.getElementById('canvasDiv'); - canvasDiv.addEventListener("mousedown", mouseDownListener); + var canvasDiv = document.getElementById('canvasDiv'); + canvasDiv.addEventListener("mousedown", mouseDownListener); - canvasDiv.addEventListener("mousemove", mouseMoveListener); + canvasDiv.addEventListener("mousemove", mouseMoveListener); - canvasDiv.addEventListener("mouseup", mouseUpListener) + canvasDiv.addEventListener("mouseup", mouseUpListener) - } + } + else + { + + // console.log("extract button is active"); + } + } function mouseDownListener(e) { //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. var tCanvas = document.getElementById('transparencyCanvas'); @@ -4444,7 +4455,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.CloseTransparencyBox = function () { - + $rootScope.isTransparencyBoxActivated = false; + $("#btnExtract").removeClass("disabled"); $('.com_anno').css('display', 'none'); $('#sppeachBubble_annotation').css('display', 'none'); @@ -4808,13 +4820,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $scope.enableNormalMode = function () { + + + $rootScope.isExtractButtonActive = false; + $("#btnTranparency").removeClass("disabled"); + // console.log('enableNormalMode is called'); //if listanager is visisble then close it // $rootScope.isListManagerSelected = false; + + //to do should not call every time $rootScope.CloseListManager(); + + if ($rootScope.isNormalMode == true) { } @@ -4863,70 +4884,82 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $("#btnHighLight").removeClass("btn-primary"); } } - + $rootScope.isExtractButtonActive = false; $scope.enableExtract = function () { + if ($rootScope.isTransparencyBoxActivated == true) { + $("#btnExtract").addClass("disabled"); + } + else + { - //if listanager is visisble then close it + //disable transparency button + $rootScope.isExtractButtonActive = true; + $("#btnTranparency").addClass("disabled"); + + //if listanager is visisble then close it // $rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); - //1. - $rootScope.isLoading = true; - $('#spinner').css('visibility', 'visible'); + $rootScope.CloseListManager(); + //1. + $rootScope.isLoading = true; + $('#spinner').css('visibility', 'visible'); - //2. - $scope.terminateCurrentlyRunningWPs(); + //2. + $scope.terminateCurrentlyRunningWPs(); - //3. - if ($rootScope.isExtract == true) { + //3. + if ($rootScope.isExtract == true) { - } - else { - $rootScope.isExtract = true; + } + else { + $rootScope.isExtract = true; - if ($rootScope.isNormalMode == true) { + if ($rootScope.isNormalMode == true) { - $rootScope.isHighLight = false; - $rootScope.isNormalMode = false; - } - else { - $rootScope.isNormalMode = false; - $rootScope.isHighLight = false; - } + $rootScope.isHighLight = false; + $rootScope.isNormalMode = false; + } + else { + $rootScope.isNormalMode = false; + $rootScope.isHighLight = false; + } - //4. - console.log('highLightBody from enableExtract') - $scope.highLightBody(); + //4. + console.log('highLightBody from enableExtract') + $scope.highLightBody(); - } + } - //5. unhighlight other - //$scope.Normal = ""; - //$scope.Extract = "LeftButtonsDefaultState"; - //$scope.Highlight = ""; + //5. unhighlight other + //$scope.Normal = ""; + //$scope.Extract = "LeftButtonsDefaultState"; + //$scope.Highlight = ""; - $("#btnExtract").addClass("btn-primary"); - $("#btnExtract").removeClass("btn-black"); + $("#btnExtract").addClass("btn-primary"); + $("#btnExtract").removeClass("btn-black"); - if (!$("#btnNormalMode").hasClass("btn-black")) { - $("#btnNormalMode").addClass("btn-black"); - } + if (!$("#btnNormalMode").hasClass("btn-black")) { + $("#btnNormalMode").addClass("btn-black"); + } - if (!$("#btnHighLight").hasClass("btn-black")) { - $("#btnHighLight").addClass("btn-black"); - } + if (!$("#btnHighLight").hasClass("btn-black")) { + $("#btnHighLight").addClass("btn-black"); + } - if ($("#btnNormalMode").hasClass("btn-primary")) { - $("#btnNormalMode").removeClass("btn-primary"); - } + if ($("#btnNormalMode").hasClass("btn-primary")) { + $("#btnNormalMode").removeClass("btn-primary"); + } + + if ($("#btnHighLight").hasClass("btn-primary")) { + $("#btnHighLight").removeClass("btn-primary"); + } - if ($("#btnHighLight").hasClass("btn-primary")) { - $("#btnHighLight").removeClass("btn-primary"); } + } $scope.enableShowHideStructureBox = function () { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index bce82dc..515b782 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -127,6 +127,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", console.log('close') $(".annotationTollbar").css("display", "none"); $rootScope.isAnnotationWindowClose = true; + //Click is disabled within the image area if open annotation toolbar and and closing without doing anything + $("#canvasPaint").css("display", "none"); + $("#canvas").css("display", "none"); + } $rootScope.OnIdentifyClick = function () { @@ -276,7 +280,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.shapestyleborderWidth = intPart[0]; $rootScope.shapestyleborderStyles = "solid"; - $('#editshapestyle').modal('hide'); } $rootScope.enableAnnotationToolBar = function () {