Commit c15dd72debe06088ad21adf7a8be6a9c3b8d2eea

Authored by unknown
1 parent 6d6934c4

Commit Changes For History Code

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -776,15 +776,27 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
776 776 $('#spinner').css('visibility', 'visible');
777 777 $scope.modestyImageInfo = [];
778 778 // annotation toolbar canvas
779   - if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) {
780 779  
781   - 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>');
782   - $compile($layerChange)($scope);
  780 + //history code
  781 +
  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);
783 785 $scope.BindCanvasDrawingListners();
784 786 // $rootScope.FreeStylePaint();
785 787  
786 788 }
787 789  
  790 + //duplicate code
  791 + //if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) {
  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>');
  794 + // $compile($layerChange)($scope);
  795 + // $scope.BindCanvasDrawingListners();
  796 + // // $rootScope.FreeStylePaint();
  797 +
  798 + //}
  799 +
788 800  
789 801  
790 802 $scope.terminateCurrentlyRunningWPs();
... ... @@ -2986,6 +2998,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
2986 2998  
2987 2999 //$(".com").css("display", "none");
2988 3000 //$("#bord").css({ "width": "0px", "display": "none" });
  3001 +
  3002 + //history maintained issue
  3003 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
  3004 + $("#sppeachBubble").remove();
  3005 + $("#dot").remove();
  3006 + }
  3007 +
  3008 +
  3009 +
2989 3010 $(".com").remove();
2990 3011 $("#bord").remove();
2991 3012  
... ... @@ -3088,6 +3109,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3088 3109 document.getElementById('sppeachBubble').style.left = (Globe[0].currentX) + 'px';
3089 3110 document.getElementById('sppeachBubble').style.top = (Globe[0].currentY) + 'px';
3090 3111  
  3112 +
  3113 + //history maintained issue
  3114 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) { document.getElementById('sppeachBubble').style.zIndex = "100000000000"; }
  3115 +
  3116 +
  3117 +
3091 3118 $('#sppeachBubble').draggable(
3092 3119 {
3093 3120 drag: function (evt) {
... ... @@ -4645,6 +4672,114 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4645 4672 //}
4646 4673 }
4647 4674  
  4675 + // History Maintained Issue//
  4676 +
  4677 + $rootScope.DrawingListners_Canvas = function (event) {
  4678 +
  4679 +
  4680 + var canvasDiv = document.getElementById('canvasDiv');
  4681 + var verticalScrollPosition = canvasDiv.scrollTop;
  4682 + var horizontlScrollPosition = canvasDiv.scrollLeft;
  4683 +
  4684 +
  4685 + $rootScope.Xaxis = event.pageX - $('#canvasDiv').offset().left + horizontlScrollPosition;
  4686 + $rootScope.Yaxis = event.pageY - $('#canvasDiv').offset().top + verticalScrollPosition;
  4687 +
  4688 +
  4689 + $rootScope.getBodyRegionID();
  4690 +
  4691 + if ($rootScope.MaskedCanvasMrImageForAnotation == "No") {
  4692 + var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_mci";
  4693 + var maskCanvas = document.getElementById(maskCanvasIdForAnnotation);
  4694 + var maskCanvasContext = maskCanvas.getContext("2d");
  4695 + var canvasDiv = document.getElementById('canvasDiv');
  4696 + var verticalScrollPosition = canvasDiv.scrollTop;
  4697 + var horizontlScrollPosition = canvasDiv.scrollLeft;
  4698 + var actulalX = $rootScope.Xaxis;
  4699 + var actualY = $rootScope.Yaxis;
  4700 + var RGBColor = $scope.GetRGBColor(maskCanvasContext, actulalX, actualY, $rootScope.MaskedCanvasXForAnotation, $rootScope.MaskedCanvasYForAnotation);
  4701 + var annotationText = $scope.GetAnnotationText(parseInt(RGBColor));
  4702 +
  4703 + }
  4704 + else {
  4705 +
  4706 + var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_MR_mci";
  4707 + var maskoffsetval = $('#' + maskCanvasIdForAnnotation).offset();
  4708 + var mirrorCanvasX = maskoffsetval.left;
  4709 + //alert(mirrorCanvasX);
  4710 + var mirrorImageCanvas = document.getElementById(maskCanvasIdForAnnotation);
  4711 + var mirrorCanvasWidth = mirrorImageCanvas.clientWidth;
  4712 + // alert(mirrorCanvasWidth);
  4713 + var maskCanvas = document.getElementById(maskCanvasIdForAnnotation);
  4714 + var maskCanvasContext = maskCanvas.getContext("2d");
  4715 +
  4716 + var distanceXOnMirrorImage = (parseInt(mirrorCanvasX) + parseInt(mirrorCanvasWidth)) - (parseInt(event.pageX) + horizontlScrollPosition);// - 135);
  4717 + var mirrorXOnNormalImage = parseInt(maskCanvasContext.canvas.offsetLeft) + parseInt(distanceXOnMirrorImage);
  4718 + var actulalX = mirrorXOnNormalImage;
  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);
  4721 + pixelData.data[0] = pixelData.data[0] - 9;
  4722 + pixelData.data[1] = pixelData.data[1] - 9;
  4723 + pixelData.data[2] = pixelData.data[2] - 9
  4724 + var Red;
  4725 + var Green;
  4726 + var Blue;
  4727 + var zero = "0";
  4728 + if ((pixelData.data[0]).toString().length != 2) {
  4729 + Red = zero.concat((pixelData.data[0]).toString())
  4730 + }
  4731 + else {
  4732 + Red = (pixelData.data[0]).toString()
  4733 + }
  4734 + if ((pixelData.data[1]).toString().length != 2) {
  4735 + Green = zero.concat((pixelData.data[1]).toString())
  4736 + }
  4737 + else {
  4738 + Green = (pixelData.data[1]).toString()
  4739 + }
  4740 + if ((pixelData.data[2]).toString().length != 2) {
  4741 + Blue = zero.concat((pixelData.data[2]).toString())
  4742 + }
  4743 + else {
  4744 + Blue = (pixelData.data[2]).toString()
  4745 + }
  4746 + var RGBColor = (Red + Green + Blue);
  4747 + // alert(RGBColor);
  4748 + //$rootScope.previousHighlightList.push(RGBColor);
  4749 +
  4750 + }
  4751 +
  4752 + // var maskCanvasIdForAnnotation = "imageCanvas" + $rootScope.MaskedCanvasIDForAnnotation + "_mci";
  4753 +
  4754 + // alert(annotationText);
  4755 + $scope.MultiLanguageAnnationArray = [];
  4756 + $scope.MultiLanguageAnnationArray.push(annotationText);
  4757 + if (annotationText == "undefined") {
  4758 + }
  4759 + else {
  4760 + $scope.createDynamicSpeechBubble(event, event.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, event.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true)
  4761 + }
  4762 +
  4763 +
  4764 + }
  4765 +
  4766 +
  4767 + $rootScope.getBodyRegionID = function () {
  4768 + var BodyRegionDictionary = $rootScope.BodyRegionCordinatesData;
  4769 +
  4770 + $.each(BodyRegionDictionary, function (index, value) {
  4771 + var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
  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) {
  4774 + $rootScope.MaskedCanvasIDForAnnotation = value.bodyRegionId;
  4775 + $rootScope.MaskedCanvasXForAnotation = value.X;
  4776 + $rootScope.MaskedCanvasYForAnotation = value.Y;
  4777 + $rootScope.MaskedCanvasMrImageForAnotation = value.IsMirror;
  4778 + return false;
  4779 + }
  4780 + });
  4781 + }
  4782 +
