Commit bee21369467be0f651cb8d9a9bfa8ff2fc0af572
1 parent
c15dd72d
Commit Changes
Showing
3 changed files
with
124 additions
and
71 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -780,9 +780,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
780 | 780 | //history code |
781 | 781 | |
782 | 782 | if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { |
783 | - var annotationAppendedCanvas = $("#canvasDiv").append('<canvas id="canvasPaint" width="2277" height="3248" ng-click="FreeStylePaint($event)" class="canvas-annotationStyle1"></canvas><canvas id="canvas" ng-click="BindCanvasDrawingListners($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas>'); | |
784 | - $compile(annotationAppendedCanvas)($scope); | |
785 | - $scope.BindCanvasDrawingListners(); | |
783 | + var ATBarHtml = $("#canvasDiv").append('<canvas id="canvasPaint" width="2277" height="3248" ng-click="FreeStylePaint($event)" class="canvas-annotationStyle1"></canvas><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas>'); | |
784 | + $compile(ATBarHtml)($scope); | |
785 | + $scope.onDrawingCanvasClick(); | |
786 | 786 | // $rootScope.FreeStylePaint(); |
787 | 787 | |
788 | 788 | } |
... | ... | @@ -792,7 +792,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
792 | 792 | |
793 | 793 | // var $layerChange = $("#canvasDiv").append('<canvas id="canvasPaint" width="2277" ng-click="FreeStylePaint($event)" height="3248" class="canvas-annotationStyle1"></canvas><canvas id="canvas" width="2277" height="3248" class="canvas-annotationStyle"></canvas>'); |
794 | 794 | // $compile($layerChange)($scope); |
795 | - // $scope.BindCanvasDrawingListners(); | |
795 | + // $scope.onDrawingCanvasClick(); | |
796 | 796 | // // $rootScope.FreeStylePaint(); |
797 | 797 | |
798 | 798 | //} |
... | ... | @@ -3000,7 +3000,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3000 | 3000 | //$("#bord").css({ "width": "0px", "display": "none" }); |
3001 | 3001 | |
3002 | 3002 | //history maintained issue |
3003 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
3003 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
3004 | 3004 | $("#sppeachBubble").remove(); |
3005 | 3005 | $("#dot").remove(); |
3006 | 3006 | } |
... | ... | @@ -3111,7 +3111,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3111 | 3111 | |
3112 | 3112 | |
3113 | 3113 | //history maintained issue |
3114 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { document.getElementById('sppeachBubble').style.zIndex = "100000000000"; } | |
3114 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { document.getElementById('sppeachBubble').style.zIndex = "100000000000"; } | |
3115 | 3115 | |
3116 | 3116 | |
3117 | 3117 | |
... | ... | @@ -4674,7 +4674,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4674 | 4674 | |
4675 | 4675 | // History Maintained Issue// |
4676 | 4676 | |
4677 | - $rootScope.DrawingListners_Canvas = function (event) { | |
4677 | + $rootScope.getAnnotationTextBasedOnSelectedBodyRegion = function (event) { | |
4678 | 4678 | |
4679 | 4679 | |
4680 | 4680 | var canvasDiv = document.getElementById('canvasDiv'); |
... | ... | @@ -4686,38 +4686,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4686 | 4686 | $rootScope.Yaxis = event.pageY - $('#canvasDiv').offset().top + verticalScrollPosition; |
4687 | 4687 | |
4688 | 4688 | |
4689 | - $rootScope.getBodyRegionID(); | |
4689 | + $rootScope.setSelectedBodyRegionData(); | |
4690 | 4690 | |
4691 | - if ($rootScope.MaskedCanvasMrImageForAnotation == "No") { | |
4692 | - var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_mci"; | |
4693 | - var maskCanvas = document.getElementById(maskCanvasIdForAnnotation); | |
4691 | + if ($rootScope.isMirrorBodyRegion == "No") { | |
4692 | + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci"; | |
4693 | + var maskCanvas = document.getElementById(maskCanvasId); | |
4694 | 4694 | var maskCanvasContext = maskCanvas.getContext("2d"); |
4695 | - var canvasDiv = document.getElementById('canvasDiv'); | |
4696 | - var verticalScrollPosition = canvasDiv.scrollTop; | |
4697 | - var horizontlScrollPosition = canvasDiv.scrollLeft; | |
4695 | + //var canvasDiv = document.getElementById('canvasDiv'); | |
4696 | + //var verticalScrollPosition = canvasDiv.scrollTop; | |
4697 | + //var horizontlScrollPosition = canvasDiv.scrollLeft; | |
4698 | 4698 | var actulalX = $rootScope.Xaxis; |
4699 | 4699 | var actualY = $rootScope.Yaxis; |
4700 | - var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, $rootScope.MaskedCanvasXForAnotation, $rootScope.MaskedCanvasYForAnotation); | |
4700 | + var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, $rootScope.BodyRegionXAxis, $rootScope.BodyRegionYAxis); | |
4701 | 4701 | var annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); |
4702 | 4702 | |
4703 | 4703 | } |
4704 | 4704 | else { |
4705 | 4705 | |
4706 | - var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_MR_mci"; | |
4707 | - var maskoffsetval = $('#' + maskCanvasIdForAnnotation).offset(); | |
4706 | + var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_MR_mci"; | |
4707 | + var maskoffsetval = $('#' + maskCanvasId).offset(); | |
4708 | 4708 | var mirrorCanvasX = maskoffsetval.left; |
4709 | 4709 | //alert(mirrorCanvasX); |
4710 | - var mirrorImageCanvas = document.getElementById(maskCanvasIdForAnnotation); | |
4710 | + var mirrorImageCanvas = document.getElementById(maskCanvasId); | |
4711 | 4711 | var mirrorCanvasWidth = mirrorImageCanvas.clientWidth; |
4712 | 4712 | // alert(mirrorCanvasWidth); |
4713 | - var maskCanvas = document.getElementById(maskCanvasIdForAnnotation); | |
4713 | + var maskCanvas = document.getElementById(maskCanvasId); | |
4714 | 4714 | var maskCanvasContext = maskCanvas.getContext("2d"); |
4715 | 4715 | |
4716 | 4716 | var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(event.pageX) + horizontlScrollPosition);// - 135); |
4717 | 4717 | var mirrorXOnNormalImage = parseInt(maskCanvasContext.canvas.offsetLeft) + parseInt(distanceXOnMirrorImage); |
4718 | 4718 | var actulalX = mirrorXOnNormalImage; |
4719 | 4719 | var actualY = event.pageY + verticalScrollPosition; |
4720 | - var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - parseInt(maskCanvasContext.canvas.offsetLeft)), Math.round(actualY - $rootScope.MaskedCanvasYForAnotation), 1, 1); | |
4720 | + var pixelData = maskCanvasContext.getImageData(Math.round(actulalX - parseInt(maskCanvasContext.canvas.offsetLeft)), Math.round(actualY - $rootScope.BodyRegionYAxis), 1, 1); | |
4721 | 4721 | pixelData.data[0] = pixelData.data[0] - 9; |
4722 | 4722 | pixelData.data[1] = pixelData.data[1] - 9; |
4723 | 4723 | pixelData.data[2] = pixelData.data[2] - 9 |
... | ... | @@ -4749,7 +4749,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4749 | 4749 | |
4750 | 4750 | } |
4751 | 4751 | |
4752 | - // var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_mci"; | |
4752 | + // var maskCanvasId = "imageCanvas" + $rootScope.BRId + "_mci"; | |
4753 | 4753 | |
4754 | 4754 | // alert(annotationText); |
4755 | 4755 | $scope.MultiLanguageAnnationArray = []; |
... | ... | @@ -4764,17 +4764,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4764 | 4764 | } |
4765 | 4765 | |
4766 | 4766 | |
4767 | - $rootScope.getBodyRegionID = function () { | |
4767 | + $rootScope.setSelectedBodyRegionData = function () { | |
4768 | 4768 | var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData; |
4769 | 4769 | |
4770 | 4770 | $.each(BodyRegionDictionary, function (index, value) { |
4771 | 4771 | var bodyRegionRight = parseInt(value.X) + parseInt(value.Width); |
4772 | 4772 | var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height); |
4773 | 4773 | if ($rootScope.Xaxis <= bodyRegionRight && $rootScope.Yaxis <= bodyRegionBottom && value.X <= $rootScope.Xaxis && value.Y <= $rootScope.Yaxis) { |
4774 | - $rootScope.MaskedCanvasIDForAnnotation = value.bodyRegionId; | |
4775 | - $rootScope.MaskedCanvasXForAnotation = value.X; | |
4776 | - $rootScope.MaskedCanvasYForAnotation = value.Y; | |
4777 | - $rootScope.MaskedCanvasMrImageForAnotation = value.IsMirror; | |
4774 | + $rootScope.BRId = value.bodyRegionId; | |
4775 | + $rootScope.BodyRegionXAxis = value.X; | |
4776 | + $rootScope.BodyRegionYAxis = value.Y; | |
4777 | + $rootScope.isMirrorBodyRegion = value.IsMirror; | |
4778 | 4778 | return false; |
4779 | 4779 | } |
4780 | 4780 | }); |
... | ... | @@ -7027,7 +7027,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7027 | 7027 | |
7028 | 7028 | $("#canvas").css("display", "block"); |
7029 | 7029 | $("#canvasPaint").css("display", "block"); |
7030 | - $rootScope.BindCanvasDrawingListners(); | |
7030 | + $rootScope.onDrawingCanvasClick(); | |
7031 | 7031 | $rootScope.FreeStylePaint(); |
7032 | 7032 | }); |
7033 | 7033 | $scope.mousePs; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -267,7 +267,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
267 | 267 | |
268 | 268 | } |
269 | 269 | |
270 | - $rootScope.isAnnotaionToolBarDrawingModeActive = true; | |
270 | + $rootScope.isAnnotaionToolBarDrawingModeActive = false; | |
271 | 271 | $rootScope.switchCanvas(); |
272 | 272 | } |
273 | 273 | |
... | ... | @@ -275,7 +275,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
275 | 275 | |
276 | 276 | $rootScope.DrawingMode = function () { |
277 | 277 | //Annotation History |
278 | - $rootScope.isAnnotaionToolBarDrawingModeActive = false; | |
278 | + $rootScope.isAnnotaionToolBarDrawingModeActive = true; | |
279 | 279 | $("#OnIdentify").removeClass("annotationtoolbartab"); |
280 | 280 | $("#DrawMode").addClass("annotationtoolbartab"); |
281 | 281 | $('.btnCursor').addClass('activebtncolor'); |
... | ... | @@ -572,7 +572,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
572 | 572 | x2: x, y2: y, |
573 | 573 | |
574 | 574 | click: function (layer) { |
575 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
575 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
576 | + //jcanvas property | |
576 | 577 | layer.draggable = true; |
577 | 578 | $rootScope.canvasLayerNameCollection = []; |
578 | 579 | $rootScope.canvasLayerNameCollection.push(layer.name); |
... | ... | @@ -588,11 +589,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
588 | 589 | |
589 | 590 | } |
590 | 591 | else { |
592 | + //jcanvas property | |
591 | 593 | layer.draggable = false; |
592 | 594 | } |
593 | 595 | }, |
594 | 596 | mouseout: function (layer) { |
595 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
597 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
598 | + //jcanvas property | |
596 | 599 | layer.draggable = true; |
597 | 600 | $rootScope.canvasLayerNameCollection = []; |
598 | 601 | $(canvasId).setLayer(layer.name, { |
... | ... | @@ -607,12 +610,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
607 | 610 | }).drawLayers(); |
608 | 611 | } |
609 | 612 | else { |
613 | + //jcanvas property | |
610 | 614 | layer.draggable = false; |
611 | 615 | } |
612 | 616 | }, |
613 | 617 | mouseover: function (layer) { |
614 | 618 | |
615 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
619 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
620 | + //jcanvas property | |
616 | 621 | layer.draggable = true; |
617 | 622 | |
618 | 623 | $(canvasId).setLayer(layer.name, { |
... | ... | @@ -626,6 +631,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
626 | 631 | }).drawLayers(); |
627 | 632 | } |
628 | 633 | else { |
634 | + //jcanvas property | |
629 | 635 | layer.draggable = false; |
630 | 636 | } |
631 | 637 | } |
... | ... | @@ -664,7 +670,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
664 | 670 | }, |
665 | 671 | |
666 | 672 | click: function (layer) { |
667 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
673 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
674 | + //jcanvas property | |
668 | 675 | layer.draggable = true; |
669 | 676 | $rootScope.canvasLayerNameCollection = []; |
670 | 677 | $rootScope.canvasLayerNameCollection.push(layer.name); |
... | ... | @@ -680,11 +687,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
680 | 687 | }).drawLayers(); |
681 | 688 | } |
682 | 689 | else { |
690 | + //jcanvas property | |
683 | 691 | layer.draggable = false; |
684 | 692 | } |
685 | 693 | }, |
686 | 694 | mouseout: function (layer) { |
687 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
695 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
696 | + //jcanvas property | |
688 | 697 | layer.draggable = true; |
689 | 698 | $rootScope.canvasLayerNameCollection = []; |
690 | 699 | $(canvasId).setLayer(layer.name, { |
... | ... | @@ -700,11 +709,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
700 | 709 | }).drawLayers(); |
701 | 710 | } |
702 | 711 | else { |
712 | + //jcanvas property | |
703 | 713 | layer.draggable = false; |
704 | 714 | } |
705 | 715 | }, |
706 | 716 | mouseover: function (layer) { |
707 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
717 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
718 | + //jcanvas property | |
708 | 719 | layer.draggable = true; |
709 | 720 | |
710 | 721 | $(canvasId).setLayer(layer.name, { |
... | ... | @@ -719,6 +730,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
719 | 730 | }).drawLayers(); |
720 | 731 | } |
721 | 732 | else { |
733 | + //jcanvas property | |
722 | 734 | layer.draggable = false; |
723 | 735 | } |
724 | 736 | } |
... | ... | @@ -750,7 +762,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
750 | 762 | resizeFromCenter: false, |
751 | 763 | handlePlacement: 'both', |
752 | 764 | click: function (layer) { |
753 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
765 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
766 | + //jcanvas property | |
754 | 767 | layer.draggable = true; |
755 | 768 | $rootScope.canvasLayerNameCollection = []; |
756 | 769 | $rootScope.canvasLayerNameCollection.push(layer.name); |
... | ... | @@ -765,11 +778,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
765 | 778 | }).drawLayers(); |
766 | 779 | } |
767 | 780 | else { |
781 | + //jcanvas property | |
768 | 782 | layer.draggable = false; |
769 | 783 | } |
770 | 784 | }, |
771 | 785 | mouseout: function (layer) { |
772 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
786 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
787 | + //jcanvas property | |
773 | 788 | layer.draggable = true; |
774 | 789 | $rootScope.canvasLayerNameCollection = []; |
775 | 790 | |
... | ... | @@ -790,7 +805,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
790 | 805 | } |
791 | 806 | }, |
792 | 807 | mouseover: function (layer) { |
793 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
808 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
809 | + //jcanvas property | |
794 | 810 | layer.draggable = true; |
795 | 811 | |
796 | 812 | $(canvasId).setLayer(layer.name, { |
... | ... | @@ -805,6 +821,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
805 | 821 | }).drawLayers(); |
806 | 822 | } |
807 | 823 | else { |
824 | + //jcanvas property | |
808 | 825 | layer.draggable = false; |
809 | 826 | } |
810 | 827 | } |
... | ... | @@ -832,7 +849,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
832 | 849 | x2: x, y2: y, |
833 | 850 | |
834 | 851 | click: function (layer) { |
835 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
852 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
853 | + //jcanvas property | |
836 | 854 | layer.draggable = true; |
837 | 855 | $rootScope.canvasLayerNameCollection = []; |
838 | 856 | $rootScope.canvasLayerNameCollection.push(layer.name); |
... | ... | @@ -849,12 +867,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
849 | 867 | // $("#canvas").removeLayer(layer.name).drawLayers(); |
850 | 868 | } |
851 | 869 | else { |
870 | + //jcanvas property | |
852 | 871 | layer.draggable = false; |
853 | 872 | } |
854 | 873 | |
855 | 874 | }, |
856 | 875 | mouseout: function (layer) { |
857 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
876 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
877 | + //jcanvas property | |
858 | 878 | layer.draggable = true; |
859 | 879 | $rootScope.canvasLayerNameCollection = []; |
860 | 880 | $(canvasId).setLayer(layer.name, { |
... | ... | @@ -870,12 +890,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
870 | 890 | }).drawLayers(); |
871 | 891 | } |
872 | 892 | else { |
893 | + //jcanvas property | |
873 | 894 | layer.draggable = false; |
874 | 895 | } |
875 | 896 | }, |
876 | 897 | mouseover: function (layer) { |
877 | 898 | |
878 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
899 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
900 | + //jcanvas property | |
879 | 901 | layer.draggable = true; |
880 | 902 | $(canvasId).setLayer(layer.name, { |
881 | 903 | handle: { |
... | ... | @@ -889,6 +911,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
889 | 911 | }).drawLayers(); |
890 | 912 | } |
891 | 913 | else { |
914 | + //jcanvas property | |
892 | 915 | layer.draggable = false; |
893 | 916 | } |
894 | 917 | } |
... | ... | @@ -924,7 +947,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
924 | 947 | x2: x, y2: y, |
925 | 948 | |
926 | 949 | click: function (layer) { |
927 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
950 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
951 | + //jcanvas property | |
928 | 952 | layer.draggable = true; |
929 | 953 | $rootScope.shapeTypePin = "Pin"; |
930 | 954 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -948,11 +972,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
948 | 972 | |
949 | 973 | } |
950 | 974 | else { |
975 | + //jcanvas property | |
951 | 976 | layer.draggable = false; |
952 | 977 | } |
953 | 978 | }, |
954 | 979 | mouseout: function (layer) { |
955 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
980 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
981 | + //jcanvas property | |
956 | 982 | layer.draggable = true; |
957 | 983 | $rootScope.canvasLayerNameCollection = []; |
958 | 984 | $(canvasId).setLayer(layer.name, { |
... | ... | @@ -968,12 +994,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
968 | 994 | }).drawLayers(); |
969 | 995 | } |
970 | 996 | else { |
997 | + //jcanvas property | |
971 | 998 | layer.draggable = false; |
972 | 999 | } |
973 | 1000 | }, |
974 | 1001 | mouseover: function (layer) { |
975 | 1002 | |
976 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1003 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1004 | + //jcanvas property | |
977 | 1005 | layer.draggable = true; |
978 | 1006 | $(canvasId).setLayer(layer.name, { |
979 | 1007 | handle: { |
... | ... | @@ -987,6 +1015,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
987 | 1015 | }).drawLayers(); |
988 | 1016 | } |
989 | 1017 | else { |
1018 | + //jcanvas property | |
990 | 1019 | layer.draggable = false; |
991 | 1020 | } |
992 | 1021 | } |
... | ... | @@ -1069,7 +1098,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1069 | 1098 | |
1070 | 1099 | }, |
1071 | 1100 | click: function (layer) { |
1072 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1101 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1102 | + //jcanvas property | |
1073 | 1103 | layer.draggable = true; |
1074 | 1104 | $rootScope.canvasLayerNameCollection = []; |
1075 | 1105 | $rootScope.canvasLayerNameCollection.push(layer.name); |
... | ... | @@ -1085,11 +1115,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1085 | 1115 | }).drawLayers(); |
1086 | 1116 | } |
1087 | 1117 | else { |
1118 | + //jcanvas property | |
1088 | 1119 | layer.draggable = false; |
1089 | 1120 | } |
1090 | 1121 | }, |
1091 | 1122 | dblclick: function (layer) { |
1092 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1123 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1124 | + //jcanvas property | |
1093 | 1125 | layer.draggable = true; |
1094 | 1126 | $rootScope.IsTextAlreadySave = false; |
1095 | 1127 | var RectNameArray = (layer.name).split("_"); |
... | ... | @@ -1125,11 +1157,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1125 | 1157 | $("#text-center").removeClass("ActiveFormattingButtonClass"); |
1126 | 1158 | } |
1127 | 1159 | else { |
1160 | + //jcanvas property | |
1128 | 1161 | layer.draggable = false; |
1129 | 1162 | } |
1130 | 1163 | }, |
1131 | 1164 | mouseout: function (layer) { |
1132 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1165 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1166 | + //jcanvas property | |
1133 | 1167 | layer.draggable = true; |
1134 | 1168 | $rootScope.canvasLayerNameCollection = []; |
1135 | 1169 | $('#canvas').setLayer(layer.name, { |
... | ... | @@ -1145,11 +1179,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1145 | 1179 | }).drawLayers(); |
1146 | 1180 | } |
1147 | 1181 | else { |
1182 | + //jcanvas property | |
1148 | 1183 | layer.draggable = false; |
1149 | 1184 | } |
1150 | 1185 | }, |
1151 | 1186 | mouseover: function (layer) { |
1152 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1187 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1188 | + //jcanvas property | |
1153 | 1189 | layer.draggable = true; |
1154 | 1190 | $('#canvas').setLayer(layer.name, { |
1155 | 1191 | handle: { |
... | ... | @@ -1164,6 +1200,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1164 | 1200 | |
1165 | 1201 | } |
1166 | 1202 | else { |
1203 | + //jcanvas property | |
1167 | 1204 | layer.draggable = false; |
1168 | 1205 | } |
1169 | 1206 | } |
... | ... | @@ -1287,32 +1324,32 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1287 | 1324 | PaintCanvasctx.beginPath(); |
1288 | 1325 | break; |
1289 | 1326 | case "Line": |
1290 | - $rootScope.isAnnotaionToolBarDrawingModeActive = false; | |
1327 | + $rootScope.isAnnotaionToolBarDrawingModeActive = true; | |
1291 | 1328 | $rootScope.LineNumber = $rootScope.ObjectIndex++; |
1292 | 1329 | // $rootScope.isLinePreviewCompleted = true; |
1293 | 1330 | $rootScope.DrawLineOnModuleItem('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y) |
1294 | 1331 | break; |
1295 | 1332 | case "Rectangle": |
1296 | - $rootScope.isAnnotaionToolBarDrawingModeActive = false; | |
1333 | + $rootScope.isAnnotaionToolBarDrawingModeActive = true; | |
1297 | 1334 | $rootScope.rectNumber = $rootScope.ObjectIndex++; |
1298 | 1335 | // $rootScope.isRectanglePreviewCompleted = true; |
1299 | 1336 | $rootScope.DrawRectangleOnModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); |
1300 | 1337 | |
1301 | 1338 | break; |
1302 | 1339 | case "Circle": |
1303 | - $rootScope.isAnnotaionToolBarDrawingModeActive = false; | |
1340 | + $rootScope.isAnnotaionToolBarDrawingModeActive = true; | |
1304 | 1341 | $rootScope.CircleNumber = $rootScope.ObjectIndex++; |
1305 | 1342 | // $rootScope.isCirclePreviewCompleted = true; |
1306 | 1343 | $rootScope.DrawCircleOnModuleItem('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); |
1307 | 1344 | break; |
1308 | 1345 | case "Arrow": |
1309 | - $rootScope.isAnnotaionToolBarDrawingModeActive = false; | |
1346 | + $rootScope.isAnnotaionToolBarDrawingModeActive = true; | |
1310 | 1347 | $rootScope.ArrowNumber = $rootScope.ObjectIndex++; |
1311 | 1348 | //$rootScope.isArrowPreviewCompleted = true; |
1312 | 1349 | $rootScope.DrawArrowOnModuleItem('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); |
1313 | 1350 | break; |
1314 | 1351 | case "Pin": |
1315 | - $rootScope.isAnnotaionToolBarDrawingModeActive = false; | |
1352 | + $rootScope.isAnnotaionToolBarDrawingModeActive = true; | |
1316 | 1353 | $rootScope.PinNumber = $rootScope.PinObjectIndex++; |
1317 | 1354 | $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++; |
1318 | 1355 | |
... | ... | @@ -1321,7 +1358,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1321 | 1358 | $rootScope.DrawPinOnModuleItem('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber); |
1322 | 1359 | break; |
1323 | 1360 | case "TextArea": |
1324 | - $rootScope.isAnnotaionToolBarDrawingModeActive = false; | |
1361 | + $rootScope.isAnnotaionToolBarDrawingModeActive = true; | |
1325 | 1362 | $rootScope.IsTextAlreadySave = false; |
1326 | 1363 | $("#text_area").val(''); |
1327 | 1364 | // Draw text |
... | ... | @@ -1468,12 +1505,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1468 | 1505 | height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, |
1469 | 1506 | resizeFromCenter: false, |
1470 | 1507 | click: function (layer) { |
1471 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1508 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1509 | + //jcanvas property | |
1472 | 1510 | layer.draggable = true; |
1473 | 1511 | $rootScope.shapeTypeText = "textAreaRect"; |
1474 | 1512 | |
1475 | - var layerNameSplit = layer.name; | |
1476 | - var splitedName = layerNameSplit.split("_"); | |
1513 | + var layerName = layer.name; | |
1514 | + var splitedName = layerName.split("_"); | |
1477 | 1515 | var textValName = "TextAreaNew_"; |
1478 | 1516 | var concatinateResult = textValName.concat(splitedName[1]); |
1479 | 1517 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -1490,11 +1528,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1490 | 1528 | }).drawLayers(); |
1491 | 1529 | } |
1492 | 1530 | else { |
1531 | + //jcanvas property | |
1493 | 1532 | layer.draggable = false; |
1494 | 1533 | } |
1495 | 1534 | }, |
1496 | 1535 | dblclick: function (layer) { |
1497 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1536 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1537 | + //jcanvas property | |
1498 | 1538 | layer.draggable = true; |
1499 | 1539 | $rootScope.isTextAreaClosedButtonActive = false; |
1500 | 1540 | $rootScope.IsTextAlreadySave = true; |
... | ... | @@ -1629,12 +1669,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1629 | 1669 | // $("#selected-font-size").val(CurrentFontSize); |
1630 | 1670 | } |
1631 | 1671 | else { |
1672 | + //jcanvas property | |
1632 | 1673 | layer.draggable = false; |
1633 | 1674 | } |
1634 | 1675 | |
1635 | 1676 | }, |
1636 | 1677 | mouseout: function (layer) { |
1637 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1678 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1679 | + //jcanvas property | |
1638 | 1680 | layer.draggable = true; |
1639 | 1681 | $rootScope.canvasLayerNameCollection = []; |
1640 | 1682 | $('#canvas').setLayer(layer.name, { |
... | ... | @@ -1649,11 +1691,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1649 | 1691 | }).drawLayers(); |
1650 | 1692 | } |
1651 | 1693 | else { |
1694 | + //jcanvas property | |
1652 | 1695 | layer.draggable = false; |
1653 | 1696 | } |
1654 | 1697 | }, |
1655 | 1698 | mouseover: function (layer) { |
1656 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1699 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1700 | + //jcanvas property | |
1657 | 1701 | layer.draggable = true; |
1658 | 1702 | $('#canvas').setLayer(layer.name, { |
1659 | 1703 | handle: { |
... | ... | @@ -1667,6 +1711,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1667 | 1711 | }).drawLayers(); |
1668 | 1712 | } |
1669 | 1713 | else { |
1714 | + //jcanvas property | |
1670 | 1715 | layer.draggable = false; |
1671 | 1716 | } |
1672 | 1717 | } |
... | ... | @@ -1757,11 +1802,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1757 | 1802 | height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, |
1758 | 1803 | resizeFromCenter: false, |
1759 | 1804 | click: function (layer) { |
1760 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1805 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1806 | + //jcanvas property | |
1761 | 1807 | layer.draggable = true; |
1762 | 1808 | $rootScope.shapeTypeText = "textAreaRect"; |
1763 | - var layerNameSplit = layer.name; | |
1764 | - var splitedName = layerNameSplit.split("_"); | |
1809 | + var layerName = layer.name; | |
1810 | + var splitedName = layerName.split("_"); | |
1765 | 1811 | var textValName = "TextAreaAfterEdit_"; |
1766 | 1812 | var concatinateResult = textValName.concat(splitedName[1]); |
1767 | 1813 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -1779,13 +1825,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1779 | 1825 | }).drawLayers(); |
1780 | 1826 | } |
1781 | 1827 | else { |
1828 | + //jcanvas property | |
1782 | 1829 | layer.draggable = false; |
1783 | 1830 | } |
1784 | 1831 | |
1785 | 1832 | }, |
1786 | 1833 | dblclick: function (layer) { |
1787 | 1834 | |
1788 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1835 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1836 | + //jcanvas property | |
1789 | 1837 | layer.draggable = true; |
1790 | 1838 | $rootScope.isTextAreaClosedButtonActive = false; |
1791 | 1839 | $rootScope.IsTextAlreadySave = true; |
... | ... | @@ -1874,11 +1922,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1874 | 1922 | $("#annotationTextModal").modal("toggle"); |
1875 | 1923 | } |
1876 | 1924 | else { |
1925 | + //jcanvas property | |
1877 | 1926 | layer.draggable = false; |
1878 | 1927 | } |
1879 | 1928 | }, |
1880 | 1929 | mouseout: function (layer) { |
1881 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1930 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1931 | + //jcanvas property | |
1882 | 1932 | layer.draggable = true; |
1883 | 1933 | $rootScope.canvasLayerNameCollection = []; |
1884 | 1934 | $('#canvas').setLayer(layer.name, { |
... | ... | @@ -1893,11 +1943,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1893 | 1943 | }).drawLayers(); |
1894 | 1944 | } |
1895 | 1945 | else { |
1946 | + //jcanvas property | |
1896 | 1947 | layer.draggable = false; |
1897 | 1948 | } |
1898 | 1949 | }, |
1899 | 1950 | mouseover: function (layer) { |
1900 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1951 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1952 | + //jcanvas property | |
1901 | 1953 | layer.draggable = true; |
1902 | 1954 | $('#canvas').setLayer(layer.name, { |
1903 | 1955 | handle: { |
... | ... | @@ -1913,6 +1965,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1913 | 1965 | } |
1914 | 1966 | |
1915 | 1967 | else { |
1968 | + //jcanvas property | |
1916 | 1969 | layer.draggable = false; |
1917 | 1970 | } |
1918 | 1971 | } |
... | ... | @@ -1923,7 +1976,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1923 | 1976 | } |
1924 | 1977 | //---- |
1925 | 1978 | |
1926 | - $rootScope.BindCanvasDrawingListners = function (event) { | |
1979 | + $rootScope.onDrawingCanvasClick = function (event) { | |
1927 | 1980 | |
1928 | 1981 | $rootScope.clicked = true; |
1929 | 1982 | // OnPaintCanvasMouseDown(event); |
... | ... | @@ -1936,9 +1989,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
1936 | 1989 | // alert("doclick"); |
1937 | 1990 | // annotation history |
1938 | 1991 | if (event != undefined) { |
1939 | - if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { | |
1992 | + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) { | |
1940 | 1993 | |
1941 | - $rootScope.DrawingListners_Canvas(event); | |
1994 | + $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(event); | |
1942 | 1995 | |
1943 | 1996 | } |
1944 | 1997 | } |
... | ... | @@ -2322,7 +2375,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
2322 | 2375 | //if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { |
2323 | 2376 | |
2324 | 2377 | // alert($rootScope.isAnnotaionToolBarDrawingModeActive); |
2325 | - // $rootScope.DrawingListners_Canvas(e); | |
2378 | + // $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(e); | |
2326 | 2379 | |
2327 | 2380 | //} |
2328 | 2381 | //else { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -328,7 +328,7 @@ |
328 | 328 | <div class="row"> |
329 | 329 | <div id="canvasDiv" class="col-sm-12 img-thumbnail" align="center"> |
330 | 330 | <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas> |
331 | - <canvas id="canvas" ng-click="BindCanvasDrawingListners($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas> | |
331 | + <canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas> | |
332 | 332 | </div> |
333 | 333 | <!--<div id="canvasDiv" style=" width: 95% !important;top:0px;overflow:scroll;background-color:white;">--> |
334 | 334 | <!--<div id="daLoaderLabel">Loading....</div>--> | ... | ... |