diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 4d15ed9..b88ca1e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -449,6 +449,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout { $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); $('#slider-range-min-2').slider('disable'); + $("#annotationpaintbrushsize").attr('disabled', 'disabled'); + //$("#annotationpaintbrushsize").attr("href", "#"); } $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 4016108..af0dc3d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -171,18 +171,25 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", //7904 if ($rootScope.MenuModuleName == "DA") { if ($rootScope.disableAnnotationtoolOnListManager == true) { - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); + $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled'); $('#slider-range-min-2').slider('disable'); + $("#annotationpaintbrushsize").attr('disabled', 'disabled'); + // $rootScope.disableAnnotationTB = false; } else { $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); $('#slider-range-min-2').slider('enable'); + $("#annotationpaintbrushsize").removeAttr('disabled', 'disabled'); } // document.getElementById('modelbackground').style.display = "block"; // document.getElementById('modeleditstyle').style.display = "block"; } + if ($rootScope.MenuModuleName == "CA") + { + $("#annotationpaintbrushsize").attr("href", "#"); + } $("#OnIdentify").addClass("annotationtoolbartab"); $("#annotationToolBarOptions").addClass("active"); $("#annotationButton").addClass("active"); @@ -338,32 +345,54 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $(".btn-annotation").removeClass("activebtncolor"); $(".btn-annotation-rectangle").addClass("activebtncolor"); } + $rootScope.paintBrush = function () { - // debugger; - // $('.btnCursor').addClass('activebtncolor'); - $rootScope.setListManagerZindex = true; - $("#canvasPaint").css("display", "block"); - $("#canvas").css("display", "block"); - $rootScope.switchCanvasToPaintCanvas(); - $rootScope.shapeType = "FreeStylePaint"; + if ($rootScope.disableAnnotationtoolOnListManager == true) { + $rootScope.switchCanvas(); + var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x + + var canvasZindex = $('#canvas').css("z-index"); //y + var listManagerZindex = $('#listManager').css("z-index"); //z + if (canvasPaintZindex > canvasZindex) { + + $('#listManager').css("z-index", canvasPaintZindex); + + } else { + + $('#listManager').css("z-index", canvasZindex); + } + + } else { + // debugger; + // $('.btnCursor').addClass('activebtncolor'); + $rootScope.setListManagerZindex = true; + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); + $rootScope.switchCanvasToPaintCanvas(); + $rootScope.shapeType = "FreeStylePaint"; var btnBrushSizeValue = $("#btnBrushSize").val(); $rootScope.shapeSize = parseInt(btnBrushSizeValue); $("#annotationpaintbrushsize").attr("data-size", $rootScope.shapeSize); $("#annotationpaintbrushsize").attr("data-color", $rootScope.shapestyleFillColor); - if ($rootScope.shapeSize == '') { - $('#canvasPaint').sketch({ defaultSize: 1 }); - } - else { + + + if ($rootScope.shapeSize == '') { + $('#canvasPaint').sketch({ defaultSize: 1 }); + } + else { $('#canvasPaint').sketch(); - } + } + + // $('#canvasPaint').sketch(); - // $('#canvasPaint').sketch(); + } + } @@ -461,7 +490,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.shapestyleborderWidth = 2; $rootScope.shapestyleborderStyles = "solid"; $rootScope.shapestyle = function (id) { - // debugger; + // debugger; document.getElementById('modelbackground').style.display = "none"; document.getElementById('modeleditstyle').style.display = "none"; @@ -507,6 +536,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $('#slider-range-min-4 span.ui-slider-handle').css("left", (previewOpacity * 100) + "%"); }; + } } @@ -537,6 +567,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } + + //----End------------- @@ -605,6 +637,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { + // alert("offsetX:" + offsetX1 + " offsetY:" + offsetY1 + " x:" + x + " y:" + y); $(canvasId).addLayer({ layer: true, name: 'Rect_' + RectNumber, @@ -618,7 +651,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", width: x - offsetX1, height: y - offsetY1, - resizeFromCenter: false, + resizeFromCenter: true, dblclick: function () { // $rootScope.backOpacity(); @@ -1187,7 +1220,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", case "Rectangle": $rootScope.rectNumber = $rootScope.ObjectIndex++; $rootScope.RectangleFn('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); - + break; case "Circle": @@ -1891,10 +1924,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.disableAnnotationtoolOnListManager = false; $rootScope.ShowListManager = function () { + $rootScope.switchCanvas(); + $("#annotationpaintbrushsize").attr("href", "#"); console.log('ShowListManager') + $rootScope.disableAnnotationtoolOnListManager = true; - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled'); + $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled'); $('#slider-range-min-2').slider('disable'); + $("#annotationpaintbrushsize").attr('disabled', 'disabled'); $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -1919,13 +1956,17 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.CloseListManager = function () { - console.log('close') + + + console.log('close'); $rootScope.disableAnnotationtoolOnListManager = false; if ($rootScope.MenuModuleName == "DA") { - + $("#annotationpaintbrushsize").attr("href", "#canvasPaint"); if ($rootScope.disableAnnotationtoolOnListManager == false) { - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); + $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); $('#slider-range-min-2').slider('enable'); + $("#annotationpaintbrushsize").removeAttr('disabled', 'disabled'); + $rootScope.switchCanvasToPaintCanvas(); } } $('#listManager').css('display', 'none'); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html index 4a9d629..9d5f214 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html @@ -15,7 +15,7 @@