4648 4783  
4649 4784  
4650 4785 function resizeCanvas() {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -198,8 +198,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
198 198 $rootScope.isAnnotationWindowOpen = true;
199 199 $(".annotationTollbar").css("display", "block");
200 200 $rootScope.$broadcast('annotationToolEvent', true);
201   - $("#canvasPaint").css("display", "none");
202   - $("#canvas").css("display", "none");
  201 + // $("#canvasPaint").css("display", "none");
  202 + // $("#canvas").css("display", "none");
203 203  
204 204 var FontFamilyJson = '~/../content/data/json/settings/fontstyle.json';
205 205 if ($rootScope.isFontFamilyLoaded == false) {
... ... @@ -240,10 +240,11 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
240 240  
241 241 $(".annotationTollbar").css("display", "none");
242 242 $rootScope.isAnnotationWindowClose = true;
243   - $("#canvasPaint").css("display", "none");
244   - $("#canvas").css("display", "none");
  243 + // $("#canvasPaint").css("display", "none");
  244 + // $("#canvas").css("display", "none");
245 245 $('.btnCursor').removeClass('activebtncolor');
246 246 $(".btn-annotation").removeClass("activebtncolor");
  247 + $rootScope.isAnnotaionToolBarDrawingModeActive = true;
247 248 }
248 249 $rootScope.CIAnotationIdentifyModeOff = false;
249 250 $rootScope.OnIdentifyClick = function () {
... ... @@ -257,25 +258,31 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
257 258 $('.btnCursor').removeClass('activebtncolor');
258 259  
259 260 } else {
260   - $("#canvasPaint").css("display", "none");
261   - $("#canvas").css("display", "none");
  261 + // $("#canvasPaint").css("display", "none");
  262 + // $("#canvas").css("display", "none");
262 263  
263 264 // $("#canvasPaint").css("z-index", "0");
264 265 // $("#canvas").css("z-index", "0");
265 266 $('.btnCursor').removeClass('activebtncolor');
266 267  
267 268 }
  269 +
  270 + $rootScope.isAnnotaionToolBarDrawingModeActive = true;
  271 + $rootScope.switchCanvas();
268 272 }
269 273  
270 274  
271 275  
272 276 $rootScope.DrawingMode = function () {
  277 + //Annotation History
  278 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
273 279 $("#OnIdentify").removeClass("annotationtoolbartab");
274 280 $("#DrawMode").addClass("annotationtoolbartab");
275 281 $('.btnCursor').addClass('activebtncolor');
276 282 $rootScope.switchCanvas();
277   - $("#canvasPaint").css("display", "block");
278   - $("#canvas").css("display", "block");
  283 +
  284 + // $("#canvasPaint").css("display", "block");
  285 + // $("#canvas").css("display", "block");
279 286  
280 287 }
281 288  
... ... @@ -345,6 +352,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
345 352 }
346 353  
347 354 $rootScope.paintBrush = function () {
  355 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
348 356 if ($rootScope.disableAnnotationtoolOnListManager == true) {
349 357 $rootScope.switchCanvas();
350 358 var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x
... ... @@ -361,7 +369,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
361 369 }
362 370  
363 371 } else {
364   - // debugger;
  372 +
365 373 // $('.btnCursor').addClass('activebtncolor');
366 374 $rootScope.setListManagerZindex = true;
367 375 $("#canvasPaint").css("display", "block");
... ... @@ -456,6 +464,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
456 464 $('#canvas').css("z-index", y);
457 465 }
458 466 $rootScope.EraseDrawing = function () {
  467 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
459 468 $rootScope.switchCanvas();
460 469 $rootScope.isEraseToolSelected = true;
461 470 //$rootScope.switchCanvasToPaintCanvas();
... ... @@ -563,47 +572,62 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
563 572 x2: x, y2: y,
564 573  
565 574 click: function (layer) {
566   - $rootScope.canvasLayerNameCollection = [];
567   - $rootScope.canvasLayerNameCollection.push(layer.name);
568   - $(canvasId).setLayer(layer.name, {
569   - handle: {
570   - type: 'arc',
571   - fillStyle: '#fff',
572   - strokeStyle: '#c33',
573   - strokeWidth: 2,
574   - radius: 3
575   - }
576   - }).drawLayers();
577   -
578   -
  575 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  576 + layer.draggable = true;
  577 + $rootScope.canvasLayerNameCollection = [];
  578 + $rootScope.canvasLayerNameCollection.push(layer.name);
  579 + $(canvasId).setLayer(layer.name, {
  580 + handle: {
  581 + type: 'arc',
  582 + fillStyle: '#fff',
  583 + strokeStyle: '#c33',
  584 + strokeWidth: 2,
  585 + radius: 3
  586 + }
  587 + }).drawLayers();
  588 +
  589 + }
  590 + else {
  591 + layer.draggable = false;
  592 + }
579 593 },
580 594 mouseout: function (layer) {
581   - $rootScope.canvasLayerNameCollection = [];
582   - $(canvasId).setLayer(layer.name, {
583   - handle: {
584   - type: 'arc',
585   - fillStyle: '#fff',
586   - strokeStyle: '#c33',
587   - strokeWidth: 0,
588   - radius: 0
589   - }
590   -
591   - }).drawLayers();
592   -
  595 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  596 + layer.draggable = true;
  597 + $rootScope.canvasLayerNameCollection = [];
  598 + $(canvasId).setLayer(layer.name, {
  599 + handle: {
  600 + type: 'arc',
  601 + fillStyle: '#fff',
  602 + strokeStyle: '#c33',
  603 + strokeWidth: 0,
  604 + radius: 0
  605 + }
  606 +
  607 + }).drawLayers();
  608 + }
  609 + else {
  610 + layer.draggable = false;
  611 + }
593 612 },
594 613 mouseover: function (layer) {
595 614  
596   -
597   - $(canvasId).setLayer(layer.name, {
598   - handle: {
599   - type: 'arc',
600   - fillStyle: '#fff',
601   - strokeStyle: '#c33',
602   - strokeWidth: 2,
603   - radius: 3
604   - }
605   - }).drawLayers();
606   -
  615 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  616 + layer.draggable = true;
  617 +
  618 + $(canvasId).setLayer(layer.name, {
  619 + handle: {
  620 + type: 'arc',
  621 + fillStyle: '#fff',
  622 + strokeStyle: '#c33',
  623 + strokeWidth: 2,
  624 + radius: 3
  625 + }
  626 + }).drawLayers();
  627 + }
  628 + else {
  629 + layer.draggable = false;
  630 + }
607 631 }
608 632  
609 633 }).drawLayers();
... ... @@ -639,7 +663,9 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
639 663  
640 664 },
641 665  
642   - click: function (layer) {
  666 + click: function (layer) {
  667 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  668 + layer.draggable = true;
643 669 $rootScope.canvasLayerNameCollection = [];
644 670 $rootScope.canvasLayerNameCollection.push(layer.name);
645 671 $(canvasId).setLayer(layer.name, {
... ... @@ -652,9 +678,14 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
652 678 cornerRadius: 3
653 679 }
654 680 }).drawLayers();
655   -
  681 + }
  682 + else {
  683 + layer.draggable = false;
  684 + }
