Commit 7afb263b4f96157d5c1eda0d9314430e0aad1ed6
Merge branch 'RefactoringATCommonCode' into Develop
Showing
2 changed files
with
43 additions
and
145 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -65,6 +65,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -65,6 +65,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
65 | $rootScope.isEraseToolSelected = false; | 65 | $rootScope.isEraseToolSelected = false; |
66 | $rootScope.isMousedownOnPaintCanvas = false; | 66 | $rootScope.isMousedownOnPaintCanvas = false; |
67 | 67 | ||
68 | + //opacity code | ||
69 | + $rootScope.shapestyleOpacity = 1; | ||
70 | + $rootScope.shapestyleFillColor = "#fff"; | ||
71 | + $rootScope.shapestyleFillBorderColor = "black"; | ||
72 | + $rootScope.shapestyleborderWidth = 2; | ||
73 | + $rootScope.shapestyleborderStyles = "solid"; | ||
74 | + | ||
68 | $rootScope.$on("$locationChangeSuccess", function () { | 75 | $rootScope.$on("$locationChangeSuccess", function () { |
69 | 76 | ||
70 | if (($location.url() == "/da-body-view") || ($location.url() == "/clinical-illustrations-detail") || ($location.url() == "/clinical-animations-detail")) { | 77 | if (($location.url() == "/da-body-view") || ($location.url() == "/clinical-illustrations-detail") || ($location.url() == "/clinical-animations-detail")) { |
@@ -140,16 +147,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -140,16 +147,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
140 | } | 147 | } |
141 | } | 148 | } |
142 | 149 | ||
143 | - // $rootScope.DrawLine = function () { | ||
144 | - //$rootScope.isIdetifyClicked = false; | ||
145 | - //$rootScope.isDrawingToolSelected = true; | ||
146 | - //$rootScope.isLineDrawSelecyed = true; | ||
147 | - // $rootScope.shapeType = "Line"; | ||
148 | - // alert($rootScope.shapeType); | ||
149 | - | ||
150 | - | ||
151 | - // } | ||
152 | - | ||
153 | $rootScope.ClearIframe = function () { | 150 | $rootScope.ClearIframe = function () { |
154 | if ($('#daImagePanel') != null) | 151 | if ($('#daImagePanel') != null) |
155 | $('#daImagePanel').remove(); | 152 | $('#daImagePanel').remove(); |
@@ -287,14 +284,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -287,14 +284,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
287 | $('#modal-settings').modal('toggle'); | 284 | $('#modal-settings').modal('toggle'); |
288 | } | 285 | } |
289 | 286 | ||
290 | - | ||
291 | } | 287 | } |
292 | 288 | ||
293 | - | ||
294 | - | ||
295 | //----Annotation Toolbar: Jcanvas----- | 289 | //----Annotation Toolbar: Jcanvas----- |
296 | 290 | ||
297 | - $rootScope.DrLine = function (e) { | 291 | + $rootScope.DrawLine = function (e) |
292 | + { | ||
298 | $rootScope.setListManagerZindex = true; | 293 | $rootScope.setListManagerZindex = true; |
299 | $("#canvasPaint").css("display", "block"); | 294 | $("#canvasPaint").css("display", "block"); |
300 | $("#canvas").css("display", "block"); | 295 | $("#canvas").css("display", "block"); |
@@ -302,7 +297,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -302,7 +297,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
302 | $rootScope.switchCanvas(); | 297 | $rootScope.switchCanvas(); |
303 | $rootScope.shapeType = "Line"; | 298 | $rootScope.shapeType = "Line"; |
304 | 299 | ||
305 | - | ||
306 | $('.btnCursor').removeClass('activebtncolor'); | 300 | $('.btnCursor').removeClass('activebtncolor'); |
307 | $(".btn-annotation").removeClass("activebtncolor"); | 301 | $(".btn-annotation").removeClass("activebtncolor"); |
308 | $(".btn-annotation-line").addClass("activebtncolor"); | 302 | $(".btn-annotation-line").addClass("activebtncolor"); |
@@ -311,7 +305,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -311,7 +305,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
311 | } | 305 | } |
312 | 306 | ||
313 | 307 | ||
314 | - $rootScope.DrPin = function (e) { | 308 | + $rootScope.DrawPin = function (e) { |
315 | $("#canvasPaint").css("display", "block"); | 309 | $("#canvasPaint").css("display", "block"); |
316 | $("#canvas").css("display", "block"); | 310 | $("#canvas").css("display", "block"); |
317 | 311 | ||
@@ -386,13 +380,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -386,13 +380,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
386 | 380 | ||
387 | } | 381 | } |
388 | 382 | ||
389 | - | ||
390 | - // $('#canvasPaint').sketch(); | ||
391 | - | ||
392 | - | ||
393 | } | 383 | } |
394 | 384 | ||
395 | - | ||
396 | 385 | ||
397 | } | 386 | } |
398 | 387 | ||
@@ -441,23 +430,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -441,23 +430,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
441 | $('.btnCursor').removeClass('activebtncolor'); | 430 | $('.btnCursor').removeClass('activebtncolor'); |
442 | $(".btn-annotation").removeClass("activebtncolor"); | 431 | $(".btn-annotation").removeClass("activebtncolor"); |
443 | $(".btn-annotation-Text").addClass("activebtncolor"); | 432 | $(".btn-annotation-Text").addClass("activebtncolor"); |
444 | - // $("#text_area").val(''); | ||
445 | - // $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | ||
446 | - } | 433 | + } |
447 | 434 | ||
448 | $rootScope.DrawPolygon = function () { | 435 | $rootScope.DrawPolygon = function () { |
449 | $rootScope.setListManagerZindex = true; | 436 | $rootScope.setListManagerZindex = true; |
450 | $("#canvasPaint").css("display", "block"); | 437 | $("#canvasPaint").css("display", "block"); |
451 | $("#canvas").css("display", "block"); | 438 | $("#canvas").css("display", "block"); |
452 | $rootScope.shapeType = "DrawPolygon"; | 439 | $rootScope.shapeType = "DrawPolygon"; |
453 | - | ||
454 | } | 440 | } |
455 | 441 | ||
456 | 442 | ||
457 | - $rootScope.OpacityModal = function () { | ||
458 | - | ||
459 | - | ||
460 | - } | ||
461 | $rootScope.switchCanvas = function () { | 443 | $rootScope.switchCanvas = function () { |
462 | var x = $('#canvasPaint').css("z-index"); | 444 | var x = $('#canvasPaint').css("z-index"); |
463 | 445 | ||
@@ -471,25 +453,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -471,25 +453,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
471 | } | 453 | } |
472 | $rootScope.EraseDrawing = function () { | 454 | $rootScope.EraseDrawing = function () { |
473 | $rootScope.switchCanvas(); | 455 | $rootScope.switchCanvas(); |
474 | - $rootScope.isEraseToolSelected = true; | ||
475 | - //$rootScope.switchCanvasToPaintCanvas(); | ||
476 | - //// $('#canvasPaint').sketch({ defaultColor: "yellow", defaultSize: 1 }); | ||
477 | - //var sktch = $('#canvasPaint').sketch(); | ||
478 | - //$('#canvasPaint').sketch().actions = []; // this line empties the actions. | ||
479 | - //var myCanvas = document.getElementById("canvasPaint"); | ||
480 | - //var ctx = myCanvas.getContext('2d'); | ||
481 | - //ctx.clearRect(0, 0, myCanvas.width, myCanvas.height); | ||
482 | - //$rootScope.switchCanvas(); | ||
483 | - | 456 | + $rootScope.isEraseToolSelected = true; |
484 | } | 457 | } |
485 | 458 | ||
486 | - //opacity code | ||
487 | - $rootScope.shapestyleOpacity = 1; | ||
488 | - $rootScope.shapestyleFillColor = "#fff"; | ||
489 | - $rootScope.shapestyleFillBorderColor = "black"; | ||
490 | - $rootScope.shapestyleborderWidth = 2; | ||
491 | - $rootScope.shapestyleborderStyles = "solid"; | ||
492 | - $rootScope.shapestyle = function (id) { | 459 | + |
460 | + $rootScope.setPropertiesForShapes = function (id) { | ||
461 | + | ||
493 | 462 | ||
494 | if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { | 463 | if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { |
495 | // $('#btnShapeStyle').attr('disabled', 'disabled'); | 464 | // $('#btnShapeStyle').attr('disabled', 'disabled'); |
@@ -504,21 +473,18 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -504,21 +473,18 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
504 | $("#shapeStyleDiv").css("background-color", $rootScope.shapestyleFillColor); | 473 | $("#shapeStyleDiv").css("background-color", $rootScope.shapestyleFillColor); |
505 | $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color"); | 474 | $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color"); |
506 | $("#shapeStyleDiv").parent().css("border-color", $rootScope.shapestyleborderColor); | 475 | $("#shapeStyleDiv").parent().css("border-color", $rootScope.shapestyleborderColor); |
507 | - $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width"); | ||
508 | - $("#shapeStyleDiv").parent().css("border-width", $rootScope.shapestyleborderWidthSeparatingPixel); | ||
509 | - var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel; | ||
510 | - var intPart = pixelSeparation.split("p"); | 476 | + $rootScope.borderDimensions = $("#" + id).parent().css("border-top-width"); |
477 | + $("#shapeStyleDiv").parent().css("border-width", $rootScope.borderDimensions); | ||
478 | + | ||
479 | + var borderDimensions = $rootScope.borderDimensions; | ||
480 | + var borderDimensionSplitArray = borderDimensions.split("p"); | ||
511 | 481 | ||
512 | - $rootScope.shapestyleborderWidth = intPart[0]; | 482 | + $rootScope.shapestyleborderWidth = borderDimensionSplitArray[0]; |
513 | $rootScope.shapestyleborderStyles = "solid"; | 483 | $rootScope.shapestyleborderStyles = "solid"; |
514 | 484 | ||
515 | 485 | ||
516 | $('#editshapestyle').modal('hide'); | 486 | $('#editshapestyle').modal('hide'); |
517 | - // name: 'Circle_' + $rootScope.resetCircle, | ||
518 | - | ||
519 | - | ||
520 | - // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | ||
521 | - | 487 | + |
522 | //Edit Shape Style popup should open at it's default position | 488 | //Edit Shape Style popup should open at it's default position |
523 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); | 489 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); |
524 | } | 490 | } |
@@ -527,12 +493,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -527,12 +493,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
527 | $rootScope.enableAnnotationToolBar = function () { | 493 | $rootScope.enableAnnotationToolBar = function () { |
528 | if ($rootScope.disableAnnotationTB == true) { | 494 | if ($rootScope.disableAnnotationTB == true) { |
529 | document.getElementById('modelbackground').style.display = "none"; | 495 | document.getElementById('modelbackground').style.display = "none"; |
530 | - //$("#editshapestyle").modal('show'); | ||
531 | document.getElementById('modeleditstyle').style.display = "none"; | 496 | document.getElementById('modeleditstyle').style.display = "none"; |
532 | } | 497 | } |
533 | else { | 498 | else { |
534 | document.getElementById('modelbackground').style.display = "block"; | 499 | document.getElementById('modelbackground').style.display = "block"; |
535 | - //$("#editshapestyle").modal('show'); | ||
536 | document.getElementById('modeleditstyle').style.display = "block"; | 500 | document.getElementById('modeleditstyle').style.display = "block"; |
537 | if ($('#modeleditstyle').css("display") == "block") { //Check if the modal is already showing | 501 | if ($('#modeleditstyle').css("display") == "block") { //Check if the modal is already showing |
538 | var previewOpacity = $('#imgOpacity').css("opacity"); | 502 | var previewOpacity = $('#imgOpacity').css("opacity"); |
@@ -556,8 +520,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -556,8 +520,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
556 | 520 | ||
557 | $(".custom-tooltip-annotation").css('display', 'none'); | 521 | $(".custom-tooltip-annotation").css('display', 'none'); |
558 | $("#edit-block").removeClass("custom-tooltip-annotation"); | 522 | $("#edit-block").removeClass("custom-tooltip-annotation"); |
559 | - | ||
560 | - | ||
561 | } | 523 | } |
562 | 524 | ||
563 | 525 | ||
@@ -568,16 +530,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -568,16 +530,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
568 | //Edit Shape Style popup should open at it's default position | 530 | //Edit Shape Style popup should open at it's default position |
569 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); | 531 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); |
570 | 532 | ||
571 | - | ||
572 | } | 533 | } |
573 | 534 | ||
574 | - | ||
575 | - | ||
576 | - | ||
577 | - //----End------------- | ||
578 | 535 | ||
579 | //--Common code of Annotation Toolbar for CI and DA------- | 536 | //--Common code of Annotation Toolbar for CI and DA------- |
580 | - $rootScope.LineFn = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | 537 | + $rootScope.DrawLineOnModuleItem = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { |
581 | $(canvasId).addLayer({ | 538 | $(canvasId).addLayer({ |
582 | name: 'Line_' + LineNumber, | 539 | name: 'Line_' + LineNumber, |
583 | layer: true, | 540 | layer: true, |
@@ -640,8 +597,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -640,8 +597,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
640 | $('.btnCursor').addClass('activebtncolor'); | 597 | $('.btnCursor').addClass('activebtncolor'); |
641 | } | 598 | } |
642 | 599 | ||
643 | - $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | ||
644 | - // alert("offsetX:" + offsetX1 + " offsetY:" + offsetY1 + " x:" + x + " y:" + y); | 600 | + $rootScope.DrawRectangleOnModuleItem = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { |
601 | + | ||
645 | $(canvasId).addLayer({ | 602 | $(canvasId).addLayer({ |
646 | layer: true, | 603 | layer: true, |
647 | name: 'Rect_' + RectNumber, | 604 | name: 'Rect_' + RectNumber, |
@@ -657,8 +614,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -657,8 +614,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
657 | 614 | ||
658 | resizeFromCenter: true, | 615 | resizeFromCenter: true, |
659 | 616 | ||
660 | - dblclick: function () { | ||
661 | - // $rootScope.backOpacity(); | 617 | + dblclick: function () { |
662 | 618 | ||
663 | }, | 619 | }, |
664 | 620 | ||
@@ -708,16 +664,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -708,16 +664,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
708 | 664 | ||
709 | } | 665 | } |
710 | }).drawLayers(); | 666 | }).drawLayers(); |
711 | - | ||
712 | - | ||
713 | - | ||
714 | $('.btnCursor').trigger('click'); | 667 | $('.btnCursor').trigger('click'); |
715 | $(".btn-annotation").removeClass("activebtncolor"); | 668 | $(".btn-annotation").removeClass("activebtncolor"); |
716 | $('.btnCursor').addClass('activebtncolor'); | 669 | $('.btnCursor').addClass('activebtncolor'); |
717 | 670 | ||
718 | } | 671 | } |
719 | 672 | ||
720 | - $rootScope.CircleFn = function (canvasId, CircleNumber, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, offsetX1, offsetY1, x, y) { | 673 | + $rootScope.DrawCircleOnModuleItem = function (canvasId, CircleNumber, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, offsetX1, offsetY1, x, y) { |
721 | 674 | ||
722 | $(canvasId).addLayer({ | 675 | $(canvasId).addLayer({ |
723 | layer: true, | 676 | layer: true, |
@@ -732,9 +685,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -732,9 +685,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
732 | width: (x - offsetX1) * 2, height: (y - offsetY1) * 2, | 685 | width: (x - offsetX1) * 2, height: (y - offsetY1) * 2, |
733 | // Place a handle at each side and each corner | 686 | // Place a handle at each side and each corner |
734 | handlePlacement: 'both', | 687 | handlePlacement: 'both', |
735 | - | ||
736 | - | ||
737 | - | ||
738 | click: function (layer) { | 688 | click: function (layer) { |
739 | 689 | ||
740 | $rootScope.canvasLayerNameCollection = []; | 690 | $rootScope.canvasLayerNameCollection = []; |
@@ -787,7 +737,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -787,7 +737,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
787 | $('.btnCursor').addClass('activebtncolor'); | 737 | $('.btnCursor').addClass('activebtncolor'); |
788 | } | 738 | } |
789 | 739 | ||
790 | - $rootScope.ArrowFn = function (canvasId, ArrowNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | 740 | + $rootScope.DrawArrowOnModuleItem = function (canvasId, ArrowNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { |
791 | 741 | ||
792 | $('#canvas').drawLine({ | 742 | $('#canvas').drawLine({ |
793 | layer: true, | 743 | layer: true, |
@@ -855,7 +805,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -855,7 +805,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
855 | $('.btnCursor').addClass('activebtncolor'); | 805 | $('.btnCursor').addClass('activebtncolor'); |
856 | } | 806 | } |
857 | 807 | ||
858 | - $rootScope.PinFn = function (canvasId, PinNumber, offsetX1, offsetY1, x, y, PinArcNumber) { | 808 | + $rootScope.DrawPinOnModuleItem = function (canvasId, PinNumber, offsetX1, offsetY1, x, y, PinArcNumber) { |
859 | 809 | ||
860 | var xAxisPinDiff = offsetX1 - x; | 810 | var xAxisPinDiff = offsetX1 - x; |
861 | var yAxisPinDiff = offsetY1 - y; | 811 | var yAxisPinDiff = offsetY1 - y; |
@@ -946,13 +896,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -946,13 +896,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
946 | fillStyle: radial, | 896 | fillStyle: radial, |
947 | x: offsetX1, y: offsetY1, | 897 | x: offsetX1, y: offsetY1, |
948 | radius: 5, | 898 | radius: 5, |
949 | - //handle: { | ||
950 | - // type: 'arc', | ||
951 | - // fillStyle: '#fff', | ||
952 | - // strokeStyle: '#c33', | ||
953 | - // strokeWidth: 2, | ||
954 | - // radius: 3 | ||
955 | - //}, | 899 | + |
956 | 900 | ||
957 | add: function (layer) { | 901 | add: function (layer) { |
958 | 902 | ||
@@ -970,7 +914,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -970,7 +914,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
970 | $('.btnCursor').addClass('activebtncolor'); | 914 | $('.btnCursor').addClass('activebtncolor'); |
971 | } | 915 | } |
972 | 916 | ||
973 | - $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) { | 917 | + $rootScope.TextEditorFunctionality = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) { |
974 | 918 | ||
975 | 919 | ||
976 | debugger; | 920 | debugger; |
@@ -1217,13 +1161,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1217,13 +1161,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1217 | //$rootScope.canvasLayerNameCollection = []; | 1161 | //$rootScope.canvasLayerNameCollection = []; |
1218 | $rootScope.LineNumber = $rootScope.ObjectIndex++; | 1162 | $rootScope.LineNumber = $rootScope.ObjectIndex++; |
1219 | 1163 | ||
1220 | - $rootScope.LineFn('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y) | 1164 | + $rootScope.DrawLineOnModuleItem('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y) |
1221 | 1165 | ||
1222 | break; | 1166 | break; |
1223 | 1167 | ||
1224 | case "Rectangle": | 1168 | case "Rectangle": |
1225 | $rootScope.rectNumber = $rootScope.ObjectIndex++; | 1169 | $rootScope.rectNumber = $rootScope.ObjectIndex++; |
1226 | - $rootScope.RectangleFn('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | 1170 | + $rootScope.DrawRectangleOnModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); |
1227 | 1171 | ||
1228 | break; | 1172 | break; |
1229 | 1173 | ||
@@ -1231,19 +1175,19 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1231,19 +1175,19 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1231 | // alert($rootScope.shapestyleborderWidth); | 1175 | // alert($rootScope.shapestyleborderWidth); |
1232 | $rootScope.CircleNumber = $rootScope.ObjectIndex++; | 1176 | $rootScope.CircleNumber = $rootScope.ObjectIndex++; |
1233 | 1177 | ||
1234 | - $rootScope.CircleFn('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | 1178 | + $rootScope.DrawCircleOnModuleItem('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); |
1235 | break; | 1179 | break; |
1236 | case "Arrow": | 1180 | case "Arrow": |
1237 | $rootScope.ArrowNumber = $rootScope.ObjectIndex++; | 1181 | $rootScope.ArrowNumber = $rootScope.ObjectIndex++; |
1238 | 1182 | ||
1239 | - $rootScope.ArrowFn('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | 1183 | + $rootScope.DrawArrowOnModuleItem('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); |
1240 | 1184 | ||
1241 | // $scope.resetRect += 1; | 1185 | // $scope.resetRect += 1; |
1242 | break; | 1186 | break; |
1243 | case "Pin": | 1187 | case "Pin": |
1244 | $rootScope.PinNumber = $rootScope.PinObjectIndex++; | 1188 | $rootScope.PinNumber = $rootScope.PinObjectIndex++; |
1245 | $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++; | 1189 | $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++; |
1246 | - $rootScope.PinFn('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber); | 1190 | + $rootScope.DrawPinOnModuleItem('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber); |
1247 | 1191 | ||
1248 | break; | 1192 | break; |
1249 | case "TextArea": | 1193 | case "TextArea": |
@@ -1253,7 +1197,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1253,7 +1197,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1253 | // Draw text | 1197 | // Draw text |
1254 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; | 1198 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; |
1255 | $rootScope.TextNumber = $rootScope.ObjectIndex++; | 1199 | $rootScope.TextNumber = $rootScope.ObjectIndex++; |
1256 | - $rootScope.TextAreaFn('#canvas', $rootScope.TextNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.resetTextRect, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.x, $rootScope.y); | 1200 | + $rootScope.TextEditorFunctionality('#canvas', $rootScope.TextNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.resetTextRect, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.x, $rootScope.y); |
1257 | break; | 1201 | break; |
1258 | 1202 | ||
1259 | case "DrawPolygon": | 1203 | case "DrawPolygon": |
@@ -1264,12 +1208,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1264,12 +1208,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1264 | //} | 1208 | //} |
1265 | 1209 | ||
1266 | } | 1210 | } |
1267 | - | ||
1268 | - | ||
1269 | - | ||
1270 | - | ||
1271 | - | ||
1272 | - | ||
1273 | ///----- | 1211 | ///----- |
1274 | 1212 | ||
1275 | $rootScope.saveText = function () { | 1213 | $rootScope.saveText = function () { |
@@ -1416,14 +1354,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1416,14 +1354,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1416 | CurrentFontFamily = ''; | 1354 | CurrentFontFamily = ''; |
1417 | CurrentFontSize = ''; | 1355 | CurrentFontSize = ''; |
1418 | 1356 | ||
1419 | - // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" }); | ||
1420 | - // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | ||
1421 | - | ||
1422 | - | ||
1423 | - //adding text text decoration active class in text edit pop-up | ||
1424 | - | ||
1425 | - | ||
1426 | - | ||
1427 | 1357 | ||
1428 | if ($rootScope.TextPropertyArray[i].TextDecoration == "underline") { | 1358 | if ($rootScope.TextPropertyArray[i].TextDecoration == "underline") { |
1429 | 1359 | ||
@@ -1437,14 +1367,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1437,14 +1367,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1437 | 1367 | ||
1438 | } | 1368 | } |
1439 | 1369 | ||
1440 | - | ||
1441 | - | ||
1442 | //adding text font weight active class in text edit pop-up | 1370 | //adding text font weight active class in text edit pop-up |
1443 | 1371 | ||
1444 | if (fontWeightProp[0] == 700) { | 1372 | if (fontWeightProp[0] == 700) { |
1445 | 1373 | ||
1446 | - | ||
1447 | - | ||
1448 | $("#text-bold").addClass("ActiveFormattingButtonClass"); | 1374 | $("#text-bold").addClass("ActiveFormattingButtonClass"); |
1449 | 1375 | ||
1450 | } | 1376 | } |
@@ -1489,9 +1415,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1489,9 +1415,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1489 | $("#text-left").removeClass("ActiveFormattingButtonClass"); | 1415 | $("#text-left").removeClass("ActiveFormattingButtonClass"); |
1490 | 1416 | ||
1491 | $("#text-right").addClass("ActiveFormattingButtonClass"); | 1417 | $("#text-right").addClass("ActiveFormattingButtonClass"); |
1492 | - | ||
1493 | - | ||
1494 | - | ||
1495 | } | 1418 | } |
1496 | 1419 | ||
1497 | else if ($rootScope.TextPropertyArray[i].Align == "center") { | 1420 | else if ($rootScope.TextPropertyArray[i].Align == "center") { |
@@ -1502,12 +1425,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1502,12 +1425,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1502 | 1425 | ||
1503 | $("#text-center").addClass("ActiveFormattingButtonClass"); | 1426 | $("#text-center").addClass("ActiveFormattingButtonClass"); |
1504 | 1427 | ||
1505 | - | ||
1506 | - | ||
1507 | } | 1428 | } |
1508 | 1429 | ||
1509 | - | ||
1510 | - | ||
1511 | } | 1430 | } |
1512 | else { | 1431 | else { |
1513 | // alert("no"); | 1432 | // alert("no"); |
@@ -1831,12 +1750,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1831,12 +1750,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1831 | 1750 | ||
1832 | document.getElementById('modelbackground').style.display = "none"; | 1751 | document.getElementById('modelbackground').style.display = "none"; |
1833 | 1752 | ||
1834 | - //if ($rootScope.isTextAreaClosedButtonActive == true) { | ||
1835 | - // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers(); | ||
1836 | - // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | ||
1837 | - | ||
1838 | - //} | ||
1839 | - | ||
1840 | } | 1753 | } |
1841 | //-- End ---------------------------- | 1754 | //-- End ---------------------------- |
1842 | 1755 | ||
@@ -1873,17 +1786,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1873,17 +1786,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1873 | $rootScope.PaintCanvasMousedownListener = function (canvasContext, x, y) { | 1786 | $rootScope.PaintCanvasMousedownListener = function (canvasContext, x, y) { |
1874 | if ($rootScope.isLineDrawSelecyed == true) { | 1787 | if ($rootScope.isLineDrawSelecyed == true) { |
1875 | 1788 | ||
1876 | - canvasContext.lineWidth = 0.1; | ||
1877 | - //$scope.paintCanvasContext.lineJoin = 'round'; | ||
1878 | - //$scope.paintCanvasContext.lineCap = 'round'; | 1789 | + canvasContext.lineWidth = 0.1; |
1879 | canvasContext.strokeStyle = 'red'; | 1790 | canvasContext.strokeStyle = 'red'; |
1880 | - | ||
1881 | - | ||
1882 | canvasContext.beginPath(); | 1791 | canvasContext.beginPath(); |
1883 | - | ||
1884 | - //var canvasOffset = $("#myCanvas").offset(); | ||
1885 | - //var offsetX = canvasOffset.left; | ||
1886 | - //var offsetY = canvasOffset.top; | ||
1887 | canvasContext.moveTo(x, y); | 1792 | canvasContext.moveTo(x, y); |
1888 | } | 1793 | } |
1889 | 1794 | ||
@@ -2128,14 +2033,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2128,14 +2033,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2128 | } | 2033 | } |
2129 | 2034 | ||
2130 | //2. | 2035 | //2. |
2131 | - //localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); | ||
2132 | - | ||
2133 | - //3. | ||
2134 | - //localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); | ||
2135 | - | ||
2136 | - //4. | ||
2137 | - //$rootScope.reloadChildController(); | ||
2138 | - | 2036 | + |
2139 | var len = $rootScope.openModules.length; | 2037 | var len = $rootScope.openModules.length; |
2140 | if (len > 0) { | 2038 | if (len > 0) { |
2141 | $rootScope.reloadChildController(); | 2039 | $rootScope.reloadChildController(); |
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -508,12 +508,12 @@ | @@ -508,12 +508,12 @@ | ||
508 | <div class="" role="group" align="center"> | 508 | <div class="" role="group" align="center"> |
509 | <div id="cursor-block" style="display: none; font-size:13px;"></div> | 509 | <div id="cursor-block" style="display: none; font-size:13px;"></div> |
510 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" ng-mouseover="mouseMoveToolTip(75, 60, 120, 'Select Cursor(s)')" ng-mouseleave="mouseOutToolTip()" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button> | 510 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" ng-mouseover="mouseMoveToolTip(75, 60, 120, 'Select Cursor(s)')" ng-mouseleave="mouseOutToolTip()" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button> |
511 | - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" ng-mouseover="mouseMoveToolTip(75, 100, 120, 'Draw Pin')" ng-mouseleave="mouseOutToolTip()" ng-click="DrPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button> | 511 | + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" ng-mouseover="mouseMoveToolTip(75, 100, 120, 'Draw Pin')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button> |
512 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" ng-mouseover="mouseMoveToolTip(75, 120, 120, 'Draw Arrow')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button> | 512 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" ng-mouseover="mouseMoveToolTip(75, 120, 120, 'Draw Arrow')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button> |
513 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" ng-mouseover="mouseMoveToolTip(75, 140, 120, 'Draw Text')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button> | 513 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" ng-mouseover="mouseMoveToolTip(75, 140, 120, 'Draw Text')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button> |
514 | </div> | 514 | </div> |
515 | <div class="" role="group" align="center"> | 515 | <div class="" role="group" align="center"> |
516 | - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" ng-mouseover="mouseMoveToolTip(95, 60, 120, 'Draw Line')" ng-mouseleave="mouseOutToolTip()" ng-click="DrLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button> | 516 | + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" ng-mouseover="mouseMoveToolTip(95, 60, 120, 'Draw Line')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button> |
517 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" ng-mouseover="mouseMoveToolTip(95, 100, 120, 'Draw Rectangle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button> | 517 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" ng-mouseover="mouseMoveToolTip(95, 100, 120, 'Draw Rectangle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button> |
518 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" ng-mouseover="mouseMoveToolTip(95, 120, 120, 'Draw Circle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button> | 518 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" ng-mouseover="mouseMoveToolTip(95, 120, 120, 'Draw Circle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button> |
519 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" ng-mouseover="mouseMoveToolTip(95, 140, 120, 'Draw Polygon')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button> | 519 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" ng-mouseover="mouseMoveToolTip(95, 140, 120, 'Draw Polygon')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button> |
@@ -770,7 +770,7 @@ | @@ -770,7 +770,7 @@ | ||
770 | <!--Edit Shape Modal--> | 770 | <!--Edit Shape Modal--> |
771 | 771 | ||
772 | 772 | ||
773 | - <div class="modeleditstyle" id="modeleditstyle" style="z-index: 1000000000; background: white; height: 433px; width: 302px;position:absolute;left:40%;right:0;top:70px;"> | 773 | + <div class="modeleditstyle" id="modeleditstyle" style="z-index: 1000000000; background: white;width: 302px;position:absolute;left:40%;right:0;top:70px;"> |
774 | <div class="modal-content"> | 774 | <div class="modal-content"> |
775 | <div class="modal-header annotation-modal-header"> | 775 | <div class="modal-header annotation-modal-header"> |
776 | <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4> | 776 | <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4> |
@@ -1008,7 +1008,7 @@ | @@ -1008,7 +1008,7 @@ | ||
1008 | </div> | 1008 | </div> |
1009 | </div> | 1009 | </div> |
1010 | <div class="modal-footer"> | 1010 | <div class="modal-footer"> |
1011 | - <button type="button" class="btn btn-primary btn-sm" ng-click="shapestyle('imgOpacity')"> | 1011 | + <button type="button" class="btn btn-primary btn-sm" ng-click="setPropertiesForShapes('imgOpacity')"> |
1012 | OK | 1012 | OK |
1013 | </button> | 1013 | </button> |
1014 | <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> | 1014 | <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> |