diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index b71edbc..a4e2dcc 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -5757,6 +5757,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo resizeFromCenter: false, + dblclick: function () { + $rootScope.backOpacity(); + + }, click: function (layer) { $rootScope.canvasLayerNameCollection = []; @@ -6255,6 +6259,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }).drawLayers(); }, + dblclick: function () { + $("#text_area").css("font-size", $rootScope.fontSizes); + $("#text_area").css("font-weight", $rootScope.fontWeight); + $("#text_area").css("font-style", $rootScope.fontStyle); + $("#text_area").css("text-align", $rootScope.textAlignmt); + $("#text_area").css("color", $rootScope.fontColor); + $("#text_area").css("font-family", $rootScope.fontFamily); + $("#text_area").css("text-decoration", $rootScope.underlineText); + + $("#text_area").val($rootScope.textArea); + + $("#annotationTextModal").modal("toggle"); + + }, mouseout: function (layer) { $rootScope.canvasLayerNameCollection = []; @@ -6304,8 +6322,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // $rootScope.shapeType = "FreeStylePaint"; - canvasPaint.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false); - canvasPaint.addEventListener('mousedown', $scope.OnPaintBrushCanvasMouseDown, false); + // canvasPaint.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false); + // canvasPaint.addEventListener('mousedown', $scope.OnPaintBrushCanvasMouseDown, false); } @@ -6315,18 +6333,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo case "FreeStylePaint": debugger; - $('#canvasPaint').sketch({ defaultSize: 1 }); - //if ($("#amount-2").val() == '') { - // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); - //} - //else { - // var a = $("#amount-2").val(); - // $scope.shapesize = parseInt(a); - // // alert(JSON.stringify({ defaultSize: $scope.shapesize })); - // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); + // $('#canvasPaint').sketch(); + // $('#canvasPaint').sketch({ defaultSize: 1 }); + // if ($("#amount-2").val() == '') { + // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); + // $('#canvasPaint').sketch(); + // } + // else { - //} + // // var a = $("#amount-2").val(); + //// $scope.shapesize = parseInt(a); + // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); + // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); + + // } break; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 1c4a7ee..a80b053 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -130,10 +130,30 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.OnIdentifyClick = function () { - $rootScope.isIdetifyClicked = true; - $rootScope.isDrawingToolSelected = false; + // $rootScope.isIdetifyClicked = true; + // $rootScope.isDrawingToolSelected = false; + $("#canvasPaint").css("display", "none"); + $("#canvas").css("display", "none"); + + // $("#canvasPaint").css("z-index", "0"); + // $("#canvas").css("z-index", "0"); + $('.btnCursor').removeClass('activebtncolor'); + + } + + + + $rootScope.DrawingMode = function () { + + $('.btnCursor').addClass('activebtncolor'); + $rootScope.switchCanvas(); + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); + } + + //----Annotation Toolbar: Jcanvas----- $rootScope.DrawLine = function (e) { @@ -175,13 +195,27 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $(".btn-annotation-rectangle").addClass("activebtncolor"); } $rootScope.paintBrush = function () { - - $('.btnCursor').addClass('activebtncolor'); + // debugger; + // $('.btnCursor').addClass('activebtncolor'); $rootScope.switchCanvasToPaintCanvas(); - $rootScope.shapeType = "FreeStylePaint"; - //alert($rootScope.shapeType); + var a = $("#amount-2").val(); + $rootScope.shapeSize = parseInt(a); + if ($rootScope.shapeSize == '') + { + $('#canvasPaint').sketch({ defaultSize: 1 }); + } + else + { + $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); + + } + + // $('#canvasPaint').sketch(); + + + } $rootScope.switchCanvasToPaintCanvas = function (e) { @@ -273,9 +307,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", var intPart = pixelSeparation.split("p"); $rootScope.shapestyleborderWidth = intPart[0]; - $rootScope.shapestyleborderStyles = "solid"; + $rootScope.shapestyleborderStyles = "solid"; + - $('#editshapestyle').modal('hide'); + $('#editshapestyle').modal('hide'); + // name: 'Circle_' + $rootScope.resetCircle, + + + // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); + + } $rootScope.backOpacity = function () { diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index 6eca1e0..19a16b4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -399,7 +399,7 @@