656 685 },
657   - mouseout: function (layer) {
  686 + mouseout: function (layer) {
  687 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  688 + layer.draggable = true;
658 689 $rootScope.canvasLayerNameCollection = [];
659 690 $(canvasId).setLayer(layer.name, {
660 691 handle: {
... ... @@ -667,22 +698,29 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
667 698 }
668 699  
669 700 }).drawLayers();
670   -
  701 + }
  702 + else {
  703 + layer.draggable = false;
  704 + }
671 705 },
672 706 mouseover: function (layer) {
673   -
674   -
675   - $(canvasId).setLayer(layer.name, {
676   - handle: {
677   - type: 'rectangle',
678   - fillStyle: '#fff',
679   - strokeStyle: '#c33',
680   - strokeWidth: 2,
681   - width: 5, height: 5,
682   - cornerRadius: 3
683   - }
684   - }).drawLayers();
685   -
  707 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  708 + layer.draggable = true;
  709 +
  710 + $(canvasId).setLayer(layer.name, {
  711 + handle: {
  712 + type: 'rectangle',
  713 + fillStyle: '#fff',
  714 + strokeStyle: '#c33',
  715 + strokeWidth: 2,
  716 + width: 5, height: 5,
  717 + cornerRadius: 3
  718 + }
  719 + }).drawLayers();
  720 + }
  721 + else {
  722 + layer.draggable = false;
  723 + }
686 724 }
687 725 }).drawLayers();
688 726 }
... ... @@ -712,49 +750,63 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
712 750 resizeFromCenter: false,
713 751 handlePlacement: 'both',
714 752 click: function (layer) {
715   - $rootScope.canvasLayerNameCollection = [];
716   - $rootScope.canvasLayerNameCollection.push(layer.name);
717   - $(canvasId).setLayer(layer.name, {
718   - handle: {
719   - type: 'arc',
720   - fillStyle: '#fff',
721   - strokeStyle: '#c33',
722   - strokeWidth: 2,
723   - radius: 3
724   - }
725   - }).drawLayers();
726   -
  753 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  754 + layer.draggable = true;
  755 + $rootScope.canvasLayerNameCollection = [];
  756 + $rootScope.canvasLayerNameCollection.push(layer.name);
  757 + $(canvasId).setLayer(layer.name, {
  758 + handle: {
  759 + type: 'arc',
  760 + fillStyle: '#fff',
  761 + strokeStyle: '#c33',
  762 + strokeWidth: 2,
  763 + radius: 3
  764 + }
  765 + }).drawLayers();
  766 + }
  767 + else {
  768 + layer.draggable = false;
  769 + }
727 770 },
728 771 mouseout: function (layer) {
729   - $rootScope.canvasLayerNameCollection = [];
730   -
731   - $(canvasId).setLayer(layer.name, {
732   - handle: {
733   - type: 'arc',
734   - fillStyle: '#fff',
735   - strokeStyle: '#c33',
736   - strokeWidth: 0,
737   - // width: 0, height: 0,
738   - radius: 0
739   - }
740   -
741   - }).drawLayers();
742   -
  772 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  773 + layer.draggable = true;
  774 + $rootScope.canvasLayerNameCollection = [];
  775 +
  776 + $(canvasId).setLayer(layer.name, {
  777 + handle: {
  778 + type: 'arc',
  779 + fillStyle: '#fff',
  780 + strokeStyle: '#c33',
  781 + strokeWidth: 0,
  782 + // width: 0, height: 0,
  783 + radius: 0
  784 + }
  785 +
  786 + }).drawLayers();
  787 + }
  788 + else {
  789 + layer.draggable = false;
  790 + }
743 791 },
744 792 mouseover: function (layer) {
745   -
746   -
747   - $(canvasId).setLayer(layer.name, {
748   - handle: {
749   - type: 'arc',
750   - fillStyle: '#fff',
751   - strokeStyle: '#c33',
752   - strokeWidth: 2,
753   - // width: 5, height: 5,
754   - radius: 3
755   - }
756   - }).drawLayers();
757   -
  793 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  794 + layer.draggable = true;
  795 +
  796 + $(canvasId).setLayer(layer.name, {
  797 + handle: {
  798 + type: 'arc',
  799 + fillStyle: '#fff',
  800 + strokeStyle: '#c33',
  801 + strokeWidth: 2,
  802 + // width: 5, height: 5,
  803 + radius: 3
  804 + }
  805 + }).drawLayers();
  806 + }
  807 + else {
  808 + layer.draggable = false;
  809 + }
758 810 }
759 811 }).drawLayers();
760 812 }
... ... @@ -780,50 +832,65 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
780 832 x2: x, y2: y,
781 833  
782 834 click: function (layer) {
783   - $rootScope.canvasLayerNameCollection = [];
784   - $rootScope.canvasLayerNameCollection.push(layer.name);
785   - $(canvasId).setLayer(layer.name, {
786   - handle: {
787   - type: 'arc',
788   - fillStyle: '#fff',
789   - strokeStyle: '#c33',
790   - strokeWidth: 2,
791   - // width: 5, height: 5,
792   - radius: 3
793   - }
794   - }).drawLayers();
795   - // $("#canvas").removeLayer(layer.name).drawLayers();
  835 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  836 + layer.draggable = true;
  837 + $rootScope.canvasLayerNameCollection = [];
  838 + $rootScope.canvasLayerNameCollection.push(layer.name);
  839 + $(canvasId).setLayer(layer.name, {
  840 + handle: {
  841 + type: 'arc',
  842 + fillStyle: '#fff',
  843 + strokeStyle: '#c33',
  844 + strokeWidth: 2,
  845 + // width: 5, height: 5,
  846 + radius: 3
  847 + }
  848 + }).drawLayers();
  849 + // $("#canvas").removeLayer(layer.name).drawLayers();
  850 + }
  851 + else {
  852 + layer.draggable = false;
  853 + }
796 854  
797 855 },
798 856 mouseout: function (layer) {
799   - $rootScope.canvasLayerNameCollection = [];
800   - $(canvasId).setLayer(layer.name, {
801   - handle: {
802   - type: 'arc',
803   - fillStyle: '#fff',
804   - strokeStyle: '#c33',
805   - strokeWidth: 0,
806   - // width: 0, height: 0,
807   - radius: 0
808   - }
809   -
810   - }).drawLayers();
811   -
  857 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  858 + layer.draggable = true;
  859 + $rootScope.canvasLayerNameCollection = [];
  860 + $(canvasId).setLayer(layer.name, {
  861 + handle: {
  862 + type: 'arc',
  863 + fillStyle: '#fff',
  864 + strokeStyle: '#c33',
  865 + strokeWidth: 0,
  866 + // width: 0, height: 0,
  867 + radius: 0
  868 + }
  869 +
  870 + }).drawLayers();
  871 + }
  872 + else {
  873 + layer.draggable = false;
  874 + }
812 875 },
813 876 mouseover: function (layer) {
814 877  
815   -
816   - $(canvasId).setLayer(layer.name, {
817   - handle: {
818   - type: 'arc',
819   - fillStyle: '#fff',
820   - strokeStyle: '#c33',
821   - strokeWidth: 2,
822   - // width: 5, height: 5,
823   - radius: 3
824   - }
825   - }).drawLayers();
826   -
  878 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  879 + layer.draggable = true;
  880 + $(canvasId).setLayer(layer.name, {
  881 + handle: {
  882 + type: 'arc',
  883 + fillStyle: '#fff',
  884 + strokeStyle: '#c33',
  885 + strokeWidth: 2,
  886 + // width: 5, height: 5,
  887 + radius: 3
  888 + }
  889 + }).drawLayers();
  890 + }
  891 + else {
  892 + layer.draggable = false;
  893 + }
