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