Commit f4b388664274b0941f3d5aafe01472470f88e24d
1 parent
36460961
Commit changes for:
1)Edit TextArea 2)Identify and draw option 3)Increase pencil width
Showing
3 changed files
with
97 additions
and
32 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -5757,6 +5757,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5757 | 5757 | |
5758 | 5758 | resizeFromCenter: false, |
5759 | 5759 | |
5760 | + dblclick: function () { | |
5761 | + $rootScope.backOpacity(); | |
5762 | + | |
5763 | + }, | |
5760 | 5764 | |
5761 | 5765 | click: function (layer) { |
5762 | 5766 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -6255,6 +6259,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6255 | 6259 | }).drawLayers(); |
6256 | 6260 | |
6257 | 6261 | }, |
6262 | + dblclick: function () { | |
6263 | + $("#text_area").css("font-size", $rootScope.fontSizes); | |
6264 | + $("#text_area").css("font-weight", $rootScope.fontWeight); | |
6265 | + $("#text_area").css("font-style", $rootScope.fontStyle); | |
6266 | + $("#text_area").css("text-align", $rootScope.textAlignmt); | |
6267 | + $("#text_area").css("color", $rootScope.fontColor); | |
6268 | + $("#text_area").css("font-family", $rootScope.fontFamily); | |
6269 | + $("#text_area").css("text-decoration", $rootScope.underlineText); | |
6270 | + | |
6271 | + $("#text_area").val($rootScope.textArea); | |
6272 | + | |
6273 | + $("#annotationTextModal").modal("toggle"); | |
6274 | + | |
6275 | + }, | |
6258 | 6276 | mouseout: function (layer) { |
6259 | 6277 | |
6260 | 6278 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -6304,8 +6322,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6304 | 6322 | |
6305 | 6323 | |
6306 | 6324 | // $rootScope.shapeType = "FreeStylePaint"; |
6307 | - canvasPaint.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false); | |
6308 | - canvasPaint.addEventListener('mousedown', $scope.OnPaintBrushCanvasMouseDown, false); | |
6325 | + // canvasPaint.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false); | |
6326 | + // canvasPaint.addEventListener('mousedown', $scope.OnPaintBrushCanvasMouseDown, false); | |
6309 | 6327 | |
6310 | 6328 | |
6311 | 6329 | } |
... | ... | @@ -6315,18 +6333,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6315 | 6333 | case "FreeStylePaint": |
6316 | 6334 | |
6317 | 6335 | debugger; |
6318 | - $('#canvasPaint').sketch({ defaultSize: 1 }); | |
6319 | - //if ($("#amount-2").val() == '') { | |
6320 | - // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6321 | - //} | |
6322 | - //else { | |
6323 | 6336 | |
6324 | - // var a = $("#amount-2").val(); | |
6325 | - // $scope.shapesize = parseInt(a); | |
6326 | - // // alert(JSON.stringify({ defaultSize: $scope.shapesize })); | |
6327 | - // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6337 | + // $('#canvasPaint').sketch(); | |
6338 | + // $('#canvasPaint').sketch({ defaultSize: 1 }); | |
6339 | + // if ($("#amount-2").val() == '') { | |
6340 | + // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6341 | + // $('#canvasPaint').sketch(); | |
6342 | + // } | |
6343 | + // else { | |
6328 | 6344 | |
6329 | - //} | |
6345 | + // // var a = $("#amount-2").val(); | |
6346 | + //// $scope.shapesize = parseInt(a); | |
6347 | + // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); | |
6348 | + // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6349 | + | |
6350 | + // } | |
6330 | 6351 | |
6331 | 6352 | |
6332 | 6353 | break; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -130,10 +130,30 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
130 | 130 | } |
131 | 131 | |
132 | 132 | $rootScope.OnIdentifyClick = function () { |
133 | - $rootScope.isIdetifyClicked = true; | |
134 | - $rootScope.isDrawingToolSelected = false; | |
133 | + // $rootScope.isIdetifyClicked = true; | |
134 | + // $rootScope.isDrawingToolSelected = false; | |
135 | + $("#canvasPaint").css("display", "none"); | |
136 | + $("#canvas").css("display", "none"); | |
137 | + | |
138 | + // $("#canvasPaint").css("z-index", "0"); | |
139 | + // $("#canvas").css("z-index", "0"); | |
140 | + $('.btnCursor').removeClass('activebtncolor'); | |
141 | + | |
142 | + } | |
143 | + | |
144 | + | |
145 | + | |
146 | + $rootScope.DrawingMode = function () { | |
147 | + | |
148 | + $('.btnCursor').addClass('activebtncolor'); | |
149 | + $rootScope.switchCanvas(); | |
150 | + $("#canvasPaint").css("display", "block"); | |
151 | + $("#canvas").css("display", "block"); | |
152 | + | |
135 | 153 | } |
136 | 154 | |
155 | + | |
156 | + | |
137 | 157 | //----Annotation Toolbar: Jcanvas----- |
138 | 158 | |
139 | 159 | $rootScope.DrawLine = function (e) { |
... | ... | @@ -175,13 +195,27 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
175 | 195 | $(".btn-annotation-rectangle").addClass("activebtncolor"); |
176 | 196 | } |
177 | 197 | $rootScope.paintBrush = function () { |
178 | - | |
179 | - $('.btnCursor').addClass('activebtncolor'); | |
198 | + // debugger; | |
199 | + // $('.btnCursor').addClass('activebtncolor'); | |
180 | 200 | $rootScope.switchCanvasToPaintCanvas(); |
181 | - | |
182 | 201 | $rootScope.shapeType = "FreeStylePaint"; |
183 | - //alert($rootScope.shapeType); | |
202 | + var a = $("#amount-2").val(); | |
203 | + $rootScope.shapeSize = parseInt(a); | |
204 | + if ($rootScope.shapeSize == '') | |
205 | + { | |
206 | + $('#canvasPaint').sketch({ defaultSize: 1 }); | |
207 | + } | |
208 | + else | |
209 | + { | |
210 | + $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); | |
211 | + | |
212 | + } | |
213 | + | |
184 | 214 | |
215 | + // $('#canvasPaint').sketch(); | |
216 | + | |
217 | + | |
218 | + | |
185 | 219 | } |
186 | 220 | |
187 | 221 | $rootScope.switchCanvasToPaintCanvas = function (e) { |
... | ... | @@ -273,9 +307,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
273 | 307 | var intPart = pixelSeparation.split("p"); |
274 | 308 | |
275 | 309 | $rootScope.shapestyleborderWidth = intPart[0]; |
276 | - $rootScope.shapestyleborderStyles = "solid"; | |
310 | + $rootScope.shapestyleborderStyles = "solid"; | |
311 | + | |
277 | 312 | |
278 | - $('#editshapestyle').modal('hide'); | |
313 | + $('#editshapestyle').modal('hide'); | |
314 | + // name: 'Circle_' + $rootScope.resetCircle, | |
315 | + | |
316 | + | |
317 | + // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | |
318 | + | |
319 | + | |
279 | 320 | } |
280 | 321 | |
281 | 322 | $rootScope.backOpacity = function () { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -399,7 +399,7 @@ |
399 | 399 | <button type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button> |
400 | 400 | </div> |
401 | 401 | <div class="btn-group" role="group"> |
402 | - <button type="button" class="btn btn-sm btn-success">Draw</button> | |
402 | + <button type="button" class="btn btn-sm btn-success" ng-click="DrawingMode()">Draw</button> | |
403 | 403 | </div> |
404 | 404 | </div> |
405 | 405 | |
... | ... | @@ -428,7 +428,7 @@ |
428 | 428 | <div class="well well-popup"> |
429 | 429 | <div class="" role="group" aria-label="..."> |
430 | 430 | <div> |
431 | - <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" data-toggle="tooltip" data-placement="top" title="Paint" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></button> | |
431 | + <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" id="paintLine" data-toggle="tooltip" data-placement="top" title="Paint" style="margin-right:1%;" ng-click="paintBrush()"><i class="fa fa-paint-brush"></i></button> | |
432 | 432 | <button type="button" class="btn btn-primary btn-xs pull-left btn-annotation" data-toggle="tooltip" data-placement="top" title="Erase" ng-click="EraseDrawing()"><i class="fa fa-eraser"></i></button> |
433 | 433 | <div class="marginL2 pull-left"><input type="number" id="amount-2" value="25" step="1" style="width:60px;"></div> |
434 | 434 | <div class="pull-left" style="width:45%; margin-left:2%;"> |
... | ... | @@ -791,7 +791,7 @@ |
791 | 791 | </div> |
792 | 792 | </div> |
793 | 793 | |
794 | - | |
794 | + | |
795 | 795 | |
796 | 796 | <script> |
797 | 797 | function mytoggle() { |
... | ... | @@ -874,24 +874,27 @@ |
874 | 874 | max: 60, |
875 | 875 | value: 10, |
876 | 876 | slide: function (event, ui) { |
877 | - | |
877 | + | |
878 | 878 | $("#amount-2").val(ui.value); |
879 | 879 | |
880 | 880 | |
881 | - | |
882 | 881 | }, |
882 | + stop: function (event, ui) { | |
883 | 883 | |
884 | - | |
884 | + $("#paintLine").attr("data-size", ui.value); | |
885 | + | |
886 | + } | |
887 | + | |
885 | 888 | }); |
886 | - $("#slider-range-min-2").on("slidestart", function (event, ui) { | |
889 | + //$("#slider-range-min-2").on("slidestart", function (event, ui) { | |
887 | 890 | |
888 | - $('.btnCursor').trigger('click'); | |
889 | - $(".btn-annotation").removeClass("activebtncolor"); | |
890 | - $('.btnCursor').addClass('activebtncolor'); | |
891 | - // ctx.clearRect(0, 0, canvasPaint.width, canvasPaint.height); | |
891 | + // $('.btnCursor').trigger('click'); | |
892 | + // $(".btn-annotation").removeClass("activebtncolor"); | |
893 | + // $('.btnCursor').addClass('activebtncolor'); | |
894 | + // // ctx.clearRect(0, 0, canvasPaint.width, canvasPaint.height); | |
892 | 895 | |
893 | 896 | |
894 | - }); | |
897 | + //}); | |
895 | 898 | // $("#slider-range-min-2").on("slidechange", function (event, ui) { alert("ssasa"); }); |
896 | 899 | |
897 | 900 | $("#amount-2").val($("#slider-vertical-2").slider("value")); | ... | ... |