827 894 }
828 895  
829 896 });
... ... @@ -857,59 +924,71 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
857 924 x2: x, y2: y,
858 925  
859 926 click: function (layer) {
860   -
861   - $rootScope.shapeTypePin = "Pin";
862   - $rootScope.canvasLayerNameCollection = [];
863   - var pinLine_layer = layer.name;
864   - var pinLine_layer_split = pinLine_layer.split("_");
865   - var pinArcName = "ArcPin_";
866   - var pinResult = pinArcName.concat(pinLine_layer_split[1]);
867   -
868   - $rootScope.canvasLayerNameCollection.push({ pinName: layer.name, ArcName: pinResult });
869   -
870   - $(canvasId).setLayer(layer.name, {
871   - handle: {
872   - type: 'arc',
873   - fillStyle: '#fff',
874   - strokeStyle: '#c33',
875   - strokeWidth: 2,
876   - // width: 5, height: 5,
877   - radius: 3
878   - }
879   - }).drawLayers();
880   -
881   -
  927 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  928 + layer.draggable = true;
  929 + $rootScope.shapeTypePin = "Pin";
  930 + $rootScope.canvasLayerNameCollection = [];
  931 + var pinLine_layer = layer.name;
  932 + var pinLine_layer_split = pinLine_layer.split("_");
  933 + var pinArcName = "ArcPin_";
  934 + var pinResult = pinArcName.concat(pinLine_layer_split[1]);
  935 +
  936 + $rootScope.canvasLayerNameCollection.push({ pinName: layer.name, ArcName: pinResult });
  937 +
  938 + $(canvasId).setLayer(layer.name, {
  939 + handle: {
  940 + type: 'arc',
  941 + fillStyle: '#fff',
  942 + strokeStyle: '#c33',
  943 + strokeWidth: 2,
  944 + // width: 5, height: 5,
  945 + radius: 3
  946 + }
  947 + }).drawLayers();
  948 +
  949 + }
  950 + else {
  951 + layer.draggable = false;
  952 + }
882 953 },
883 954 mouseout: function (layer) {
884   -
885   - $rootScope.canvasLayerNameCollection = [];
886   - $(canvasId).setLayer(layer.name, {
887   - handle: {
888   - type: 'arc',
889   - fillStyle: '#fff',
890   - strokeStyle: '#c33',
891   - strokeWidth: 0,
892   - // width: 0, height: 0,
893   - radius: 0
894   - }
895   -
896   - }).drawLayers();
897   -
  955 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  956 + layer.draggable = true;
  957 + $rootScope.canvasLayerNameCollection = [];
  958 + $(canvasId).setLayer(layer.name, {
  959 + handle: {
  960 + type: 'arc',
  961 + fillStyle: '#fff',
  962 + strokeStyle: '#c33',
  963 + strokeWidth: 0,
  964 + // width: 0, height: 0,
  965 + radius: 0
  966 + }
  967 +
  968 + }).drawLayers();
  969 + }
  970 + else {
  971 + layer.draggable = false;
  972 + }
898 973 },
899 974 mouseover: function (layer) {
900 975  
901   -
902   - $(canvasId).setLayer(layer.name, {
903   - handle: {
904   - type: 'arc',
905   - fillStyle: '#fff',
906   - strokeStyle: '#c33',
907   - strokeWidth: 2,
908   - // width: 5, height: 5,
909   - radius: 3
910   - }
911   - }).drawLayers();
912   -
  976 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  977 + layer.draggable = true;
  978 + $(canvasId).setLayer(layer.name, {
  979 + handle: {
  980 + type: 'arc',
  981 + fillStyle: '#fff',
  982 + strokeStyle: '#c33',
  983 + strokeWidth: 2,
  984 + // width: 5, height: 5,
  985 + radius: 3
  986 + }
  987 + }).drawLayers();
  988 + }
  989 + else {
  990 + layer.draggable = false;
  991 + }
913 992 }
914 993 }).drawArc({
915 994 draggable: true,
... ... @@ -990,85 +1069,103 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
990 1069  
991 1070 },
992 1071 click: function (layer) {
993   -
994   - $rootScope.canvasLayerNameCollection = [];
995   - $rootScope.canvasLayerNameCollection.push(layer.name);
996   - $('#canvas').setLayer(layer.name, {
997   - handle: {
998   - type: 'rectangle',
999   - fillStyle: '#fff',
1000   - strokeStyle: '#c33',
1001   - strokeWidth: 2,
1002   - width: 5, height: 5,
1003   - cornerRadius: 3
1004   - }
1005   - }).drawLayers();
1006   -
  1072 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1073 + layer.draggable = true;
  1074 + $rootScope.canvasLayerNameCollection = [];
  1075 + $rootScope.canvasLayerNameCollection.push(layer.name);
  1076 + $('#canvas').setLayer(layer.name, {
  1077 + handle: {
  1078 + type: 'rectangle',
  1079 + fillStyle: '#fff',
  1080 + strokeStyle: '#c33',
  1081 + strokeWidth: 2,
  1082 + width: 5, height: 5,
  1083 + cornerRadius: 3
  1084 + }
  1085 + }).drawLayers();
  1086 + }
  1087 + else {
  1088 + layer.draggable = false;
  1089 + }
1007 1090 },
1008 1091 dblclick: function (layer) {
  1092 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1093 + layer.draggable = true;
  1094 + $rootScope.IsTextAlreadySave = false;
  1095 + var RectNameArray = (layer.name).split("_");
1009 1096  
1010   - $rootScope.IsTextAlreadySave = false;
1011   - var RectNameArray = (layer.name).split("_");
1012   -
1013   - var TextAreaRectangleName = "TextArea_";
1014   - var TextAreaRectNameConcat = TextAreaRectangleName.concat(RectNameArray[1]);
1015   - $rootScope.TextAreaRectID = layer.name;
1016   - $rootScope.TextID = TextAreaRectNameConcat;
1017   -
1018   - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
1019   - $("#annotationTextModal").css("padding-right", "0px");
1020   - document.getElementById('modelbackground').style.display = "block";
1021   - $("#annotationTextModal").modal("toggle");
  1097 + var TextAreaRectangleName = "TextArea_";
  1098 + var TextAreaRectNameConcat = TextAreaRectangleName.concat(RectNameArray[1]);
  1099 + $rootScope.TextAreaRectID = layer.name;
  1100 + $rootScope.TextID = TextAreaRectNameConcat;
1022 1101  
1023   - $("#text_area").val('');
1024   - $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
1025   - $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
1026   - // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
  1102 + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
  1103 + $("#annotationTextModal").css("padding-right", "0px");
  1104 + document.getElementById('modelbackground').style.display = "block";
  1105 + $("#annotationTextModal").modal("toggle");
1027 1106  
1028   - $("#selected-font-family option:eq(0)").prop('selected', true);
1029   - $("#selected-font-size option:eq(0)").prop('selected', true);
  1107 + $("#text_area").val('');
  1108 + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  1109 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
  1110 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
1030 1111  
1031   - $("#text-italic").removeClass("ActiveFormattingButtonClass");
  1112 + $("#selected-font-family option:eq(0)").prop('selected', true);
  1113 + $("#selected-font-size option:eq(0)").prop('selected', true);
1032 1114  
1033   - $("#text-bold").removeClass("ActiveFormattingButtonClass");
  1115 + $("#text-italic").removeClass("ActiveFormattingButtonClass");
1034 1116  
1035   - $("#text-underline").removeClass("ActiveFormattingButtonClass");
  1117 + $("#text-bold").removeClass("ActiveFormattingButtonClass");
1036 1118  
1037   - $("#text-left").removeClass("ActiveFormattingButtonClass");
  1119 + $("#text-underline").removeClass("ActiveFormattingButtonClass");
1038 1120  
1039   - $("#text-right").removeClass("ActiveFormattingButtonClass");
  1121 + $("#text-left").removeClass("ActiveFormattingButtonClass");
1040 1122  
1041   - $("#text-center").removeClass("ActiveFormattingButtonClass");
  1123 + $("#text-right").removeClass("ActiveFormattingButtonClass");
1042 1124  
  1125 + $("#text-center").removeClass("ActiveFormattingButtonClass");
  1126 + }
  1127 + else {
  1128 + layer.draggable = false;
  1129 + }
