diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 44d9b43..24ae176 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -3907,6 +3907,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // console.log("extract button is active"); } + + //in case of annotation toolbar is open below code will be executed to draw Tbox if ($rootScope.isAnnotationWindowOpen == true) { if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { @@ -5649,15 +5651,23 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //for enabling annoataions. //Now everything si done on canavases uswed in annotation toolbar. - - if (parseInt($("#canvasPaint").css("z-index")) > parseInt($("#canvas").css("z-index"))) - { - $rootScope.switchCanvasToPaintCanvas(); + + $rootScope.switchCanvas(); + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { + + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + //$('.btnCursor').trigger('click'); + $("#annotationpaintbrushsize").removeClass("activebtncolor"); + $('.btnCursor').addClass('activebtncolor'); + } - else - { - $rootScope.switchCanvas(); + else { + + $("#OnIdentify").addClass('annotationtoolbartab'); + $("#DrawMode").removeClass('annotationtoolbartab'); } + // $rootScope.switchCanvas(); //To enable extract button $scope.isTransparencyActivated = false; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index fd76eaf..18c368e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -667,8 +667,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-line").addClass("activebtncolor"); - - + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + $rootScope.isAnnotaionToolBarDrawingModeActive = true; } @@ -684,6 +685,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-pin").addClass("activebtncolor"); + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + $rootScope.isAnnotaionToolBarDrawingModeActive = true; } $rootScope.Cursor = function () { @@ -693,6 +697,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $(".btn-annotation").removeClass("activebtncolor"); // $("#" + e.currentTarget.id).removeClass("activebtncolor"); $('.btnCursor').addClass('activebtncolor'); + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + $rootScope.isAnnotaionToolBarDrawingModeActive = true; } @@ -705,10 +712,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-rectangle").addClass("activebtncolor"); + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + $rootScope.isAnnotaionToolBarDrawingModeActive = true; } $rootScope.paintBrush = function () { - $rootScope.isAnnotaionToolBarDrawingModeActive = false; + $rootScope.isAnnotaionToolBarDrawingModeActive = true; if ($rootScope.disableAnnotationtoolOnListManager == true) { $rootScope.switchCanvas(); var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x @@ -761,7 +771,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-brush").addClass("activebtncolor"); - + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); } $rootScope.switchCanvasToPaintCanvas = function (e) { @@ -786,6 +797,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-circle").addClass("activebtncolor"); + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + $rootScope.isAnnotaionToolBarDrawingModeActive = true; } $rootScope.DrawArrow = function (e) { @@ -797,6 +811,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-arrow").addClass("activebtncolor"); + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + $rootScope.isAnnotaionToolBarDrawingModeActive = true; } $rootScope.DrawText = function () { @@ -809,6 +826,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-Text").addClass("activebtncolor"); + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + $rootScope.isAnnotaionToolBarDrawingModeActive = true; } $rootScope.DrawPolygon = function () { @@ -816,6 +836,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $("#canvasPaint").css("display", "block"); $("#canvas").css("display", "block"); $rootScope.shapeType = "DrawPolygon"; + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); + $rootScope.isAnnotaionToolBarDrawingModeActive = true; } @@ -838,6 +861,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.btnCursor').removeClass('activebtncolor'); $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-erase").addClass("activebtncolor"); + $("#OnIdentify").removeClass('annotationtoolbartab'); + $("#DrawMode").addClass('annotationtoolbartab'); }