1043 1130 },
1044 1131 mouseout: function (layer) {
1045   - $rootScope.canvasLayerNameCollection = [];
1046   - $('#canvas').setLayer(layer.name, {
1047   - handle: {
1048   - type: 'rectangle',
1049   - fillStyle: 'pink',
1050   - strokeStyle: 'yellow',
1051   - strokeWidth: 0,
1052   - width: 0, height: 0,
1053   - cornerRadius: 0
1054   - }
1055   -
1056   - }).drawLayers();
1057   -
  1132 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1133 + layer.draggable = true;
  1134 + $rootScope.canvasLayerNameCollection = [];
  1135 + $('#canvas').setLayer(layer.name, {
  1136 + handle: {
  1137 + type: 'rectangle',
  1138 + fillStyle: 'pink',
  1139 + strokeStyle: 'yellow',
  1140 + strokeWidth: 0,
  1141 + width: 0, height: 0,
  1142 + cornerRadius: 0
  1143 + }
  1144 +
  1145 + }).drawLayers();
  1146 + }
  1147 + else {
  1148 + layer.draggable = false;
  1149 + }
1058 1150 },
1059 1151 mouseover: function (layer) {
  1152 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1153 + layer.draggable = true;
  1154 + $('#canvas').setLayer(layer.name, {
  1155 + handle: {
  1156 + type: 'rectangle',
  1157 + fillStyle: '#fff',
  1158 + strokeStyle: '#c33',
  1159 + strokeWidth: 2,
  1160 + width: 5, height: 5,
  1161 + cornerRadius: 3
  1162 + }
  1163 + }).drawLayers();
1060 1164  
1061   - $('#canvas').setLayer(layer.name, {
1062   - handle: {
1063   - type: 'rectangle',
1064   - fillStyle: '#fff',
1065   - strokeStyle: '#c33',
1066   - strokeWidth: 2,
1067   - width: 5, height: 5,
1068   - cornerRadius: 3
1069   - }
1070   - }).drawLayers();
1071   -
  1165 + }
  1166 + else {
  1167 + layer.draggable = false;
  1168 + }
1072 1169 }
1073 1170 });
1074 1171  
... ... @@ -1190,27 +1287,32 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1190 1287 PaintCanvasctx.beginPath();
1191 1288 break;
1192 1289 case "Line":
  1290 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
1193 1291 $rootScope.LineNumber = $rootScope.ObjectIndex++;
1194 1292 // $rootScope.isLinePreviewCompleted = true;
1195 1293 $rootScope.DrawLineOnModuleItem('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y)
1196 1294 break;
1197 1295 case "Rectangle":
  1296 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
1198 1297 $rootScope.rectNumber = $rootScope.ObjectIndex++;
1199 1298 // $rootScope.isRectanglePreviewCompleted = true;
1200 1299 $rootScope.DrawRectangleOnModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y);
1201 1300  
1202 1301 break;
1203 1302 case "Circle":
  1303 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
1204 1304 $rootScope.CircleNumber = $rootScope.ObjectIndex++;
1205 1305 // $rootScope.isCirclePreviewCompleted = true;
1206 1306 $rootScope.DrawCircleOnModuleItem('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y);
1207 1307 break;
1208 1308 case "Arrow":
  1309 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
1209 1310 $rootScope.ArrowNumber = $rootScope.ObjectIndex++;
1210 1311 //$rootScope.isArrowPreviewCompleted = true;
1211 1312 $rootScope.DrawArrowOnModuleItem('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y);
1212 1313 break;
1213 1314 case "Pin":
  1315 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
1214 1316 $rootScope.PinNumber = $rootScope.PinObjectIndex++;
1215 1317 $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++;
1216 1318  
... ... @@ -1219,6 +1321,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1219 1321 $rootScope.DrawPinOnModuleItem('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber);
1220 1322 break;
1221 1323 case "TextArea":
  1324 + $rootScope.isAnnotaionToolBarDrawingModeActive = false;
1222 1325 $rootScope.IsTextAlreadySave = false;
1223 1326 $("#text_area").val('');
1224 1327 // Draw text
... ... @@ -1365,186 +1468,207 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1365 1468 height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
1366 1469 resizeFromCenter: false,
1367 1470 click: function (layer) {
1368   - $rootScope.shapeTypeText = "textAreaRect";
1369   -
1370   - var layerNameSplit = layer.name;
1371   - var splitedName = layerNameSplit.split("_");
1372   - var textValName = "TextAreaNew_";
1373   - var concatinateResult = textValName.concat(splitedName[1]);
1374   - $rootScope.canvasLayerNameCollection = [];
1375   - $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
1376   - $('#canvas').setLayer(layer.name, {
1377   - handle: {
1378   - type: 'rectangle',
1379   - fillStyle: '#fff',
1380   - strokeStyle: '#c33',
1381   - strokeWidth: 2,
1382   - width: 5, height: 5,
1383   - cornerRadius: 3
  1471 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1472 + layer.draggable = true;
  1473 + $rootScope.shapeTypeText = "textAreaRect";
  1474 +
  1475 + var layerNameSplit = layer.name;
  1476 + var splitedName = layerNameSplit.split("_");
  1477 + var textValName = "TextAreaNew_";
  1478 + var concatinateResult = textValName.concat(splitedName[1]);
  1479 + $rootScope.canvasLayerNameCollection = [];
  1480 + $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
  1481 + $('#canvas').setLayer(layer.name, {
  1482 + handle: {
  1483 + type: 'rectangle',
  1484 + fillStyle: '#fff',
  1485 + strokeStyle: '#c33',
  1486 + strokeWidth: 2,
  1487 + width: 5, height: 5,
  1488 + cornerRadius: 3
  1489 + }
  1490 + }).drawLayers();
  1491 + }
  1492 + else {
  1493 + layer.draggable = false;
1384 1494 }
1385   - }).drawLayers();
1386 1495 },
1387 1496 dblclick: function (layer) {
  1497 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1498 + layer.draggable = true;
  1499 + $rootScope.isTextAreaClosedButtonActive = false;
  1500 + $rootScope.IsTextAlreadySave = true;
1388 1501  
1389   - $rootScope.isTextAreaClosedButtonActive = false;
1390   - $rootScope.IsTextAlreadySave = true;
  1502 + var _rectLayerOnSave = layer.name;
  1503 + var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
  1504 + var TextAreaRectName = "TextAreaNew_";
  1505 + var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]);
1391 1506  
1392   - var _rectLayerOnSave = layer.name;
1393   - var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
1394   - var TextAreaRectName = "TextAreaNew_";
1395   - var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]);
  1507 + $rootScope.layerNameArr = layer.name;
  1508 + $rootScope.rectTextArr = TextAreaRectNameConcatenated;
1396 1509  
1397   - $rootScope.layerNameArr = layer.name;
1398   - $rootScope.rectTextArr = TextAreaRectNameConcatenated;
1399 1510  
  1511 + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
1400 1512  
1401   - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
  1513 + for (var i = 0; i <= $rootScope.TextPropertyArray.length - 1; i++) {
  1514 + if ($rootScope.TextPropertyArray[i].layerName == TextAreaRectNameConcatenated) {
1402 1515  
1403   - for (var i = 0; i <= $rootScope.TextPropertyArray.length - 1; i++) {
1404   - if ($rootScope.TextPropertyArray[i].layerName == TextAreaRectNameConcatenated) {
  1516 + var textArrVal = $rootScope.TextPropertyArray[i].Rect_Text;
  1517 + $("#text_area").val(textArrVal);
  1518 + var fontStyleProp = $rootScope.TextPropertyArray[i].FontStyle;
  1519 + var fontWeightProp = fontStyleProp.split(" ");
1405 1520  
1406   - var textArrVal = $rootScope.TextPropertyArray[i].Rect_Text;
1407   - $("#text_area").val(textArrVal);
1408   - var fontStyleProp = $rootScope.TextPropertyArray[i].FontStyle;
1409   - var fontWeightProp = fontStyleProp.split(" ");
  1521 + $("#text_area").css("font-size", $rootScope.TextPropertyArray[i].FontSize);
  1522 + $("#text_area").css("font-weight", fontWeightProp[0]);
  1523 + $("#text_area").css("font-style", fontWeightProp[1]);
  1524 + $("#text_area").css("text-align", $rootScope.TextPropertyArray[i].Align);
  1525 + $("#text_area").css("color", $rootScope.TextPropertyArray[i].FontColor);
  1526 + $("#text_area").css("font-family", $rootScope.TextPropertyArray[i].FontFamily);
  1527 + $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration);
  1528 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor });
1410 1529  
1411   - $("#text_area").css("font-size", $rootScope.TextPropertyArray[i].FontSize);
1412   - $("#text_area").css("font-weight", fontWeightProp[0]);
1413   - $("#text_area").css("font-style", fontWeightProp[1]);
1414   - $("#text_area").css("text-align", $rootScope.TextPropertyArray[i].Align);
1415   - $("#text_area").css("color", $rootScope.TextPropertyArray[i].FontColor);
1416   - $("#text_area").css("font-family", $rootScope.TextPropertyArray[i].FontFamily);
1417   - $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration);
1418   - $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor });
  1530 + var CurrentFontFamily = $rootScope.TextPropertyArray[i].FontFamily;
  1531 + // alert(CurrentFontFamily);
  1532 + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
  1533 + var CurrentFontSize = parseInt($rootScope.TextPropertyArray[i].FontSize);
  1534 + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
  1535 + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
1419 1536  
1420   - var CurrentFontFamily = $rootScope.TextPropertyArray[i].FontFamily;
1421   - // alert(CurrentFontFamily);
1422   - // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
1423   - var CurrentFontSize = parseInt($rootScope.TextPropertyArray[i].FontSize);
1424   - $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
1425   - $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
  1537 + CurrentFontFamily = '';
  1538 + CurrentFontSize = '';
1426 1539  
1427   - CurrentFontFamily = '';
1428   - CurrentFontSize = '';
1429 1540  
  1541 + if ($rootScope.TextPropertyArray[i].TextDecoration == "underline") {
1430 1542  
1431   - if ($rootScope.TextPropertyArray[i].TextDecoration == "underline") {
  1543 + $("#text-underline").addClass("ActiveFormattingButtonClass");
1432 1544  
1433   - $("#text-underline").addClass("ActiveFormattingButtonClass");
  1545 + }
1434 1546  
1435   - }
  1547 + else {
1436 1548  
1437   - else {
  1549 + $("#text-underline").removeClass("ActiveFormattingButtonClass");
1438 1550  
1439   - $("#text-underline").removeClass("ActiveFormattingButtonClass");
  1551 + }
1440 1552  
1441   - }
  1553 + //adding text font weight active class in text edit pop-up
1442 1554  
1443   - //adding text font weight active class in text edit pop-up
  1555 + if (fontWeightProp[0] == 700) {
1444 1556  
1445   - if (fontWeightProp[0] == 700) {
  1557 + $("#text-bold").addClass("ActiveFormattingButtonClass");
1446 1558  
1447   - $("#text-bold").addClass("ActiveFormattingButtonClass");
  1559 + }
1448 1560  
1449   - }
  1561 + else {
1450 1562  
1451   - else {
  1563 + $("#text-bold").removeClass("ActiveFormattingButtonClass");
1452 1564  
1453   - $("#text-bold").removeClass("ActiveFormattingButtonClass");
  1565 + }
1454 1566  
1455   - }
  1567 + //adding text font style active class in text edit pop-up
1456 1568  
1457   - //adding text font style active class in text edit pop-up
  1569 + if (fontWeightProp[1] == "italic") {
1458 1570  
1459   - if (fontWeightProp[1] == "italic") {
1460 1571  
  1572 + $("#text-italic").addClass("ActiveFormattingButtonClass");
  1573 + }
  1574 + else {
  1575 + $("#text-italic").removeClass("ActiveFormattingButtonClass");
1461 1576  
1462   - $("#text-italic").addClass("ActiveFormattingButtonClass");
1463   - }
1464   - else {
1465   - $("#text-italic").removeClass("ActiveFormattingButtonClass");
1466 1577  
  1578 + }
1467 1579  
1468   - }
  1580 + //adding text alignment active class in text edit pop-up
1469 1581  
1470   - //adding text alignment active class in text edit pop-up
  1582 + if ($rootScope.TextPropertyArray[i].Align == "left") {
1471 1583  
1472   - if ($rootScope.TextPropertyArray[i].Align == "left") {
  1584 + $("#text-right").removeClass("ActiveFormattingButtonClass");
1473 1585  
1474   - $("#text-right").removeClass("ActiveFormattingButtonClass");
  1586 + $("#text-center").removeClass("ActiveFormattingButtonClass")
1475 1587  
1476   - $("#text-center").removeClass("ActiveFormattingButtonClass")
  1588 + $("#text-left").addClass("ActiveFormattingButtonClass");
1477 1589  
1478   - $("#text-left").addClass("ActiveFormattingButtonClass");
  1590 + }
1479 1591  
1480   - }
  1592 + else if ($rootScope.TextPropertyArray[i].Align == "right") {
1481 1593  
1482   - else if ($rootScope.TextPropertyArray[i].Align == "right") {
1483 1594  
1484 1595  
  1596 + $("#text-center").removeClass("ActiveFormattingButtonClass")
1485 1597  
1486   - $("#text-center").removeClass("ActiveFormattingButtonClass")
  1598 + $("#text-left").removeClass("ActiveFormattingButtonClass");
1487 1599  
1488   - $("#text-left").removeClass("ActiveFormattingButtonClass");
  1600 + $("#text-right").addClass("ActiveFormattingButtonClass");
  1601 + }
1489 1602  
1490   - $("#text-right").addClass("ActiveFormattingButtonClass");
1491   - }
  1603 + else if ($rootScope.TextPropertyArray[i].Align == "center") {
1492 1604  
1493   - else if ($rootScope.TextPropertyArray[i].Align == "center") {
  1605 + $("#text-left").removeClass("ActiveFormattingButtonClass");
1494 1606  
1495   - $("#text-left").removeClass("ActiveFormattingButtonClass");
  1607 + $("#text-right").removeClass("ActiveFormattingButtonClass");
1496 1608  
1497   - $("#text-right").removeClass("ActiveFormattingButtonClass");
  1609 + $("#text-center").addClass("ActiveFormattingButtonClass");
1498 1610  
1499   - $("#text-center").addClass("ActiveFormattingButtonClass");
  1611 + }
1500 1612  
1501 1613 }
  1614 + else {
  1615 + // alert("no");
1502 1616  
1503   - }
1504   - else {
1505   - // alert("no");
  1617 + }
1506 1618  
1507 1619 }
1508 1620  
1509   - }
1510   -
1511   -
1512   - // _rectLayerOnSaveSplitInt = '';
1513   - textArrVal = '';
1514   - $("#annotationTextModal").css("padding-right", "0px");
1515   - document.getElementById('modelbackground').style.display = "block";
1516   - $("#annotationTextModal").modal("toggle");
1517 1621  
1518   - // $("#selected-font-family").val(CurrentFontFamily);
1519   - // $("#selected-font-size").val(CurrentFontSize);
  1622 + // _rectLayerOnSaveSplitInt = '';
  1623 + textArrVal = '';
  1624 + $("#annotationTextModal").css("padding-right", "0px");
  1625 + document.getElementById('modelbackground').style.display = "block";
  1626 + $("#annotationTextModal").modal("toggle");
1520 1627  
  1628 + // $("#selected-font-family").val(CurrentFontFamily);
  1629 + // $("#selected-font-size").val(CurrentFontSize);
  1630 + }
  1631 + else {
  1632 + layer.draggable = false;
  1633 + }
1521 1634  
1522 1635 },
1523 1636 mouseout: function (layer) {
1524   - $rootScope.canvasLayerNameCollection = [];
1525   - $('#canvas').setLayer(layer.name, {
1526   - handle: {
1527   - type: 'rectangle',
1528   - fillStyle: 'pink',
1529   - strokeStyle: 'yellow',
1530   - strokeWidth: 0,
1531   - width: 0, height: 0,
1532   - cornerRadius: 0
1533   - }
1534   - }).drawLayers();
  1637 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1638 + layer.draggable = true;
  1639 + $rootScope.canvasLayerNameCollection = [];
  1640 + $('#canvas').setLayer(layer.name, {
  1641 + handle: {
  1642 + type: 'rectangle',
  1643 + fillStyle: 'pink',
  1644 + strokeStyle: 'yellow',
  1645 + strokeWidth: 0,
  1646 + width: 0, height: 0,
  1647 + cornerRadius: 0
  1648 + }
  1649 + }).drawLayers();
  1650 + }
  1651 + else {
  1652 + layer.draggable = false;
  1653 + }
1535 1654 },
1536 1655 mouseover: function (layer) {
1537   - $('#canvas').setLayer(layer.name, {
1538   - handle: {
1539   - type: 'rectangle',
1540   - fillStyle: '#fff',
1541   - strokeStyle: '#c33',
1542   - strokeWidth: 2,
1543   - width: 5, height: 5,
1544   - cornerRadius: 3
1545   - }
1546   - }).drawLayers();
1547   -
  1656 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1657 + layer.draggable = true;
  1658 + $('#canvas').setLayer(layer.name, {
  1659 + handle: {
  1660 + type: 'rectangle',
  1661 + fillStyle: '#fff',
  1662 + strokeStyle: '#c33',
  1663 + strokeWidth: 2,
  1664 + width: 5, height: 5,
  1665 + cornerRadius: 3
  1666 + }
  1667 + }).drawLayers();
  1668 + }
  1669 + else {
  1670 + layer.draggable = false;
  1671 + }
1548 1672 }
1549 1673 });
1550 1674 $("#text_area").val('');
... ... @@ -1633,141 +1757,166 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1633 1757 height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height,
1634 1758 resizeFromCenter: false,
1635 1759 click: function (layer) {
1636   - $rootScope.shapeTypeText = "textAreaRect";
1637   - var layerNameSplit = layer.name;
1638   - var splitedName = layerNameSplit.split("_");
1639   - var textValName = "TextAreaAfterEdit_";
1640   - var concatinateResult = textValName.concat(splitedName[1]);
1641   - $rootScope.canvasLayerNameCollection = [];
1642   - $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
1643   -
1644   - $('#canvas').setLayer(layer.name, {
1645   - handle: {
1646   - type: 'rectangle',
1647   - fillStyle: '#fff',
1648   - strokeStyle: '#c33',
1649   - strokeWidth: 2,
1650   - width: 5, height: 5,
1651   - cornerRadius: 3
1652   - }
1653   - }).drawLayers();
  1760 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1761 + layer.draggable = true;
  1762 + $rootScope.shapeTypeText = "textAreaRect";
  1763 + var layerNameSplit = layer.name;
  1764 + var splitedName = layerNameSplit.split("_");
  1765 + var textValName = "TextAreaAfterEdit_";
  1766 + var concatinateResult = textValName.concat(splitedName[1]);
  1767 + $rootScope.canvasLayerNameCollection = [];
  1768 + $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
  1769 +
  1770 + $('#canvas').setLayer(layer.name, {
  1771 + handle: {
  1772 + type: 'rectangle',
  1773 + fillStyle: '#fff',
  1774 + strokeStyle: '#c33',
  1775 + strokeWidth: 2,
  1776 + width: 5, height: 5,
  1777 + cornerRadius: 3
  1778 + }
  1779 + }).drawLayers();
  1780 + }
  1781 + else {
  1782 + layer.draggable = false;
  1783 + }
1654 1784  
1655 1785 },
1656 1786 dblclick: function (layer) {
1657 1787  
  1788 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1789 + layer.draggable = true;
  1790 + $rootScope.isTextAreaClosedButtonActive = false;
  1791 + $rootScope.IsTextAlreadySave = true;
  1792 + var _rectLayerOnSave = layer.name;
  1793 + var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
  1794 + var RectNameAfterEdit = "TextAreaAfterEdit_";
  1795 + var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]);
  1796 + $rootScope.modifySavedTextIndexNumber = _rectLayerOnSaveSplit[1];
  1797 +
  1798 + $rootScope.layerNameArr = layer.name;
  1799 + $rootScope.rectTextArr = RectNameAfterEditResult;
  1800 +
  1801 + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
  1802 + $("#text_area").val(_modifiedText);
  1803 + $("#text_area").css("font-size", _modifiedFontSize);
  1804 + $("#text_area").css("font-weight", _modifiedFontWeight);
  1805 + $("#text_area").css("font-style", _modifiedFontStyle);
  1806 + $("#text_area").css("text-align", _modifiedTextAlign);
  1807 + $("#text_area").css("color", _modifiedFontColor);
  1808 + $("#text_area").css("font-family", _modifiedFontFamily);
  1809 + $("#text_area").css("text-decoration", _modifiedFontDecoration);
  1810 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor });
  1811 +
  1812 + // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" });
  1813 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
  1814 +
  1815 + //khushbu
  1816 + var CurrentFontFamily = _modifiedFontFamily;
  1817 + // alert(CurrentFontFamily);
  1818 + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
  1819 + var CurrentFontSize = parseInt(_modifiedFontSize);
  1820 + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
  1821 + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
  1822 + CurrentFontFamily = '';
  1823 + CurrentFontSize = '';
  1824 + //adding text text decoration active class in text edit pop-up
  1825 + if (_modifiedFontDecoration == "underline") {
  1826 + $("#text-underline").addClass("ActiveFormattingButtonClass");
  1827 + }
  1828 + else {
  1829 + $("#text-underline").removeClass("ActiveFormattingButtonClass");
  1830 + }
1658 1831  
1659   - $rootScope.isTextAreaClosedButtonActive = false;
1660   - $rootScope.IsTextAlreadySave = true;
1661   - var _rectLayerOnSave = layer.name;
1662   - var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
1663   - var RectNameAfterEdit = "TextAreaAfterEdit_";
1664   - var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]);
1665   - $rootScope.modifySavedTextIndexNumber = _rectLayerOnSaveSplit[1];
1666   -
1667   - $rootScope.layerNameArr = layer.name;
1668   - $rootScope.rectTextArr = RectNameAfterEditResult;
1669   -
1670   - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
1671   - $("#text_area").val(_modifiedText);
1672   - $("#text_area").css("font-size", _modifiedFontSize);
1673   - $("#text_area").css("font-weight", _modifiedFontWeight);
1674   - $("#text_area").css("font-style", _modifiedFontStyle);
1675   - $("#text_area").css("text-align", _modifiedTextAlign);
1676   - $("#text_area").css("color", _modifiedFontColor);
1677   - $("#text_area").css("font-family", _modifiedFontFamily);
1678   - $("#text_area").css("text-decoration", _modifiedFontDecoration);
1679   - $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor });
1680   -
1681   - // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" });
1682   - // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
1683   -
1684   - //khushbu
1685   - var CurrentFontFamily = _modifiedFontFamily;
1686   - // alert(CurrentFontFamily);
1687   - // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
1688   - var CurrentFontSize = parseInt(_modifiedFontSize);
1689   - $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
1690   - $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
1691   - CurrentFontFamily = '';
1692   - CurrentFontSize = '';
1693   - //adding text text decoration active class in text edit pop-up
1694   - if (_modifiedFontDecoration == "underline") {
1695   - $("#text-underline").addClass("ActiveFormattingButtonClass");
1696   - }
1697   - else {
1698   - $("#text-underline").removeClass("ActiveFormattingButtonClass");
1699   - }
  1832 + //adding text font weight active class in text edit pop-up
  1833 + if (_modifiedFontWeight == 700) {
1700 1834  
1701   - //adding text font weight active class in text edit pop-up
1702   - if (_modifiedFontWeight == 700) {
  1835 + $("#text-bold").addClass("ActiveFormattingButtonClass");
  1836 + }
  1837 + else {
1703 1838  
1704   - $("#text-bold").addClass("ActiveFormattingButtonClass");
1705   - }
1706   - else {
  1839 + $("#text-bold").removeClass("ActiveFormattingButtonClass");
1707 1840  
1708   - $("#text-bold").removeClass("ActiveFormattingButtonClass");
  1841 + }
1709 1842  
1710   - }
  1843 + //adding text font style active class in text edit pop-up
  1844 + if (_modifiedFontStyle == "italic") {
1711 1845  
1712   - //adding text font style active class in text edit pop-up
1713   - if (_modifiedFontStyle == "italic") {
  1846 + $("#text-italic").addClass("ActiveFormattingButtonClass");
  1847 + }
  1848 + else {
  1849 + $("#text-italic").removeClass("ActiveFormattingButtonClass");
1714 1850  
1715   - $("#text-italic").addClass("ActiveFormattingButtonClass");
1716   - }
1717   - else {
1718   - $("#text-italic").removeClass("ActiveFormattingButtonClass");
  1851 + }
1719 1852  
1720   - }
  1853 + //adding text alignment active class in text edit pop-up
  1854 + if (_modifiedTextAlign == "left") {
  1855 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  1856 + $("#text-center").removeClass("ActiveFormattingButtonClass")
  1857 + $("#text-left").addClass("ActiveFormattingButtonClass");
  1858 + }
  1859 + else if (_modifiedTextAlign == "right") {
1721 1860  
1722   - //adding text alignment active class in text edit pop-up
1723   - if (_modifiedTextAlign == "left") {
1724   - $("#text-right").removeClass("ActiveFormattingButtonClass");
1725   - $("#text-center").removeClass("ActiveFormattingButtonClass")
1726   - $("#text-left").addClass("ActiveFormattingButtonClass");
1727   - }
1728   - else if (_modifiedTextAlign == "right") {
  1861 + $("#text-center").removeClass("ActiveFormattingButtonClass")
  1862 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  1863 + $("#text-right").addClass("ActiveFormattingButtonClass");
1729 1864  
1730   - $("#text-center").removeClass("ActiveFormattingButtonClass")
1731   - $("#text-left").removeClass("ActiveFormattingButtonClass");
1732   - $("#text-right").addClass("ActiveFormattingButtonClass");
  1865 + }
  1866 + else if (_modifiedTextAlign == "center") {
  1867 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  1868 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  1869 + $("#text-center").addClass("ActiveFormattingButtonClass");
1733 1870  
1734   - }
1735   - else if (_modifiedTextAlign == "center") {
1736   - $("#text-left").removeClass("ActiveFormattingButtonClass");
1737   - $("#text-right").removeClass("ActiveFormattingButtonClass");
1738   - $("#text-center").addClass("ActiveFormattingButtonClass");
  1871 + }
1739 1872  
  1873 + document.getElementById('modelbackground').style.display = "block";
  1874 + $("#annotationTextModal").modal("toggle");
1740 1875 }
1741   -
1742   - document.getElementById('modelbackground').style.display = "block";
1743   - $("#annotationTextModal").modal("toggle");
  1876 + else {
  1877 + layer.draggable = false;
  1878 + }
1744 1879 },
1745 1880 mouseout: function (layer) {
1746   - $rootScope.canvasLayerNameCollection = [];
1747   - $('#canvas').setLayer(layer.name, {
1748   - handle: {
1749   - type: 'rectangle',
1750   - fillStyle: 'pink',
1751   - strokeStyle: 'yellow',
1752   - strokeWidth: 0,
1753   - width: 0, height: 0,
1754   - cornerRadius: 0
1755   - }
1756   - }).drawLayers();
  1881 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1882 + layer.draggable = true;
  1883 + $rootScope.canvasLayerNameCollection = [];
  1884 + $('#canvas').setLayer(layer.name, {
  1885 + handle: {
  1886 + type: 'rectangle',
  1887 + fillStyle: 'pink',
  1888 + strokeStyle: 'yellow',
  1889 + strokeWidth: 0,
  1890 + width: 0, height: 0,
  1891 + cornerRadius: 0
  1892 + }
  1893 + }).drawLayers();
  1894 + }
  1895 + else {
  1896 + layer.draggable = false;
  1897 + }
1757 1898 },
1758 1899 mouseover: function (layer) {
1759   - $('#canvas').setLayer(layer.name, {
1760   - handle: {
1761   - type: 'rectangle',
1762   - fillStyle: '#fff',
1763   - strokeStyle: '#c33',
1764   - strokeWidth: 2,
1765   - width: 5, height: 5,
1766   - cornerRadius: 3
1767   - }
1768   - }).drawLayers();
  1900 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
  1901 + layer.draggable = true;
  1902 + $('#canvas').setLayer(layer.name, {
  1903 + handle: {
  1904 + type: 'rectangle',
  1905 + fillStyle: '#fff',
  1906 + strokeStyle: '#c33',
  1907 + strokeWidth: 2,
  1908 + width: 5, height: 5,
  1909 + cornerRadius: 3
  1910 + }
  1911 + }).drawLayers();
  1912 +
  1913 + }
1769 1914  
  1915 + else {
  1916 + layer.draggable = false;
  1917 + }
1770 1918 }
  1919 +
1771 1920 });
1772 1921  
1773 1922 }
... ... @@ -1785,6 +1934,16 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1785 1934 annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp, false);
1786 1935 }
1787 1936 // alert("doclick");
  1937 + // annotation history
  1938 + if (event != undefined) {
  1939 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
  1940 +
  1941 + $rootScope.DrawingListners_Canvas(event);
  1942 +
  1943 + }
  1944 + }
  1945 +
  1946 +
1788 1947 };
1789 1948  
1790 1949  
... ... @@ -2156,12 +2315,25 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
2156 2315 $rootScope.FreeStylePaint = function (e) {
2157 2316  
2158 2317 var annotationCanvas = document.getElementById("canvas");
  2318 + annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintBrushCanvasMouseDown, false);
  2319 + annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintBrushCanvasMouseUp, false);
2159 2320 // document.getElementById("canvasPaint").addEventListener("mouseup", OnPaintBrushCanvasMouseUp);
  2321 + //alert($rootScope.isAnnotaionToolBarDrawingModeActive);
  2322 + //if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
2160 2323  
2161   - annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintBrushCanvasMouseDown, false);
  2324 + // alert($rootScope.isAnnotaionToolBarDrawingModeActive);
  2325 + // $rootScope.DrawingListners_Canvas(e);
2162 2326  
2163   - annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintBrushCanvasMouseUp, false);
2164   - }
  2327 + //}
  2328 + //else {
  2329 +
  2330 +
  2331 +
  2332 + //}
  2333 + }
  2334 +
  2335 +
  2336 +
2165 2337  
2166 2338  
2167 2339  
... ...