Commit 9eeccea889a99e6602071d4e83c61d79d63c9bbc
Merge branch 'Develop' of http://52.6.196.163/ADAM/AIAHTML5 into Bugs_v17
# Conflicts: # 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
Showing
9 changed files
with
794 additions
and
746 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
@@ -58,9 +58,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -58,9 +58,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
58 | } | 58 | } |
59 | else { | 59 | else { |
60 | $scope.setActiveTab(1); | 60 | $scope.setActiveTab(1); |
61 | + $scope.reRunSearchOnLoad(); | ||
61 | } | 62 | } |
62 | 63 | ||
63 | - $scope.reRunSearchOnLoad(); | 64 | + |
64 | 65 | ||
65 | }); | 66 | }); |
66 | 67 |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -64,9 +64,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -64,9 +64,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
64 | } | 64 | } |
65 | else { | 65 | else { |
66 | $scope.setActiveTab(1); | 66 | $scope.setActiveTab(1); |
67 | + $scope.reRunSearchOnLoad(); | ||
67 | } | 68 | } |
68 | 69 | ||
69 | - $scope.reRunSearchOnLoad(); | 70 | + |
70 | 71 | ||
71 | }); | 72 | }); |
72 | 73 | ||
@@ -562,7 +563,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -562,7 +563,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
562 | theme: 'success', | 563 | theme: 'success', |
563 | currentController: 'CIController', | 564 | currentController: 'CIController', |
564 | parentSlug: 'clinical-illustrations', | 565 | parentSlug: 'clinical-illustrations', |
565 | - content: '<div class="row"><div style="align:left;width:100%;height:100%"><canvas id="canvas" ng-click="BindCanvasDrawingListners($event)" width="1369" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1 "></canvas></div> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1369" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;"></canvas>' + | 566 | + content: '<div class="row" id="canvasDiv"><div style="align:left;width:100%;height:100%"><canvas id="canvas" ng-click="BindCanvasDrawingListners($event)" width="1369" height="325" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1 "></canvas></div> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1369" height="325" class="canvas-annotationStyle1" style="position: absolute;z-index:0;"></canvas>' + |
566 | '<div class="col-sm-12 img-thumbnail" align="center">' + | 567 | '<div class="col-sm-12 img-thumbnail" align="center">' + |
567 | '<img src="' + $scope.clickedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well">' + | 568 | '<img src="' + $scope.clickedCIImage + '" alt="" title="" class="img-responsive "><div class="col-sm-12 well">' + |
568 | '<div align="left" id="sid"><p>' + $scope.clickedCISummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button>' + | 569 | '<div align="left" id="sid"><p>' + $scope.clickedCISummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button>' + |
@@ -619,7 +620,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | @@ -619,7 +620,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout | ||
619 | $("#canvasPaint").css("display", "block"); | 620 | $("#canvasPaint").css("display", "block"); |
620 | 621 | ||
621 | $rootScope.BindCanvasDrawingListners(); | 622 | $rootScope.BindCanvasDrawingListners(); |
622 | - // $rootScope.FreeStylePaint(); | 623 | + $rootScope.FreeStylePaint(); |
623 | }); | 624 | }); |
624 | 625 | ||
625 | $scope.ReloadListViewImageDiv = function (id) { | 626 | $scope.ReloadListViewImageDiv = function (id) { |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -89,7 +89,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -89,7 +89,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
89 | 89 | ||
90 | //navigator man functionality | 90 | //navigator man functionality |
91 | $scope.navigatorImage; | 91 | $scope.navigatorImage; |
92 | - $scope.NavigatorData; | 92 | + $rootScope.NavigatorData; |
93 | $scope.navimgsrc; | 93 | $scope.navimgsrc; |
94 | 94 | ||
95 | $scope.dragdivleft = 0; | 95 | $scope.dragdivleft = 0; |
@@ -140,6 +140,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -140,6 +140,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
140 | 140 | ||
141 | } | 141 | } |
142 | 142 | ||
143 | + | ||
143 | $scope.scroll = function () { | 144 | $scope.scroll = function () { |
144 | // $window.scrollTo(0, 0); | 145 | // $window.scrollTo(0, 0); |
145 | $("html,body").scrollTop(0); | 146 | $("html,body").scrollTop(0); |
@@ -666,12 +667,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -666,12 +667,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
666 | 667 | ||
667 | $http({ method: 'GET', url: NavigatorManJsonPath }) | 668 | $http({ method: 'GET', url: NavigatorManJsonPath }) |
668 | .success(function (data) { | 669 | .success(function (data) { |
669 | - $scope.NavigatorData = data; | 670 | + $rootScope.NavigatorData = data; |
670 | 671 | ||
671 | $scope.skinTone = $rootScope.globalSetting.ethnicity; | 672 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
672 | 673 | ||
673 | var navigatorManData = new jinqJs() | 674 | var navigatorManData = new jinqJs() |
674 | - .from($scope.NavigatorData.Navigtor.ViewOrientation) | 675 | + .from($rootScope.NavigatorData.Navigtor.ViewOrientation) |
675 | .where("_ViewOrientationId == " + $rootScope.currentBodyViewId) | 676 | .where("_ViewOrientationId == " + $rootScope.currentBodyViewId) |
676 | .select(); | 677 | .select(); |
677 | 678 | ||
@@ -706,7 +707,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -706,7 +707,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
706 | navImageModesty = $scope.navigatorImage[0]._ImageName; | 707 | navImageModesty = $scope.navigatorImage[0]._ImageName; |
707 | } | 708 | } |
708 | 709 | ||
709 | - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; | 710 | + // $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; |
711 | + document.getElementById('navimg').src = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $scope.skinTone + '/navigator_images/' + navImageModesty; | ||
710 | 712 | ||
711 | $('#navigatorDiv').css('visibility', 'visible'); | 713 | $('#navigatorDiv').css('visibility', 'visible'); |
712 | 714 | ||
@@ -776,7 +778,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -776,7 +778,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
776 | // annotation toolbar canvas | 778 | // annotation toolbar canvas |
777 | if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { | 779 | if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { |
778 | 780 | ||
779 | - $("#canvasDiv").append('<canvas id="canvasPaint" width="2277" height="3248" class="canvas-annotationStyle1"></canvas><canvas id="canvas" width="2277" height="3248" class="canvas-annotationStyle"></canvas>'); | 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 | $scope.BindCanvasDrawingListners(); | 783 | $scope.BindCanvasDrawingListners(); |
781 | // $rootScope.FreeStylePaint(); | 784 | // $rootScope.FreeStylePaint(); |
782 | 785 | ||
@@ -3568,6 +3571,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -3568,6 +3571,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
3568 | 3571 | ||
3569 | } | 3572 | } |
3570 | 3573 | ||
3574 | + | ||
3575 | + if (document.getElementById("btnStrutureBox").name == "showAnnotationStructure") { | ||
3576 | + $scope.showAnnotation() | ||
3577 | + | ||
3578 | + } | ||
3579 | + else { | ||
3580 | + $scope.hideAnnotation() | ||
3581 | + | ||
3582 | + | ||
3583 | + } | ||
3584 | + } | ||
3585 | + | ||
3586 | + $scope.showAnnotation = function() | ||
3587 | + { | ||
3588 | + $(".com").show(); | ||
3589 | + $('#dot').show(); | ||
3590 | + $('#bord').show(); | ||
3591 | + $('#sppeachBubble').show(); | ||
3592 | + $('#sppeachBubble_annotation').show(); | ||
3593 | + | ||
3594 | + $("#bord_annotation").show(); | ||
3595 | + $("#dot_annotation").show(); | ||
3596 | + $(".dynCross_anno").parent().parent().parent().show(); | ||
3597 | + } | ||
3598 | + | ||
3599 | + $scope.hideAnnotation=function() | ||
3600 | + { | ||
3601 | + $(".com").hide(); | ||
3602 | + $('#dot').hide(); | ||
3603 | + $('#bord').hide(); | ||
3604 | + $('#sppeachBubble').hide(); | ||
3605 | + $('#sppeachBubble_annotation').hide(); | ||
3606 | + $("#bord_annotation").hide(); | ||
3607 | + $("#dot_annotation").hide(); | ||
3608 | + $(".dynCross_anno").parent().parent().parent().hide(); | ||
3571 | } | 3609 | } |
3572 | 3610 | ||
3573 | $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) { | 3611 | $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) { |
@@ -5877,20 +5915,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -5877,20 +5915,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
5877 | 5915 | ||
5878 | 5916 | ||
5879 | //if listanager is visisble then close it | 5917 | //if listanager is visisble then close it |
5918 | + | ||
5880 | 5919 | ||
5881 | $rootScope.isListManagerSelected = false; | 5920 | $rootScope.isListManagerSelected = false; |
5882 | $rootScope.CloseListManager(); | 5921 | $rootScope.CloseListManager(); |
5922 | + var btnStrutureBoxname = document.getElementById("btnStrutureBox").name; | ||
5883 | 5923 | ||
5884 | - $(".com").toggle(); | ||
5885 | - $('#dot').toggle(); | ||
5886 | - $('#bord').toggle(); | ||
5887 | - $('#sppeachBubble').toggle(); | ||
5888 | - $('#sppeachBubble_annotation').toggle(); | ||
5889 | - | ||
5890 | - $("#bord_annotation").toggle(); | ||
5891 | - $("#dot_annotation").toggle(); | ||
5892 | - $(".dynCross_anno").parent().parent().parent().toggle(); | 5924 | + if (btnStrutureBoxname == "showAnnotationStructure") { |
5925 | + $("#btnStrutureBox").addClass("disableHideShowStructure"); | ||
5926 | + $scope.hideAnnotation(); | ||
5927 | + document.getElementById("btnStrutureBox").name = "hideAnnotationStructure"; | ||
5928 | + } | ||
5929 | + else { | ||
5930 | + $("#btnStrutureBox").removeClass("disableHideShowStructure"); | ||
5931 | + $scope.showAnnotation(); | ||
5893 | 5932 | ||
5933 | + document.getElementById("btnStrutureBox").name = "showAnnotationStructure"; | ||
5934 | + } | ||
5935 | + | ||
5894 | } | 5936 | } |
5895 | 5937 | ||
5896 | 5938 | ||
@@ -6405,7 +6447,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6405,7 +6447,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6405 | 6447 | ||
6406 | 6448 | ||
6407 | //4. | 6449 | //4. |
6408 | - $scope.loadSelectedBodyViewNavigator(currentBodyViewId); | 6450 | + $scope.loadNavigatorForSelectedBodyView(currentBodyViewId); |
6409 | 6451 | ||
6410 | //5. change the search terms as per the selected bodyview | 6452 | //5. change the search terms as per the selected bodyview |
6411 | $scope.loadSearchDataForBodyView(); | 6453 | $scope.loadSearchDataForBodyView(); |
@@ -6437,7 +6479,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6437,7 +6479,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6437 | 6479 | ||
6438 | 6480 | ||
6439 | //4. | 6481 | //4. |
6440 | - $scope.loadSelectedBodyViewNavigator(currentBodyViewId); | 6482 | + $scope.loadNavigatorForSelectedBodyView(currentBodyViewId); |
6441 | 6483 | ||
6442 | //5. change the search terms as per the selected bodyview | 6484 | //5. change the search terms as per the selected bodyview |
6443 | $scope.loadSearchDataForBodyView(); | 6485 | $scope.loadSearchDataForBodyView(); |
@@ -6637,7 +6679,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6637,7 +6679,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6637 | $scope.loadSelectedBodyView($rootScope.voId); | 6679 | $scope.loadSelectedBodyView($rootScope.voId); |
6638 | 6680 | ||
6639 | //3. load corresponding navigator man | 6681 | //3. load corresponding navigator man |
6640 | - $scope.loadSelectedBodyViewNavigator($rootScope.voId); | 6682 | + $scope.loadNavigatorForSelectedBodyView($rootScope.voId); |
6641 | 6683 | ||
6642 | //4. change the search terms as per the selected bodyview | 6684 | //4. change the search terms as per the selected bodyview |
6643 | $scope.loadSearchDataForBodyView(); | 6685 | $scope.loadSearchDataForBodyView(); |
@@ -6671,7 +6713,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6671,7 +6713,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6671 | $scope.loadSelectedBodyView($rootScope.voId); | 6713 | $scope.loadSelectedBodyView($rootScope.voId); |
6672 | 6714 | ||
6673 | //2. | 6715 | //2. |
6674 | - $scope.loadSelectedBodyViewNavigator($rootScope.voId); | 6716 | + $scope.loadNavigatorForSelectedBodyView($rootScope.voId); |
6675 | }; | 6717 | }; |
6676 | 6718 | ||
6677 | 6719 | ||
@@ -6757,20 +6799,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6757,20 +6799,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6757 | 6799 | ||
6758 | }) | 6800 | }) |
6759 | 6801 | ||
6802 | + $scope.$on('changeNavigatorModestyEvent', function (event, data) { | ||
6803 | + console.log('changeNavigatorModestyEvent'); | ||
6804 | + | ||
6805 | + $scope.loadNavigatorForSelectedBodyView(data.bodyViewId); | ||
6806 | + | ||
6807 | + }) | ||
6760 | //Reload DA controller Body View after setting Change | 6808 | //Reload DA controller Body View after setting Change |
6761 | $scope.$on('reloadDABodyViewEvent', function (event, data) { | 6809 | $scope.$on('reloadDABodyViewEvent', function (event, data) { |
6762 | //console.log('reloadDABodyViewEvent'); | 6810 | //console.log('reloadDABodyViewEvent'); |
6763 | - $scope.layerNumber = parseInt($('#txtlayerNumber').val()); | ||
6764 | - //alert('mouseUp'); | 6811 | + if ($rootScope.isSettingEventAlredayDispachted == true) { |
6812 | + $rootScope.isSettingEventAlredayDispachted = false; | ||
6813 | + $scope.layerNumber = parseInt($('#txtlayerNumber').val()); | ||
6814 | + //alert('mouseUp'); | ||
6765 | 6815 | ||
6766 | 6816 | ||
6767 | - if ($scope.layerNumber == 0) { | ||
6768 | - $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ||
6769 | - } | ||
6770 | - // $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ||
6771 | - | ||
6772 | - $scope.loadSelectedBodyViewNavigator(data.reloadDABodyViewId); | 6817 | + if ($scope.layerNumber == 0) { |
6818 | + $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ||
6819 | + } | ||
6820 | + // $scope.loadSelectedBodyView(data.reloadDABodyViewId); | ||
6773 | 6821 | ||
6822 | + $scope.loadNavigatorForSelectedBodyView(data.reloadDABodyViewId); | ||
6823 | + } | ||
6774 | // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | 6824 | // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); |
6775 | 6825 | ||
6776 | //$rootScope.isSettingEventAlredayDispachted = false; | 6826 | //$rootScope.isSettingEventAlredayDispachted = false; |
@@ -6778,17 +6828,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6778,17 +6828,15 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6778 | 6828 | ||
6779 | }) | 6829 | }) |
6780 | 6830 | ||
6781 | - | ||
6782 | - | ||
6783 | - $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { | 6831 | + $scope.loadNavigatorForSelectedBodyView = function (currentBodyViewId) { |
6784 | 6832 | ||
6785 | //$rootScope.voId = currentBodyViewId; | 6833 | //$rootScope.voId = currentBodyViewId; |
6786 | 6834 | ||
6787 | //$scope.skinTone = $rootScope.globalSetting.ethnicity; | 6835 | //$scope.skinTone = $rootScope.globalSetting.ethnicity; |
6788 | 6836 | ||
6789 | - if ($scope.NavigatorData != null || $scope.NavigatorData != undefined) { | 6837 | + if ($rootScope.NavigatorData != null || $rootScope.NavigatorData != undefined) { |
6790 | var navdtlOrient = new jinqJs() | 6838 | var navdtlOrient = new jinqJs() |
6791 | - .from($scope.NavigatorData.Navigtor.ViewOrientation) | 6839 | + .from($rootScope.NavigatorData.Navigtor.ViewOrientation) |
6792 | .where("_ViewOrientationId == " + currentBodyViewId) | 6840 | .where("_ViewOrientationId == " + currentBodyViewId) |
6793 | .select(); | 6841 | .select(); |
6794 | 6842 | ||
@@ -6818,7 +6866,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6818,7 +6866,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6818 | 6866 | ||
6819 | } | 6867 | } |
6820 | 6868 | ||
6821 | - $scope.navimgsrc = "~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty; | 6869 | + // $scope.navimgsrc = 'http://localhost/AIAHTML5/content/images/DA/ethnicity/body-views/' + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;//"~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty; |
6870 | + document.getElementById('navimg').src = '~/../content/images/DA/ethnicity/body-views/' + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty;//"~/../content/images/DA/ethnicity/body-views/" + $scope.voId + '/' + $rootScope.globalSetting.ethnicity + '/navigator_images/' + navImageModesty; | ||
6822 | } | 6871 | } |
6823 | } | 6872 | } |
6824 | 6873 | ||
@@ -6857,114 +6906,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -6857,114 +6906,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
6857 | 6906 | ||
6858 | 6907 | ||
6859 | 6908 | ||
6860 | - $rootScope.FreeStylePaint = function (e) { | ||
6861 | - | ||
6862 | - var annotationCanvas = document.getElementById("canvas"); | ||
6863 | - // document.getElementById("canvasPaint").addEventListener("mouseup", OnPaintBrushCanvasMouseUp); | ||
6864 | - | ||
6865 | - annotationCanvas.addEventListener('mousedown', $scope.OnPaintCanvasMouseDown, false); | ||
6866 | - | ||
6867 | - annotationCanvas.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false); | ||
6868 | - } | ||
6869 | - $scope.OnPaintCanvasMouseDown = function (event) { | ||
6870 | - $rootScope.isMousedownOnPaintCanvas = true; | ||
6871 | - $scope.isStartPointDeleted = false; | ||
6872 | - var annotationCanvas = document.getElementById("canvas"); | ||
6873 | - $scope.startPageX = parseInt(event.clientX - ($("#canvas").offset().left)); | ||
6874 | - $scope.startPageY = parseInt(event.clientY - ($("#canvas").offset().top)); | ||
6875 | - | ||
6876 | - annotationCanvas.addEventListener('mousemove', $scope.OnPaintCanvasMouseMove, false); | ||
6877 | - | ||
6878 | - | ||
6879 | - | ||
6880 | - } | ||
6881 | - $scope.OnPaintCanvasMouseMove = function (event) { | ||
6882 | - | ||
6883 | - | ||
6884 | - $rootScope.xPage = parseInt(event.clientX - ($("#canvas").offset().left)); | ||
6885 | - $rootScope.yPage = parseInt(event.clientY - ($("#canvas").offset().top)); | ||
6886 | - | ||
6887 | - var btneraseBrushSizeValue = $("#btnBrushSize").val(); | ||
6888 | - $rootScope.eraseshapeSize = parseInt(btneraseBrushSizeValue); | ||
6889 | - | ||
6890 | - if ($rootScope.isEraseToolSelected == true && $rootScope.isMousedownOnPaintCanvas == true) { | ||
6891 | - | ||
6892 | - var sktch = $('#canvasPaint').sketch(); | ||
6893 | - $('#canvasPaint').sketch().actions = []; | ||
6894 | - var paintCanvas = document.getElementById("canvasPaint"); | ||
6895 | - var paintCanvasContext = paintCanvas.getContext('2d'); | ||
6896 | - if ($scope.isStartPointDeleted == false) { | ||
6897 | - | ||
6898 | - paintCanvasContext.clearRect($scope.startPageX, $scope.startPageY, $rootScope.eraseshapeSize, $rootScope.eraseshapeSize); | ||
6899 | - | ||
6900 | - $scope.isStartPointDeleted = true; | ||
6901 | - } | ||
6902 | - | ||
6903 | - paintCanvasContext.clearRect($rootScope.xPage, $rootScope.yPage, $rootScope.eraseshapeSize, $rootScope.eraseshapeSize); | ||
6904 | - | ||
6905 | - | ||
6906 | - } | ||
6907 | - } | ||
6908 | - $scope.OnPaintBrushCanvasMouseDown = function (event) { | ||
6909 | - switch ($rootScope.shapeType) { | ||
6910 | - | ||
6911 | - case "FreeStylePaint": | ||
6912 | - | ||
6913 | - | ||
6914 | - | ||
6915 | - // $('#canvasPaint').sketch(); | ||
6916 | - // $('#canvasPaint').sketch({ defaultSize: 1 }); | ||
6917 | - // if ($("#amount-2").val() == '') { | ||
6918 | - // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | ||
6919 | - // $('#canvasPaint').sketch(); | ||
6920 | - // } | ||
6921 | - // else { | ||
6922 | - | ||
6923 | - // // var a = $("#amount-2").val(); | ||
6924 | - //// $scope.shapesize = parseInt(a); | ||
6925 | - // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); | ||
6926 | - // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | ||
6927 | - | ||
6928 | - // } | ||
6929 | - | ||
6930 | - | ||
6931 | - break; | ||
6932 | - | ||
6933 | - } | ||
6934 | - } | ||
6935 | - $scope.OnPaintBrushCanvasMouseUp = function (event) { | ||
6936 | - $rootScope.isMousedownOnPaintCanvas = false; | ||
6937 | - $rootScope.isEraseToolSelected = false; | ||
6938 | - | ||
6939 | - // var canvasElement1 = document.getElementById("canvasPaint"); | ||
6940 | - // var ctx1 = canvasElement1.getContext("2d"); | ||
6941 | - | ||
6942 | - //switch($rootScope.shapeType) | ||
6943 | - //{ | ||
6944 | - | ||
6945 | - // case "FreeStylePaint": | ||
6946 | - | ||
6947 | - | ||
6948 | - // if ($("#amount-2").val() == '') | ||
6949 | - // { | ||
6950 | - // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | ||
6951 | - // } | ||
6952 | - // else | ||
6953 | - // { | ||
6954 | - | ||
6955 | - // var a = $("#amount-2").val(); | ||
6956 | - // $scope.shapesize = parseInt(a); | ||
6957 | - // alert(JSON.stringify({ defaultSize: $scope.shapesize })); | ||
6958 | - // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | ||
6959 | - | ||
6960 | - // } | ||
6961 | - | ||
6962 | - | ||
6963 | - // break; | ||
6964 | - | ||
6965 | - //} | ||
6966 | - | ||
6967 | - } | 6909 | + |
6910 | + | ||
6968 | 6911 | ||
6969 | 6912 | ||
6970 | 6913 | ||
@@ -7314,6 +7257,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -7314,6 +7257,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
7314 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | 7257 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); |
7315 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | 7258 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
7316 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | 7259 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); |
7260 | + | ||
7261 | + | ||
7317 | $rootScope.isLoading = true; | 7262 | $rootScope.isLoading = true; |
7318 | 7263 | ||
7319 | $('#spinner').css('visibility', 'visible'); | 7264 | $('#spinner').css('visibility', 'visible'); |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -64,19 +64,30 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -64,19 +64,30 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
64 | 64 | ||
65 | $rootScope.isEraseToolSelected = false; | 65 | $rootScope.isEraseToolSelected = false; |
66 | $rootScope.isMousedownOnPaintCanvas = false; | 66 | $rootScope.isMousedownOnPaintCanvas = false; |
67 | + //opacity code | ||
68 | + $rootScope.shapestyleOpacity = 1; | ||
69 | + $rootScope.shapestyleFillColor = "#fff"; | ||
70 | + $rootScope.shapestyleFillBorderColor = "black"; | ||
71 | + $rootScope.shapestyleborderWidth = 2; | ||
72 | + $rootScope.shapestyleborderStyles = "solid"; | ||
67 | 73 | ||
68 | $rootScope.$on("$locationChangeSuccess", function () { | 74 | $rootScope.$on("$locationChangeSuccess", function () { |
69 | 75 | ||
70 | - if (($location.url() == "/da-body-view") || ($location.url() == "/clinical-illustrations-detail") || ($location.url() == "/clinical-animations-detail")) { | 76 | + if (($location.url() == "/da-body-view")) { |
71 | $rootScope.disableMenuannotation = " "; | 77 | $rootScope.disableMenuannotation = " "; |
72 | $rootScope.disableMenuoption = " "; | 78 | $rootScope.disableMenuoption = " "; |
73 | 79 | ||
74 | - | 80 | + } |
81 | + else if (($location.url() == "/clinical-illustrations-detail") || ($location.url() == "/clinical-animations-detail")) { | ||
82 | + $rootScope.disableMenuannotation = " "; | ||
83 | + $rootScope.disableMenuoption = " "; | ||
84 | + $rootScope.disableSubMenu = "disableSubMenu"; | ||
75 | } | 85 | } |
76 | else { | 86 | else { |
77 | 87 | ||
78 | $rootScope.disableMenuannotation = "disableMenuannotation"; | 88 | $rootScope.disableMenuannotation = "disableMenuannotation"; |
79 | $rootScope.disableMenuoption = "disableMenuoption"; | 89 | $rootScope.disableMenuoption = "disableMenuoption"; |
90 | + $rootScope.disableSubMenu = ""; | ||
80 | $rootScope.CloseAnnotationTool(); | 91 | $rootScope.CloseAnnotationTool(); |
81 | $rootScope.CloseListManager(); | 92 | $rootScope.CloseListManager(); |
82 | angular.element('#modal-settings').modal('hide'); | 93 | angular.element('#modal-settings').modal('hide'); |
@@ -140,16 +151,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -140,16 +151,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
140 | } | 151 | } |
141 | } | 152 | } |
142 | 153 | ||
143 | - // $rootScope.DrawLine = function () { | ||
144 | - //$rootScope.isIdetifyClicked = false; | ||
145 | - //$rootScope.isDrawingToolSelected = true; | ||
146 | - //$rootScope.isLineDrawSelecyed = true; | ||
147 | - // $rootScope.shapeType = "Line"; | ||
148 | - // alert($rootScope.shapeType); | ||
149 | - | ||
150 | - | ||
151 | - // } | ||
152 | - | ||
153 | $rootScope.ClearIframe = function () { | 154 | $rootScope.ClearIframe = function () { |
154 | if ($('#daImagePanel') != null) | 155 | if ($('#daImagePanel') != null) |
155 | $('#daImagePanel').remove(); | 156 | $('#daImagePanel').remove(); |
@@ -287,14 +288,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -287,14 +288,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
287 | $('#modal-settings').modal('toggle'); | 288 | $('#modal-settings').modal('toggle'); |
288 | } | 289 | } |
289 | 290 | ||
290 | - | ||
291 | } | 291 | } |
292 | 292 | ||
293 | - | ||
294 | - | ||
295 | //----Annotation Toolbar: Jcanvas----- | 293 | //----Annotation Toolbar: Jcanvas----- |
296 | 294 | ||
297 | - $rootScope.DrLine = function (e) { | 295 | + $rootScope.DrawLine = function (e) |
296 | + { | ||
298 | $rootScope.setListManagerZindex = true; | 297 | $rootScope.setListManagerZindex = true; |
299 | $("#canvasPaint").css("display", "block"); | 298 | $("#canvasPaint").css("display", "block"); |
300 | $("#canvas").css("display", "block"); | 299 | $("#canvas").css("display", "block"); |
@@ -302,7 +301,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -302,7 +301,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
302 | $rootScope.switchCanvas(); | 301 | $rootScope.switchCanvas(); |
303 | $rootScope.shapeType = "Line"; | 302 | $rootScope.shapeType = "Line"; |
304 | 303 | ||
305 | - | ||
306 | $('.btnCursor').removeClass('activebtncolor'); | 304 | $('.btnCursor').removeClass('activebtncolor'); |
307 | $(".btn-annotation").removeClass("activebtncolor"); | 305 | $(".btn-annotation").removeClass("activebtncolor"); |
308 | $(".btn-annotation-line").addClass("activebtncolor"); | 306 | $(".btn-annotation-line").addClass("activebtncolor"); |
@@ -311,7 +309,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -311,7 +309,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
311 | } | 309 | } |
312 | 310 | ||
313 | 311 | ||
314 | - $rootScope.DrPin = function (e) { | 312 | + $rootScope.DrawPin = function (e) { |
315 | $("#canvasPaint").css("display", "block"); | 313 | $("#canvasPaint").css("display", "block"); |
316 | $("#canvas").css("display", "block"); | 314 | $("#canvas").css("display", "block"); |
317 | 315 | ||
@@ -386,13 +384,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -386,13 +384,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
386 | 384 | ||
387 | } | 385 | } |
388 | 386 | ||
389 | - | ||
390 | - // $('#canvasPaint').sketch(); | ||
391 | - | ||
392 | - | ||
393 | } | 387 | } |
394 | 388 | ||
395 | - | ||
396 | 389 | ||
397 | } | 390 | } |
398 | 391 | ||
@@ -441,23 +434,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -441,23 +434,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
441 | $('.btnCursor').removeClass('activebtncolor'); | 434 | $('.btnCursor').removeClass('activebtncolor'); |
442 | $(".btn-annotation").removeClass("activebtncolor"); | 435 | $(".btn-annotation").removeClass("activebtncolor"); |
443 | $(".btn-annotation-Text").addClass("activebtncolor"); | 436 | $(".btn-annotation-Text").addClass("activebtncolor"); |
444 | - // $("#text_area").val(''); | ||
445 | - // $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | ||
446 | - } | 437 | + } |
447 | 438 | ||
448 | $rootScope.DrawPolygon = function () { | 439 | $rootScope.DrawPolygon = function () { |
449 | $rootScope.setListManagerZindex = true; | 440 | $rootScope.setListManagerZindex = true; |
450 | $("#canvasPaint").css("display", "block"); | 441 | $("#canvasPaint").css("display", "block"); |
451 | $("#canvas").css("display", "block"); | 442 | $("#canvas").css("display", "block"); |
452 | $rootScope.shapeType = "DrawPolygon"; | 443 | $rootScope.shapeType = "DrawPolygon"; |
453 | - | ||
454 | } | 444 | } |
455 | 445 | ||
456 | 446 | ||
457 | - $rootScope.OpacityModal = function () { | ||
458 | - | ||
459 | - | ||
460 | - } | ||
461 | $rootScope.switchCanvas = function () { | 447 | $rootScope.switchCanvas = function () { |
462 | var x = $('#canvasPaint').css("z-index"); | 448 | var x = $('#canvasPaint').css("z-index"); |
463 | 449 | ||
@@ -473,23 +459,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -473,23 +459,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
473 | $rootScope.switchCanvas(); | 459 | $rootScope.switchCanvas(); |
474 | $rootScope.isEraseToolSelected = true; | 460 | $rootScope.isEraseToolSelected = true; |
475 | //$rootScope.switchCanvasToPaintCanvas(); | 461 | //$rootScope.switchCanvasToPaintCanvas(); |
476 | - //// $('#canvasPaint').sketch({ defaultColor: "yellow", defaultSize: 1 }); | ||
477 | - //var sktch = $('#canvasPaint').sketch(); | ||
478 | - //$('#canvasPaint').sketch().actions = []; // this line empties the actions. | ||
479 | - //var myCanvas = document.getElementById("canvasPaint"); | ||
480 | - //var ctx = myCanvas.getContext('2d'); | ||
481 | - //ctx.clearRect(0, 0, myCanvas.width, myCanvas.height); | ||
482 | - //$rootScope.switchCanvas(); | ||
483 | - | ||
484 | } | 462 | } |
485 | 463 | ||
486 | - //opacity code | ||
487 | - $rootScope.shapestyleOpacity = 1; | ||
488 | - $rootScope.shapestyleFillColor = "#fff"; | ||
489 | - $rootScope.shapestyleFillBorderColor = "black"; | ||
490 | - $rootScope.shapestyleborderWidth = 2; | ||
491 | - $rootScope.shapestyleborderStyles = "solid"; | ||
492 | - $rootScope.shapestyle = function (id) { | 464 | + |
465 | + $rootScope.setPropertiesForShapes = function (id) { | ||
466 | + | ||
493 | 467 | ||
494 | if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { | 468 | if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { |
495 | // $('#btnShapeStyle').attr('disabled', 'disabled'); | 469 | // $('#btnShapeStyle').attr('disabled', 'disabled'); |
@@ -503,22 +477,22 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -503,22 +477,22 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
503 | $rootScope.shapestyleFillColor = $("#" + id).css('background-color'); | 477 | $rootScope.shapestyleFillColor = $("#" + id).css('background-color'); |
504 | $("#shapeStyleDiv").css("background-color", $rootScope.shapestyleFillColor); | 478 | $("#shapeStyleDiv").css("background-color", $rootScope.shapestyleFillColor); |
505 | $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color"); | 479 | $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color"); |
506 | - $("#shapeStyleDiv").parent().css("border-color", $rootScope.shapestyleborderColor); | ||
507 | - $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width"); | ||
508 | - $("#shapeStyleDiv").parent().css("border-width", $rootScope.shapestyleborderWidthSeparatingPixel); | ||
509 | - var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel; | ||
510 | - var intPart = pixelSeparation.split("p"); | ||
511 | - | ||
512 | - $rootScope.shapestyleborderWidth = intPart[0]; | ||
513 | - $rootScope.shapestyleborderStyles = "solid"; | 480 | + // $("#shapeStyleDiv").parent().css("border-color", $rootScope.shapestyleborderColor); |
481 | + $rootScope.borderDimensions = $("#" + id).parent().css("border-top-width"); | ||
482 | + | ||
483 | + document.getElementById("shapeStyleDiv").parentNode.style.border = $rootScope.borderDimensions + " " + "solid" + " " + $rootScope.shapestyleborderColor; | ||
514 | 484 | ||
485 | + // $("#shapeStyleDiv").parent().css("border-width", $rootScope.shapestyleborderWidthSeparatingPixel); | ||
515 | 486 | ||
516 | - $('#editshapestyle').modal('hide'); | ||
517 | - // name: 'Circle_' + $rootScope.resetCircle, | 487 | + var borderDimensions = $rootScope.borderDimensions; |
488 | + var borderDimensionSplitArray = borderDimensions.split("p"); | ||
518 | 489 | ||
490 | + $rootScope.shapestyleborderWidth = borderDimensionSplitArray[0]; | ||
491 | + $rootScope.shapestyleborderStyles = "solid"; | ||
519 | 492 | ||
520 | - // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | ||
521 | 493 | ||
494 | + $('#editshapestyle').modal('hide'); | ||
495 | + | ||
522 | //Edit Shape Style popup should open at it's default position | 496 | //Edit Shape Style popup should open at it's default position |
523 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); | 497 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); |
524 | } | 498 | } |
@@ -527,12 +501,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -527,12 +501,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
527 | $rootScope.enableAnnotationToolBar = function () { | 501 | $rootScope.enableAnnotationToolBar = function () { |
528 | if ($rootScope.disableAnnotationTB == true) { | 502 | if ($rootScope.disableAnnotationTB == true) { |
529 | document.getElementById('modelbackground').style.display = "none"; | 503 | document.getElementById('modelbackground').style.display = "none"; |
530 | - //$("#editshapestyle").modal('show'); | ||
531 | document.getElementById('modeleditstyle').style.display = "none"; | 504 | document.getElementById('modeleditstyle').style.display = "none"; |
532 | } | 505 | } |
533 | else { | 506 | else { |
534 | document.getElementById('modelbackground').style.display = "block"; | 507 | document.getElementById('modelbackground').style.display = "block"; |
535 | - //$("#editshapestyle").modal('show'); | ||
536 | document.getElementById('modeleditstyle').style.display = "block"; | 508 | document.getElementById('modeleditstyle').style.display = "block"; |
537 | if ($('#modeleditstyle').css("display") == "block") { //Check if the modal is already showing | 509 | if ($('#modeleditstyle').css("display") == "block") { //Check if the modal is already showing |
538 | var previewOpacity = $('#imgOpacity').css("opacity"); | 510 | var previewOpacity = $('#imgOpacity').css("opacity"); |
@@ -556,8 +528,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -556,8 +528,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
556 | 528 | ||
557 | $(".custom-tooltip-annotation").css('display', 'none'); | 529 | $(".custom-tooltip-annotation").css('display', 'none'); |
558 | $("#edit-block").removeClass("custom-tooltip-annotation"); | 530 | $("#edit-block").removeClass("custom-tooltip-annotation"); |
559 | - | ||
560 | - | ||
561 | } | 531 | } |
562 | 532 | ||
563 | 533 | ||
@@ -570,299 +540,299 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -570,299 +540,299 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
570 | //Edit Shape Style popup should open at it's default position | 540 | //Edit Shape Style popup should open at it's default position |
571 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); | 541 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); |
572 | 542 | ||
573 | - | ||
574 | } | 543 | } |
575 | 544 | ||
576 | - | ||
577 | 545 | ||
546 | + //--Common code of Annotation Toolbar for CI and DA------- | ||
547 | + $rootScope.DrawLineOnModuleItem = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | ||
548 | + if ($rootScope.isLinePreviewCompleted == true) { | ||
549 | + $rootScope.isLinePreviewCompleted = false; | ||
550 | + $(canvasId).addLayer({ | ||
551 | + name: 'Line_' + LineNumber, | ||
552 | + layer: true, | ||
553 | + type: 'line', | ||
554 | + draggable: true, | ||
555 | + strokeStyle: shapestyleborderColor, | ||
556 | + strokeWidth: shapestyleborderWidth, | ||
557 | + rounded: true, | ||
558 | + x1: offsetX1, y1: offsetY1, | ||
559 | + x2: x, y2: y, | ||
578 | 560 | ||
579 | - //----End------------- | 561 | + click: function (layer) { |
562 | + $rootScope.canvasLayerNameCollection = []; | ||
563 | + $rootScope.canvasLayerNameCollection.push(layer.name); | ||
564 | + $(canvasId).setLayer(layer.name, { | ||
565 | + handle: { | ||
566 | + type: 'arc', | ||
567 | + fillStyle: '#fff', | ||
568 | + strokeStyle: '#c33', | ||
569 | + strokeWidth: 2, | ||
570 | + radius: 3 | ||
571 | + } | ||
572 | + }).drawLayers(); | ||
580 | 573 | ||
581 | - //--Common code of Annotation Toolbar for CI and DA------- | ||
582 | - $rootScope.LineFn = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | ||
583 | - $(canvasId).addLayer({ | ||
584 | - name: 'Line_' + LineNumber, | ||
585 | - layer: true, | ||
586 | - type: 'line', | ||
587 | - draggable: true, | ||
588 | - strokeStyle: shapestyleborderColor, | ||
589 | - strokeWidth: shapestyleborderWidth, | ||
590 | - rounded: true, | ||
591 | - x1: offsetX1, y1: offsetY1, | ||
592 | - x2: x, y2: y, | ||
593 | - | ||
594 | - click: function (layer) { | ||
595 | - $rootScope.canvasLayerNameCollection = []; | ||
596 | - $rootScope.canvasLayerNameCollection.push(layer.name); | ||
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 | - | ||
607 | - | ||
608 | - }, | ||
609 | - mouseout: function (layer) { | ||
610 | - $rootScope.canvasLayerNameCollection = []; | ||
611 | - $(canvasId).setLayer(layer.name, { | ||
612 | - handle: { | ||
613 | - type: 'arc', | ||
614 | - fillStyle: '#fff', | ||
615 | - strokeStyle: '#c33', | ||
616 | - strokeWidth: 0, | ||
617 | - radius: 0 | ||
618 | - } | ||
619 | - | ||
620 | - }).drawLayers(); | ||
621 | - | ||
622 | - }, | ||
623 | - mouseover: function (layer) { | ||
624 | - | ||
625 | - | ||
626 | - $(canvasId).setLayer(layer.name, { | ||
627 | - handle: { | ||
628 | - type: 'arc', | ||
629 | - fillStyle: '#fff', | ||
630 | - strokeStyle: '#c33', | ||
631 | - strokeWidth: 2, | ||
632 | - radius: 3 | ||
633 | - } | ||
634 | - }).drawLayers(); | ||
635 | 574 | ||
636 | - } | 575 | + }, |
576 | + mouseout: function (layer) { | ||
577 | + $rootScope.canvasLayerNameCollection = []; | ||
578 | + $(canvasId).setLayer(layer.name, { | ||
579 | + handle: { | ||
580 | + type: 'arc', | ||
581 | + fillStyle: '#fff', | ||
582 | + strokeStyle: '#c33', | ||
583 | + strokeWidth: 0, | ||
584 | + radius: 0 | ||
585 | + } | ||
586 | + | ||
587 | + }).drawLayers(); | ||
588 | + | ||
589 | + }, | ||
590 | + mouseover: function (layer) { | ||
637 | 591 | ||
638 | - }).drawLayers(); | 592 | + |
593 | + $(canvasId).setLayer(layer.name, { | ||
594 | + handle: { | ||
595 | + type: 'arc', | ||
596 | + fillStyle: '#fff', | ||
597 | + strokeStyle: '#c33', | ||
598 | + strokeWidth: 2, | ||
599 | + radius: 3 | ||
600 | + } | ||
601 | + }).drawLayers(); | ||
602 | + | ||
603 | + } | ||
604 | + | ||
605 | + }).drawLayers(); | ||
606 | + | ||
607 | + } | ||
608 | + | ||
639 | 609 | ||
640 | $('.btnCursor').trigger('click'); | 610 | $('.btnCursor').trigger('click'); |
641 | $(".btn-annotation").removeClass("activebtncolor"); | 611 | $(".btn-annotation").removeClass("activebtncolor"); |
642 | $('.btnCursor').addClass('activebtncolor'); | 612 | $('.btnCursor').addClass('activebtncolor'); |
643 | } | 613 | } |
644 | 614 | ||
645 | - $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | ||
646 | - // alert("offsetX:" + offsetX1 + " offsetY:" + offsetY1 + " x:" + x + " y:" + y); | ||
647 | - $(canvasId).addLayer({ | ||
648 | - layer: true, | ||
649 | - name: 'Rect_' + RectNumber, | ||
650 | - fillStyle: shapestyleFillColor, | ||
651 | - type: 'rectangle', | ||
652 | - draggable: true, | ||
653 | - strokeStyle: shapestyleborderColor, | ||
654 | - opacity: shapestyleOpacity, | ||
655 | - strokeWidth: shapestyleborderWidth, | ||
656 | - x: offsetX1, y: offsetY1, | ||
657 | - width: x - offsetX1, | ||
658 | - height: y - offsetY1, | 615 | + $rootScope.DrawRectangleOnModuleItem = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) { |
616 | + if ($rootScope.isRectanglePreviewCompleted == true) { | ||
617 | + $rootScope.isRectanglePreviewCompleted = false; | ||
618 | + $(canvasId).addLayer({ | ||
619 | + layer: true, | ||
620 | + name: 'Rect_' + RectNumber, | ||
621 | + fillStyle: shapestyleFillColor, | ||
622 | + type: 'rectangle', | ||
623 | + draggable: true, | ||
624 | + strokeStyle: shapestyleborderColor, | ||
625 | + opacity: shapestyleOpacity, | ||
626 | + strokeWidth: shapestyleborderWidth, | ||
627 | + fromCenter: false, | ||
628 | + x: offsetX1, y: offsetY1, | ||
629 | + width: (x - offsetX1), | ||
630 | + height: (y - offsetY1), | ||
659 | 631 | ||
660 | resizeFromCenter: true, | 632 | resizeFromCenter: true, |
661 | 633 | ||
662 | - dblclick: function () { | ||
663 | - // $rootScope.backOpacity(); | ||
664 | - | ||
665 | - }, | ||
666 | - | ||
667 | - click: function (layer) { | ||
668 | - $rootScope.canvasLayerNameCollection = []; | ||
669 | - $rootScope.canvasLayerNameCollection.push(layer.name); | ||
670 | - $(canvasId).setLayer(layer.name, { | ||
671 | - handle: { | ||
672 | - type: 'rectangle', | ||
673 | - fillStyle: '#fff', | ||
674 | - strokeStyle: '#c33', | ||
675 | - strokeWidth: 2, | ||
676 | - width: 5, height: 5, | ||
677 | - cornerRadius: 3 | ||
678 | - } | ||
679 | - }).drawLayers(); | ||
680 | - | ||
681 | - }, | ||
682 | - mouseout: function (layer) { | ||
683 | - $rootScope.canvasLayerNameCollection = []; | ||
684 | - $(canvasId).setLayer(layer.name, { | ||
685 | - handle: { | ||
686 | - type: 'rectangle', | ||
687 | - fillStyle: 'pink', | ||
688 | - strokeStyle: 'yellow', | ||
689 | - strokeWidth: 0, | ||
690 | - width: 0, height: 0, | ||
691 | - cornerRadius: 0 | ||
692 | - } | ||
693 | - | ||
694 | - }).drawLayers(); | ||
695 | - | ||
696 | - }, | ||
697 | - mouseover: function (layer) { | ||
698 | - | ||
699 | - | ||
700 | - $(canvasId).setLayer(layer.name, { | ||
701 | - handle: { | ||
702 | - type: 'rectangle', | ||
703 | - fillStyle: '#fff', | ||
704 | - strokeStyle: '#c33', | ||
705 | - strokeWidth: 2, | ||
706 | - width: 5, height: 5, | ||
707 | - cornerRadius: 3 | ||
708 | - } | ||
709 | - }).drawLayers(); | 634 | + dblclick: function () { |
710 | 635 | ||
711 | - } | ||
712 | - }).drawLayers(); | 636 | + }, |
637 | + | ||
638 | + click: function (layer) { | ||
639 | + $rootScope.canvasLayerNameCollection = []; | ||
640 | + $rootScope.canvasLayerNameCollection.push(layer.name); | ||
641 | + $(canvasId).setLayer(layer.name, { | ||
642 | + handle: { | ||
643 | + type: 'rectangle', | ||
644 | + fillStyle: '#fff', | ||
645 | + strokeStyle: '#c33', | ||
646 | + strokeWidth: 2, | ||
647 | + width: 5, height: 5, | ||
648 | + cornerRadius: 3 | ||
649 | + } | ||
650 | + }).drawLayers(); | ||
651 | + | ||
652 | + }, | ||
653 | + mouseout: function (layer) { | ||
654 | + $rootScope.canvasLayerNameCollection = []; | ||
655 | + $(canvasId).setLayer(layer.name, { | ||
656 | + handle: { | ||
657 | + type: 'rectangle', | ||
658 | + fillStyle: 'pink', | ||
659 | + strokeStyle: 'yellow', | ||
660 | + strokeWidth: 0, | ||
661 | + width: 0, height: 0, | ||
662 | + cornerRadius: 0 | ||
663 | + } | ||
664 | + | ||
665 | + }).drawLayers(); | ||
666 | + | ||
667 | + }, | ||
668 | + mouseover: function (layer) { | ||
713 | 669 | ||
714 | 670 | ||
671 | + $(canvasId).setLayer(layer.name, { | ||
672 | + handle: { | ||
673 | + type: 'rectangle', | ||
674 | + fillStyle: '#fff', | ||
675 | + strokeStyle: '#c33', | ||
676 | + strokeWidth: 2, | ||
677 | + width: 5, height: 5, | ||
678 | + cornerRadius: 3 | ||
679 | + } | ||
680 | + }).drawLayers(); | ||
715 | 681 | ||
682 | + } | ||
683 | + }).drawLayers(); | ||
684 | + } | ||
716 | $('.btnCursor').trigger('click'); | 685 | $('.btnCursor').trigger('click'); |
717 | $(".btn-annotation").removeClass("activebtncolor"); | 686 | $(".btn-annotation").removeClass("activebtncolor"); |
718 | $('.btnCursor').addClass('activebtncolor'); | 687 | $('.btnCursor').addClass('activebtncolor'); |
719 | 688 | ||
720 | } | 689 | } |
721 | 690 | ||
722 | - $rootScope.CircleFn = function (canvasId, CircleNumber, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, offsetX1, offsetY1, x, y) { | 691 | + $rootScope.DrawCircleOnModuleItem = function (canvasId, CircleNumber, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, offsetX1, offsetY1, x, y) { |
692 | + // console.log("up"+ offsetX1 + " " + offsetY1 + " " + (x - offsetX1) + " " + (y - offsetY1)); | ||
693 | + if ($rootScope.isCirclePreviewCompleted == true) { | ||
694 | + $rootScope.isCirclePreviewCompleted = false; | ||
695 | + $(canvasId).addLayer({ | ||
696 | + layer: true, | ||
697 | + name: 'Circle_' + CircleNumber, | ||
698 | + type: 'ellipse', | ||
699 | + opacity: shapestyleOpacity, | ||
700 | + draggable: true, | ||
701 | + strokeStyle: shapestyleborderColor, | ||
702 | + strokeWidth: shapestyleborderWidth, | ||
703 | + fillStyle: shapestyleFillColor, | ||
704 | + fromCenter: false, | ||
705 | + x: (offsetX1), y: (offsetY1), | ||
706 | + width: (x - offsetX1), height: (y - offsetY1), | ||
707 | + // Place a handle at each side and each corner | ||
708 | + handlePlacement: 'both', | ||
709 | + click: function (layer) { | ||
710 | + $rootScope.canvasLayerNameCollection = []; | ||
711 | + $rootScope.canvasLayerNameCollection.push(layer.name); | ||
712 | + $(canvasId).setLayer(layer.name, { | ||
713 | + handle: { | ||
714 | + type: 'arc', | ||
715 | + fillStyle: '#fff', | ||
716 | + strokeStyle: '#c33', | ||
717 | + strokeWidth: 2, | ||
718 | + radius: 3 | ||
719 | + } | ||
720 | + }).drawLayers(); | ||
721 | + | ||
722 | + }, | ||
723 | + mouseout: function (layer) { | ||
724 | + $rootScope.canvasLayerNameCollection = []; | ||
725 | + | ||
726 | + $(canvasId).setLayer(layer.name, { | ||
727 | + handle: { | ||
728 | + type: 'arc', | ||
729 | + fillStyle: '#fff', | ||
730 | + strokeStyle: '#c33', | ||
731 | + strokeWidth: 0, | ||
732 | + // width: 0, height: 0, | ||
733 | + radius: 0 | ||
734 | + } | ||
723 | 735 | ||
724 | - $(canvasId).addLayer({ | ||
725 | - layer: true, | ||
726 | - name: 'Circle_' + CircleNumber, | ||
727 | - type: 'ellipse', | ||
728 | - opacity: shapestyleOpacity, | ||
729 | - draggable: true, | ||
730 | - strokeStyle: shapestyleborderColor, | ||
731 | - strokeWidth: shapestyleborderWidth, | ||
732 | - fillStyle: shapestyleFillColor, | ||
733 | - x: offsetX1, y: offsetY1, | ||
734 | - width: (x - offsetX1) * 2, height: (y - offsetY1) * 2, | ||
735 | - // Place a handle at each side and each corner | ||
736 | - handlePlacement: 'both', | ||
737 | - | ||
738 | - | ||
739 | - | ||
740 | - click: function (layer) { | ||
741 | - | ||
742 | - $rootScope.canvasLayerNameCollection = []; | ||
743 | - $rootScope.canvasLayerNameCollection.push(layer.name); | ||
744 | - $(canvasId).setLayer(layer.name, { | ||
745 | - handle: { | ||
746 | - type: 'arc', | ||
747 | - fillStyle: '#fff', | ||
748 | - strokeStyle: '#c33', | ||
749 | - strokeWidth: 2, | ||
750 | - radius: 3 | ||
751 | - } | ||
752 | - }).drawLayers(); | ||
753 | - | ||
754 | - }, | ||
755 | - mouseout: function (layer) { | ||
756 | - $rootScope.canvasLayerNameCollection = []; | ||
757 | - | ||
758 | - $(canvasId).setLayer(layer.name, { | ||
759 | - handle: { | ||
760 | - type: 'arc', | ||
761 | - fillStyle: '#fff', | ||
762 | - strokeStyle: '#c33', | ||
763 | - strokeWidth: 0, | ||
764 | - // width: 0, height: 0, | ||
765 | - radius: 0 | ||
766 | - } | ||
767 | - | ||
768 | - }).drawLayers(); | ||
769 | - | ||
770 | - }, | ||
771 | - mouseover: function (layer) { | ||
772 | - | ||
773 | - | ||
774 | - $(canvasId).setLayer(layer.name, { | ||
775 | - handle: { | ||
776 | - type: 'arc', | ||
777 | - fillStyle: '#fff', | ||
778 | - strokeStyle: '#c33', | ||
779 | - strokeWidth: 2, | ||
780 | - // width: 5, height: 5, | ||
781 | - radius: 3 | ||
782 | - } | ||
783 | - }).drawLayers(); | 736 | + }).drawLayers(); |
784 | 737 | ||
785 | - } | ||
786 | - }).drawLayers(); | 738 | + }, |
739 | + mouseover: function (layer) { | ||
740 | + | ||
741 | + | ||
742 | + $(canvasId).setLayer(layer.name, { | ||
743 | + handle: { | ||
744 | + type: 'arc', | ||
745 | + fillStyle: '#fff', | ||
746 | + strokeStyle: '#c33', | ||
747 | + strokeWidth: 2, | ||
748 | + // width: 5, height: 5, | ||
749 | + radius: 3 | ||
750 | + } | ||
751 | + }).drawLayers(); | ||
752 | + | ||
753 | + } | ||
754 | + }).drawLayers(); | ||
755 | + } | ||
787 | $('.btnCursor').trigger('click'); | 756 | $('.btnCursor').trigger('click'); |
788 | $(".btn-annotation").removeClass("activebtncolor"); | 757 | $(".btn-annotation").removeClass("activebtncolor"); |
789 | $('.btnCursor').addClass('activebtncolor'); | 758 | $('.btnCursor').addClass('activebtncolor'); |
790 | } | 759 | } |
791 | 760 | ||
792 | - $rootScope.ArrowFn = function (canvasId, ArrowNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { | 761 | + $rootScope.DrawArrowOnModuleItem = function (canvasId, ArrowNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { |
762 | + if ($rootScope.isArrowPreviewCompleted == true) { | ||
763 | + $rootScope.isArrowPreviewCompleted = false; | ||
764 | + $('#canvas').drawLine({ | ||
765 | + layer: true, | ||
766 | + name: 'Arrow_' + ArrowNumber, | ||
767 | + draggable: true, | ||
768 | + strokeStyle: shapestyleborderColor, | ||
769 | + strokeWidth: shapestyleborderWidth, | ||
770 | + rounded: true, | ||
771 | + startArrow: true, | ||
772 | + arrowRadius: 7, | ||
773 | + arrowAngle: 90, | ||
774 | + x1: offsetX1, y1: offsetY1, | ||
775 | + x2: x, y2: y, | ||
793 | 776 | ||
794 | - $('#canvas').drawLine({ | ||
795 | - layer: true, | ||
796 | - name: 'Arrow_' + ArrowNumber, | ||
797 | - draggable: true, | ||
798 | - strokeStyle: shapestyleborderColor, | ||
799 | - strokeWidth: shapestyleborderWidth, | ||
800 | - rounded: true, | ||
801 | - startArrow: true, | ||
802 | - arrowRadius: 7, | ||
803 | - arrowAngle: 90, | ||
804 | - x1: offsetX1, y1: offsetY1, | ||
805 | - x2: x, y2: y, | ||
806 | - | ||
807 | - click: function (layer) { | ||
808 | - $rootScope.canvasLayerNameCollection = []; | ||
809 | - $rootScope.canvasLayerNameCollection.push(layer.name); | ||
810 | - $(canvasId).setLayer(layer.name, { | ||
811 | - handle: { | ||
812 | - type: 'arc', | ||
813 | - fillStyle: '#fff', | ||
814 | - strokeStyle: '#c33', | ||
815 | - strokeWidth: 2, | ||
816 | - // width: 5, height: 5, | ||
817 | - radius: 3 | ||
818 | - } | ||
819 | - }).drawLayers(); | ||
820 | - // $("#canvas").removeLayer(layer.name).drawLayers(); | ||
821 | - | ||
822 | - }, | ||
823 | - mouseout: function (layer) { | ||
824 | - $rootScope.canvasLayerNameCollection = []; | ||
825 | - $(canvasId).setLayer(layer.name, { | ||
826 | - handle: { | ||
827 | - type: 'arc', | ||
828 | - fillStyle: '#fff', | ||
829 | - strokeStyle: '#c33', | ||
830 | - strokeWidth: 0, | ||
831 | - // width: 0, height: 0, | ||
832 | - radius: 0 | ||
833 | - } | ||
834 | - | ||
835 | - }).drawLayers(); | ||
836 | - | ||
837 | - }, | ||
838 | - mouseover: function (layer) { | ||
839 | - | ||
840 | - | ||
841 | - $(canvasId).setLayer(layer.name, { | ||
842 | - handle: { | ||
843 | - type: 'arc', | ||
844 | - fillStyle: '#fff', | ||
845 | - strokeStyle: '#c33', | ||
846 | - strokeWidth: 2, | ||
847 | - // width: 5, height: 5, | ||
848 | - radius: 3 | ||
849 | - } | ||
850 | - }).drawLayers(); | 777 | + click: function (layer) { |
778 | + $rootScope.canvasLayerNameCollection = []; | ||
779 | + $rootScope.canvasLayerNameCollection.push(layer.name); | ||
780 | + $(canvasId).setLayer(layer.name, { | ||
781 | + handle: { | ||
782 | + type: 'arc', | ||
783 | + fillStyle: '#fff', | ||
784 | + strokeStyle: '#c33', | ||
785 | + strokeWidth: 2, | ||
786 | + // width: 5, height: 5, | ||
787 | + radius: 3 | ||
788 | + } | ||
789 | + }).drawLayers(); | ||
790 | + // $("#canvas").removeLayer(layer.name).drawLayers(); | ||
851 | 791 | ||
852 | - } | 792 | + }, |
793 | + mouseout: function (layer) { | ||
794 | + $rootScope.canvasLayerNameCollection = []; | ||
795 | + $(canvasId).setLayer(layer.name, { | ||
796 | + handle: { | ||
797 | + type: 'arc', | ||
798 | + fillStyle: '#fff', | ||
799 | + strokeStyle: '#c33', | ||
800 | + strokeWidth: 0, | ||
801 | + // width: 0, height: 0, | ||
802 | + radius: 0 | ||
803 | + } | ||
853 | 804 | ||
854 | - }); | 805 | + }).drawLayers(); |
806 | + | ||
807 | + }, | ||
808 | + mouseover: function (layer) { | ||
809 | + | ||
810 | + | ||
811 | + $(canvasId).setLayer(layer.name, { | ||
812 | + handle: { | ||
813 | + type: 'arc', | ||
814 | + fillStyle: '#fff', | ||
815 | + strokeStyle: '#c33', | ||
816 | + strokeWidth: 2, | ||
817 | + // width: 5, height: 5, | ||
818 | + radius: 3 | ||
819 | + } | ||
820 | + }).drawLayers(); | ||
821 | + | ||
822 | + } | ||
823 | + | ||
824 | + }); | ||
825 | + } | ||
826 | + | ||
855 | $('.btnCursor').trigger('click'); | 827 | $('.btnCursor').trigger('click'); |
856 | $(".btn-annotation").removeClass("activebtncolor"); | 828 | $(".btn-annotation").removeClass("activebtncolor"); |
857 | $('.btnCursor').addClass('activebtncolor'); | 829 | $('.btnCursor').addClass('activebtncolor'); |
858 | } | 830 | } |
859 | 831 | ||
860 | - $rootScope.PinFn = function (canvasId, PinNumber, offsetX1, offsetY1, x, y, PinArcNumber) { | ||
861 | - | ||
862 | - var xAxisPinDiff = offsetX1 - x; | ||
863 | - var yAxisPinDiff = offsetY1 - y; | ||
864 | - if (xAxisPinDiff != 0 && yAxisPinDiff != 0) | ||
865 | - { | 832 | + $rootScope.DrawPinOnModuleItem = function (canvasId, PinNumber, offsetX1, offsetY1, x, y, PinArcNumber) { |
833 | + | ||
834 | + if ($rootScope.isPinPreviewCompleted == true) { | ||
835 | + $rootScope.isPinPreviewCompleted = false; | ||
866 | var radial = $('#canvas').createGradient({ | 836 | var radial = $('#canvas').createGradient({ |
867 | x1: 50, y1: 50, | 837 | x1: 50, y1: 50, |
868 | x2: 50, y2: 50, | 838 | x2: 50, y2: 50, |
@@ -948,13 +918,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -948,13 +918,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
948 | fillStyle: radial, | 918 | fillStyle: radial, |
949 | x: offsetX1, y: offsetY1, | 919 | x: offsetX1, y: offsetY1, |
950 | radius: 5, | 920 | radius: 5, |
951 | - //handle: { | ||
952 | - // type: 'arc', | ||
953 | - // fillStyle: '#fff', | ||
954 | - // strokeStyle: '#c33', | ||
955 | - // strokeWidth: 2, | ||
956 | - // radius: 3 | ||
957 | - //}, | 921 | + |
958 | 922 | ||
959 | add: function (layer) { | 923 | add: function (layer) { |
960 | 924 | ||
@@ -966,17 +930,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -966,17 +930,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
966 | 930 | ||
967 | }).drawLayers(); | 931 | }).drawLayers(); |
968 | } | 932 | } |
969 | - | 933 | + |
934 | + | ||
970 | $('.btnCursor').trigger('click'); | 935 | $('.btnCursor').trigger('click'); |
971 | $(".btn-annotation").removeClass("activebtncolor"); | 936 | $(".btn-annotation").removeClass("activebtncolor"); |
972 | $('.btnCursor').addClass('activebtncolor'); | 937 | $('.btnCursor').addClass('activebtncolor'); |
973 | } | 938 | } |
974 | 939 | ||
975 | - $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) { | ||
976 | - | ||
977 | - | ||
978 | - debugger; | ||
979 | - | 940 | + $rootScope.TextEditorFunctionality = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) { |
941 | + if ($rootScope.isTextAreaPreviewCompleted == true) { | ||
942 | + $rootScope.isTextAreaPreviewCompleted = false; | ||
980 | $('#canvas').drawText({ | 943 | $('#canvas').drawText({ |
981 | layer: true, | 944 | layer: true, |
982 | draggable: true, | 945 | draggable: true, |
@@ -987,6 +950,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -987,6 +950,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
987 | fillStyle: '#36c', | 950 | fillStyle: '#36c', |
988 | strokeWidth: 0, | 951 | strokeWidth: 0, |
989 | x: $rootScope.offsetX1, y: $rootScope.offsetY1, | 952 | x: $rootScope.offsetX1, y: $rootScope.offsetY1, |
953 | + fromCenter: false, | ||
990 | fontSize: '14pt', | 954 | fontSize: '14pt', |
991 | align: "left", | 955 | align: "left", |
992 | fontFamily: 'Verdana, sans-serif', | 956 | fontFamily: 'Verdana, sans-serif', |
@@ -998,117 +962,119 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -998,117 +962,119 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
998 | 962 | ||
999 | 963 | ||
1000 | }) | 964 | }) |
1001 | - // Draw rect as wide as the text | ||
1002 | - .drawRect({ | ||
1003 | - layer: true, | ||
1004 | - name: "TextRect_" + $rootScope.TextNumber, | ||
1005 | - dragGroups: ['shapes'], | ||
1006 | - opacity: $rootScope.shapestyleOpacity, | ||
1007 | - strokeStyle: $rootScope.shapestyleborderColor, | ||
1008 | - strokeWidth: $rootScope.shapestyleborderWidth, | ||
1009 | - fillStyle: $rootScope.shapestyleFillColor, | ||
1010 | - x: $rootScope.offsetX1, y: $rootScope.offsetY1, | ||
1011 | - width: $rootScope.x - $rootScope.offsetX1, | ||
1012 | - height: $rootScope.y - $rootScope.offsetY1, | ||
1013 | - add: function (layer) { | ||
1014 | - | ||
1015 | - $rootScope.TextAreaRectID = layer.name; | ||
1016 | - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | ||
1017 | - $rootScope.CurrentWidth = layer.width; | ||
1018 | - $rootScope.CurrentHeight = layer.height; | ||
1019 | - | ||
1020 | - }, | ||
1021 | - click: function (layer) { | ||
1022 | - | ||
1023 | - $rootScope.canvasLayerNameCollection = []; | ||
1024 | - $rootScope.canvasLayerNameCollection.push(layer.name); | ||
1025 | - $('#canvas').setLayer(layer.name, { | ||
1026 | - handle: { | ||
1027 | - type: 'rectangle', | ||
1028 | - fillStyle: '#fff', | ||
1029 | - strokeStyle: '#c33', | ||
1030 | - strokeWidth: 2, | ||
1031 | - width: 5, height: 5, | ||
1032 | - cornerRadius: 3 | ||
1033 | - } | ||
1034 | - }).drawLayers(); | ||
1035 | - | ||
1036 | - }, | ||
1037 | - dblclick: function (layer) { | ||
1038 | - | ||
1039 | - $rootScope.IsTextAlreadySave = false; | ||
1040 | - var RectNameArray = (layer.name).split("_"); | ||
1041 | - | ||
1042 | - var TextAreaRectangleName = "TextArea_"; | ||
1043 | - var TextAreaRectNameConcat = TextAreaRectangleName.concat(RectNameArray[1]); | ||
1044 | - $rootScope.TextAreaRectID = layer.name; | ||
1045 | - $rootScope.TextID = TextAreaRectNameConcat; | ||
1046 | - | ||
1047 | - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | ||
1048 | - $("#annotationTextModal").css("padding-right", "0px"); | ||
1049 | - document.getElementById('modelbackground').style.display = "block"; | ||
1050 | - $("#annotationTextModal").modal("toggle"); | ||
1051 | - | ||
1052 | - $("#text_area").val(''); | ||
1053 | - $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | ||
1054 | - $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | ||
1055 | - // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | ||
1056 | - | ||
1057 | - $("#selected-font-family option:eq(0)").prop('selected', true); | ||
1058 | - $("#selected-font-size option:eq(0)").prop('selected', true); | ||
1059 | - | ||
1060 | - $("#text-italic").removeClass("ActiveFormattingButtonClass"); | ||
1061 | - | ||
1062 | - $("#text-bold").removeClass("ActiveFormattingButtonClass"); | ||
1063 | - | ||
1064 | - $("#text-underline").removeClass("ActiveFormattingButtonClass"); | ||
1065 | - | ||
1066 | - $("#text-left").removeClass("ActiveFormattingButtonClass"); | ||
1067 | - | ||
1068 | - $("#text-right").removeClass("ActiveFormattingButtonClass"); | ||
1069 | - | ||
1070 | - $("#text-center").removeClass("ActiveFormattingButtonClass"); | ||
1071 | - | ||
1072 | - }, | ||
1073 | - mouseout: function (layer) { | ||
1074 | - $rootScope.canvasLayerNameCollection = []; | ||
1075 | - $('#canvas').setLayer(layer.name, { | ||
1076 | - handle: { | ||
1077 | - type: 'rectangle', | ||
1078 | - fillStyle: 'pink', | ||
1079 | - strokeStyle: 'yellow', | ||
1080 | - strokeWidth: 0, | ||
1081 | - width: 0, height: 0, | ||
1082 | - cornerRadius: 0 | ||
1083 | - } | ||
1084 | - | ||
1085 | - }).drawLayers(); | ||
1086 | - | ||
1087 | - }, | ||
1088 | - mouseover: function (layer) { | ||
1089 | - | ||
1090 | - $('#canvas').setLayer(layer.name, { | ||
1091 | - handle: { | ||
1092 | - type: 'rectangle', | ||
1093 | - fillStyle: '#fff', | ||
1094 | - strokeStyle: '#c33', | ||
1095 | - strokeWidth: 2, | ||
1096 | - width: 5, height: 5, | ||
1097 | - cornerRadius: 3 | ||
1098 | - } | ||
1099 | - }).drawLayers(); | ||
1100 | - | ||
1101 | - } | ||
1102 | - }); | 965 | + // Draw rect as wide as the text |
966 | + .drawRect({ | ||
967 | + layer: true, | ||
968 | + name: "TextRect_" + $rootScope.TextNumber, | ||
969 | + dragGroups: ['shapes'], | ||
970 | + opacity: $rootScope.shapestyleOpacity, | ||
971 | + strokeStyle: $rootScope.shapestyleborderColor, | ||
972 | + fromCenter: false, | ||
973 | + strokeWidth: $rootScope.shapestyleborderWidth, | ||
974 | + fillStyle: $rootScope.shapestyleFillColor, | ||
975 | + x: $rootScope.offsetX1, y: $rootScope.offsetY1, | ||
976 | + width: ($rootScope.x - $rootScope.offsetX1), | ||
977 | + height: ($rootScope.y - $rootScope.offsetY1), | ||
978 | + add: function (layer) { | ||
979 | + | ||
980 | + $rootScope.TextAreaRectID = layer.name; | ||
981 | + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | ||
982 | + // $rootScope.CurrentWidth = layer.width; | ||
983 | + // $rootScope.CurrentHeight = layer.height; | ||
984 | + | ||
985 | + }, | ||
986 | + click: function (layer) { | ||
987 | + | ||
988 | + $rootScope.canvasLayerNameCollection = []; | ||
989 | + $rootScope.canvasLayerNameCollection.push(layer.name); | ||
990 | + $('#canvas').setLayer(layer.name, { | ||
991 | + handle: { | ||
992 | + type: 'rectangle', | ||
993 | + fillStyle: '#fff', | ||
994 | + strokeStyle: '#c33', | ||
995 | + strokeWidth: 2, | ||
996 | + width: 5, height: 5, | ||
997 | + cornerRadius: 3 | ||
998 | + } | ||
999 | + }).drawLayers(); | ||
1000 | + | ||
1001 | + }, | ||
1002 | + dblclick: function (layer) { | ||
1003 | + | ||
1004 | + $rootScope.IsTextAlreadySave = false; | ||
1005 | + var RectNameArray = (layer.name).split("_"); | ||
1006 | + | ||
1007 | + var TextAreaRectangleName = "TextArea_"; | ||
1008 | + var TextAreaRectNameConcat = TextAreaRectangleName.concat(RectNameArray[1]); | ||
1009 | + $rootScope.TextAreaRectID = layer.name; | ||
1010 | + $rootScope.TextID = TextAreaRectNameConcat; | ||
1011 | + | ||
1012 | + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | ||
1013 | + $("#annotationTextModal").css("padding-right", "0px"); | ||
1014 | + document.getElementById('modelbackground').style.display = "block"; | ||
1015 | + $("#annotationTextModal").modal("toggle"); | ||
1016 | + | ||
1017 | + $("#text_area").val(''); | ||
1018 | + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); | ||
1019 | + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | ||
1020 | + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | ||
1021 | + | ||
1022 | + $("#selected-font-family option:eq(0)").prop('selected', true); | ||
1023 | + $("#selected-font-size option:eq(0)").prop('selected', true); | ||
1024 | + | ||
1025 | + $("#text-italic").removeClass("ActiveFormattingButtonClass"); | ||
1026 | + | ||
1027 | + $("#text-bold").removeClass("ActiveFormattingButtonClass"); | ||
1028 | + | ||
1029 | + $("#text-underline").removeClass("ActiveFormattingButtonClass"); | ||
1030 | + | ||
1031 | + $("#text-left").removeClass("ActiveFormattingButtonClass"); | ||
1032 | + | ||
1033 | + $("#text-right").removeClass("ActiveFormattingButtonClass"); | ||
1034 | + | ||
1035 | + $("#text-center").removeClass("ActiveFormattingButtonClass"); | ||
1036 | + | ||
1037 | + }, | ||
1038 | + mouseout: function (layer) { | ||
1039 | + $rootScope.canvasLayerNameCollection = []; | ||
1040 | + $('#canvas').setLayer(layer.name, { | ||
1041 | + handle: { | ||
1042 | + type: 'rectangle', | ||
1043 | + fillStyle: 'pink', | ||
1044 | + strokeStyle: 'yellow', | ||
1045 | + strokeWidth: 0, | ||
1046 | + width: 0, height: 0, | ||
1047 | + cornerRadius: 0 | ||
1048 | + } | ||
1049 | + | ||
1050 | + }).drawLayers(); | ||
1051 | + | ||
1052 | + }, | ||
1053 | + mouseover: function (layer) { | ||
1054 | + | ||
1055 | + $('#canvas').setLayer(layer.name, { | ||
1056 | + handle: { | ||
1057 | + type: 'rectangle', | ||
1058 | + fillStyle: '#fff', | ||
1059 | + strokeStyle: '#c33', | ||
1060 | + strokeWidth: 2, | ||
1061 | + width: 5, height: 5, | ||
1062 | + cornerRadius: 3 | ||
1063 | + } | ||
1064 | + }).drawLayers(); | ||
1065 | + | ||
1066 | + } | ||
1067 | + }); | ||
1068 | + | ||
1069 | + | ||
1070 | + | ||
1103 | // Annotation: Edit Text option is missing. | 1071 | // Annotation: Edit Text option is missing. |
1104 | - // alert($rootScope.CurrentWidth); | ||
1105 | - // alert($rootScope.CurrentHeight); | ||
1106 | $("#annotationTextModal").css("padding-right", "0px"); | 1072 | $("#annotationTextModal").css("padding-right", "0px"); |
1107 | - if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) { | ||
1108 | - $("#annotationTextModal").modal("toggle"); | ||
1109 | - document.getElementById('modelbackground').style.display = "block"; | ||
1110 | - } | ||
1111 | - $('.btnCursor').trigger('click'); | 1073 | + $("#annotationTextModal").modal("toggle"); |
1074 | + document.getElementById('modelbackground').style.display = "block"; | ||
1075 | + | ||
1076 | + } | ||
1077 | + $('.btnCursor').trigger('click'); | ||
1112 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); | 1078 | $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); |
1113 | 1079 | ||
1114 | $("#text_area").val(''); | 1080 | $("#text_area").val(''); |
@@ -1136,8 +1102,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1136,8 +1102,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1136 | 1102 | ||
1137 | $('.btnCursor').addClass('activebtncolor'); | 1103 | $('.btnCursor').addClass('activebtncolor'); |
1138 | 1104 | ||
1139 | - | ||
1140 | - | ||
1141 | } | 1105 | } |
1142 | 1106 | ||
1143 | 1107 | ||
@@ -1159,15 +1123,18 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1159,15 +1123,18 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1159 | // var y = event.clientY; | 1123 | // var y = event.clientY; |
1160 | $rootScope.offsetX1 = 0; | 1124 | $rootScope.offsetX1 = 0; |
1161 | $rootScope.offsetY1 = 0; | 1125 | $rootScope.offsetY1 = 0; |
1126 | + //alert($location.path()); | ||
1127 | + | ||
1128 | + var canvasDiv = document.getElementById('canvasDiv'); | ||
1129 | + var verticalScrollPosition = canvasDiv.scrollTop; | ||
1130 | + var horizontlScrollPosition = canvasDiv.scrollLeft; | ||
1162 | $rootScope.offsetX1 = event.offsetX; | 1131 | $rootScope.offsetX1 = event.offsetX; |
1163 | $rootScope.offsetY1 = event.offsetY; | 1132 | $rootScope.offsetY1 = event.offsetY; |
1164 | - | ||
1165 | ctx.clearRect(0, 0, 2277, 3248); | 1133 | ctx.clearRect(0, 0, 2277, 3248); |
1166 | $rootScope.clicked = true; | 1134 | $rootScope.clicked = true; |
1167 | - | ||
1168 | // alert("x:"+$rootScope.offsetX1 + " y:" + $rootScope.offsetY1); | 1135 | // alert("x:"+$rootScope.offsetX1 + " y:" + $rootScope.offsetY1); |
1136 | + canvasElement.addEventListener('mousemove', $rootScope.OnPaintCanvasMouseMove, false); | ||
1169 | } | 1137 | } |
1170 | - | ||
1171 | $rootScope.rectNumber = 0; | 1138 | $rootScope.rectNumber = 0; |
1172 | $rootScope.LineNumber = 0; | 1139 | $rootScope.LineNumber = 0; |
1173 | $rootScope.CircleNumber = 0; | 1140 | $rootScope.CircleNumber = 0; |
@@ -1184,98 +1151,157 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1184,98 +1151,157 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1184 | var arrayRect = {}; | 1151 | var arrayRect = {}; |
1185 | 1152 | ||
1186 | var storeLine = ''; | 1153 | var storeLine = ''; |
1187 | - //$rootScope.canvasLayerNameCollection1 = []; | 1154 | + |
1188 | $rootScope.OnPaintCanvasMouseUp = function (event) { | 1155 | $rootScope.OnPaintCanvasMouseUp = function (event) { |
1189 | 1156 | ||
1190 | if (!$rootScope.clicked) { | 1157 | if (!$rootScope.clicked) { |
1191 | return; | 1158 | return; |
1192 | } | 1159 | } |
1160 | + var AnnotationCanvas = document.getElementById('canvas'); | ||
1161 | + AnnotationCanvas.removeEventListener('mousemove', $rootScope.OnPaintCanvasMouseMove, false); | ||
1162 | + | ||
1163 | + $(".line").remove(); | ||
1164 | + $(".arrow").remove(); | ||
1165 | + $(".pin").remove(); | ||
1166 | + $(".circle").remove(); | ||
1167 | + $(".rectangle").remove(); | ||
1168 | + $(".textarea").remove(); | ||
1193 | $rootScope.clicked = false; | 1169 | $rootScope.clicked = false; |
1194 | $rootScope.x = 0; | 1170 | $rootScope.x = 0; |
1195 | $rootScope.y = 0; | 1171 | $rootScope.y = 0; |
1196 | - | ||
1197 | - $rootScope.x = parseInt(event.clientX - ($("#canvas").offset().left)); | ||
1198 | - $rootScope.y = parseInt(event.clientY - ($("#canvas").offset().top)); | ||
1199 | - | ||
1200 | - | 1172 | + var canvasDiv = document.getElementById('canvasDiv'); |
1173 | + var verticalScrollPosition = canvasDiv.scrollTop; | ||
1174 | + var horizontlScrollPosition = canvasDiv.scrollLeft; | ||
1175 | + $rootScope.x = event.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left; | ||
1176 | + $rootScope.y = event.pageY + verticalScrollPosition - $('#canvasDiv').offset().top; | ||
1201 | var canvasElement = document.getElementById("canvas"); | 1177 | var canvasElement = document.getElementById("canvas"); |
1202 | var ctx = canvasElement.getContext("2d"); | 1178 | var ctx = canvasElement.getContext("2d"); |
1203 | - | ||
1204 | var canvasPaintElement = document.getElementById("canvasPaint"); | 1179 | var canvasPaintElement = document.getElementById("canvasPaint"); |
1205 | var PaintCanvasctx = canvasPaintElement.getContext("2d"); | 1180 | var PaintCanvasctx = canvasPaintElement.getContext("2d"); |
1206 | - | ||
1207 | - | ||
1208 | switch ($rootScope.shapeType) { | 1181 | switch ($rootScope.shapeType) { |
1209 | - | ||
1210 | case "cursor": | 1182 | case "cursor": |
1211 | - // ctx.clearRect(0, 0, 2277, 3248); | ||
1212 | ctx.beginPath(); | 1183 | ctx.beginPath(); |
1213 | PaintCanvasctx.beginPath(); | 1184 | PaintCanvasctx.beginPath(); |
1214 | - | ||
1215 | - | ||
1216 | break; | 1185 | break; |
1217 | - | ||
1218 | case "Line": | 1186 | case "Line": |
1219 | - //$rootScope.canvasLayerNameCollection = []; | ||
1220 | $rootScope.LineNumber = $rootScope.ObjectIndex++; | 1187 | $rootScope.LineNumber = $rootScope.ObjectIndex++; |
1221 | - | ||
1222 | - $rootScope.LineFn('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y) | ||
1223 | - | 1188 | + // $rootScope.isLinePreviewCompleted = true; |
1189 | + $rootScope.DrawLineOnModuleItem('#canvas', $rootScope.LineNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y) | ||
1224 | break; | 1190 | break; |
1225 | - | ||
1226 | case "Rectangle": | 1191 | case "Rectangle": |
1227 | $rootScope.rectNumber = $rootScope.ObjectIndex++; | 1192 | $rootScope.rectNumber = $rootScope.ObjectIndex++; |
1228 | - $rootScope.RectangleFn('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | 1193 | + // $rootScope.isRectanglePreviewCompleted = true; |
1194 | + $rootScope.DrawRectangleOnModuleItem('#canvas', $rootScope.rectNumber, $rootScope.shapestyleFillColor, $rootScope.shapestyleborderColor, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | ||
1229 | 1195 | ||
1230 | break; | 1196 | break; |
1231 | - | ||
1232 | case "Circle": | 1197 | case "Circle": |
1233 | - // alert($rootScope.shapestyleborderWidth); | ||
1234 | $rootScope.CircleNumber = $rootScope.ObjectIndex++; | 1198 | $rootScope.CircleNumber = $rootScope.ObjectIndex++; |
1235 | - | ||
1236 | - $rootScope.CircleFn('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | 1199 | + // $rootScope.isCirclePreviewCompleted = true; |
1200 | + $rootScope.DrawCircleOnModuleItem('#canvas', $rootScope.CircleNumber, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | ||
1237 | break; | 1201 | break; |
1238 | case "Arrow": | 1202 | case "Arrow": |
1239 | $rootScope.ArrowNumber = $rootScope.ObjectIndex++; | 1203 | $rootScope.ArrowNumber = $rootScope.ObjectIndex++; |
1240 | - | ||
1241 | - $rootScope.ArrowFn('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | ||
1242 | - | ||
1243 | - // $scope.resetRect += 1; | 1204 | + //$rootScope.isArrowPreviewCompleted = true; |
1205 | + $rootScope.DrawArrowOnModuleItem('#canvas', $rootScope.ArrowNumber, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y); | ||
1244 | break; | 1206 | break; |
1245 | case "Pin": | 1207 | case "Pin": |
1246 | $rootScope.PinNumber = $rootScope.PinObjectIndex++; | 1208 | $rootScope.PinNumber = $rootScope.PinObjectIndex++; |
1247 | $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++; | 1209 | $rootScope.PinArcNumber = $rootScope.ArcObjectIndex++; |
1248 | - $rootScope.PinFn('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber); | ||
1249 | 1210 | ||
1211 | + //$rootScope.isPinPreviewCompleted = true; | ||
1212 | + | ||
1213 | + $rootScope.DrawPinOnModuleItem('#canvas', $rootScope.PinNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.x, $rootScope.y, $rootScope.PinArcNumber); | ||
1250 | break; | 1214 | break; |
1251 | case "TextArea": | 1215 | case "TextArea": |
1252 | - | ||
1253 | $rootScope.IsTextAlreadySave = false; | 1216 | $rootScope.IsTextAlreadySave = false; |
1254 | $("#text_area").val(''); | 1217 | $("#text_area").val(''); |
1255 | // Draw text | 1218 | // Draw text |
1256 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; | 1219 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; |
1257 | $rootScope.TextNumber = $rootScope.ObjectIndex++; | 1220 | $rootScope.TextNumber = $rootScope.ObjectIndex++; |
1258 | - $rootScope.TextAreaFn('#canvas', $rootScope.TextNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.resetTextRect, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.x, $rootScope.y); | 1221 | + // $rootScope.isTextAreaPreviewCompleted = true; |
1222 | + $rootScope.TextEditorFunctionality('#canvas', $rootScope.TextNumber, $rootScope.offsetX1, $rootScope.offsetY1, $rootScope.resetTextRect, $rootScope.shapestyleOpacity, $rootScope.shapestyleborderColor, $rootScope.shapestyleborderWidth, $rootScope.shapestyleFillColor, $rootScope.x, $rootScope.y); | ||
1259 | break; | 1223 | break; |
1260 | - | ||
1261 | case "DrawPolygon": | 1224 | case "DrawPolygon": |
1262 | - | ||
1263 | break; | 1225 | break; |
1264 | 1226 | ||
1265 | } | 1227 | } |
1266 | //} | 1228 | //} |
1267 | 1229 | ||
1268 | } | 1230 | } |
1269 | - | ||
1270 | - | ||
1271 | - | ||
1272 | - | ||
1273 | - | 1231 | + $rootScope.OnPaintCanvasMouseMove = function (event) { |
1232 | + var canvasDiv = document.getElementById('canvasDiv'); | ||
1233 | + var verticalScrollPosition = canvasDiv.scrollTop; | ||
1234 | + var horizontlScrollPosition = canvasDiv.scrollLeft; | ||
1235 | + $rootScope.MouseMoveXAxis = event.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left; | ||
1236 | + $rootScope.MouseMoveYAxis = event.pageY + verticalScrollPosition - $('#canvasDiv').offset().top; | ||
1237 | + switch ($rootScope.shapeType) { | ||
1238 | + case "Line": | ||
1239 | + $(".line").remove(); | ||
1240 | + $rootScope.isLinePreviewCompleted = true; | ||
1241 | + $("#canvasDiv").append("<div class='line' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;'></div>"); | ||
1242 | + $rootScope.Annotationangle(); | ||
1243 | + break; | ||
1244 | + case "Arrow": | ||
1245 | + $(".arrow").remove(); | ||
1246 | + $rootScope.isArrowPreviewCompleted = true; | ||
1247 | + $("#canvasDiv").append("<div class='arrow' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div style='border-bottom: 9px solid transparent;border-right: 12px dashed #ccc;border-top: 7px solid transparent;height: 0;left: -6px;position: absolute;top: -8px;width: 0;'></div></div>"); | ||
1248 | + $rootScope.Annotationangle(); | ||
1249 | + break; | ||
1250 | + case "Pin": | ||
1251 | + $(".pin").remove(); | ||
1252 | + $rootScope.isPinPreviewCompleted = true; | ||
1253 | + $("#canvasDiv").append("<div class='pin' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1) + "px;'><div style='background-color:#fff;left: -8px;position: absolute;top: -6px;width: 10;height:12px;width:12px;border:2px dashed #808080;border-radius:50%;'></div></div>"); | ||
1254 | + $rootScope.Annotationangle(); | ||
1255 | + break; | ||
1256 | + case "Circle": | ||
1257 | + $(".circle").remove(); | ||
1258 | + $rootScope.isCirclePreviewCompleted = true; | ||
1259 | + $("#canvasDiv").append("<div class='circle' style='border-radius:50%;border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); | ||
1260 | + break; | ||
1261 | + case "Rectangle": | ||
1262 | + $(".rectangle").remove(); | ||
1263 | + $rootScope.isRectanglePreviewCompleted = true; | ||
1264 | + $("#canvasDiv").append("<div class='rectangle' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); | ||
1265 | + break; | ||
1266 | + case "TextArea": | ||
1267 | + $(".textarea").remove(); | ||
1268 | + $rootScope.isTextAreaPreviewCompleted = true; | ||
1269 | + $("#canvasDiv").append("<div class='textarea' style='border:1px dashed #000000;position:absolute;left:" + $rootScope.offsetX1 + "px;top:" + $rootScope.offsetY1 + "px;width:" + (Math.abs($rootScope.MouseMoveXAxis - $rootScope.offsetX1)) + "px;height:" + (Math.abs($rootScope.MouseMoveYAxis - $rootScope.offsetY1)) + "px;'></div>"); | ||
1270 | + break; | ||
1271 | + } | ||
1272 | + } | ||
1273 | + $rootScope.Annotationangle = function (event) { | ||
1274 | + var dy = $rootScope.MouseMoveYAxis - $rootScope.offsetY1; | ||
1275 | + var dx = $rootScope.MouseMoveXAxis - $rootScope.offsetX1; | ||
1276 | + var theta = 0; | ||
1277 | + if (dx < 0) { | ||
1278 | + theta = Math.atan(dy / dx) * (180 / Math.PI); | ||
1279 | + theta = theta + 180; | ||
1280 | + } | ||
1281 | + else if (dy < 0) { | ||
1282 | + theta = Math.atan(dy / dx) * (180 / Math.PI); | ||
1283 | + theta = theta + 360; | ||
1284 | + } | ||
1285 | + else { | ||
1286 | + theta = Math.atan(dy / dx) * (180 / Math.PI); | ||
1287 | + } | ||
1288 | + var dottedLineWidth = Math.sqrt(($rootScope.offsetX1 - $rootScope.MouseMoveXAxis) * ($rootScope.offsetX1 - $rootScope.MouseMoveXAxis) + ($rootScope.offsetY1 - $rootScope.MouseMoveYAxis) * ($rootScope.offsetY1 - $rootScope.MouseMoveYAxis)); | ||
1289 | + switch ($rootScope.shapeType) { | ||
1290 | + case "Line": | ||
1291 | + $('.line').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' }); | ||
1292 | + break; | ||
1293 | + case "Arrow": | ||
1294 | + $('.arrow').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' }); | ||
1295 | + break; | ||
1296 | + case "Pin": | ||
1297 | + $('.pin').css({ 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%', 'width': dottedLineWidth + 'px' }); | ||
1298 | + break; | ||
1299 | + } | ||
1300 | + } | ||
1274 | 1301 | ||
1275 | ///----- | 1302 | ///----- |
1276 | - | ||
1277 | $rootScope.saveText = function () { | 1303 | $rootScope.saveText = function () { |
1278 | - debugger; | 1304 | + |
1279 | document.getElementById('modelbackground').style.display = "none"; | 1305 | document.getElementById('modelbackground').style.display = "none"; |
1280 | // this part will work first time when save button will be clicked | 1306 | // this part will work first time when save button will be clicked |
1281 | if ($rootScope.IsTextAlreadySave == false) { | 1307 | if ($rootScope.IsTextAlreadySave == false) { |
@@ -1290,15 +1316,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1290,15 +1316,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1290 | $rootScope.textArea = $("#text_area").val(); | 1316 | $rootScope.textArea = $("#text_area").val(); |
1291 | 1317 | ||
1292 | // deleting previous text area | 1318 | // deleting previous text area |
1293 | - | ||
1294 | - | ||
1295 | $("#canvas").removeLayer($rootScope.TextID).drawLayers(); | 1319 | $("#canvas").removeLayer($rootScope.TextID).drawLayers(); |
1296 | $("#canvas").removeLayer($rootScope.TextAreaRectID).drawLayers(); | 1320 | $("#canvas").removeLayer($rootScope.TextAreaRectID).drawLayers(); |
1297 | - | ||
1298 | - | ||
1299 | - // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers(); | ||
1300 | - // $("#canvas").removeLayer("TextRect_" + $rootScope.TextNumber).drawLayers(); | ||
1301 | - | ||
1302 | // Text After Saving in Rectangle | 1321 | // Text After Saving in Rectangle |
1303 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; | 1322 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; |
1304 | $('#canvas').drawText({ | 1323 | $('#canvas').drawText({ |
@@ -1310,6 +1329,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1310,6 +1329,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1310 | fillStyle: $rootScope.fontColor, | 1329 | fillStyle: $rootScope.fontColor, |
1311 | fontStyle: $rootScope.fontWeight + " " + $rootScope.fontStyle, | 1330 | fontStyle: $rootScope.fontWeight + " " + $rootScope.fontStyle, |
1312 | fontSize: $rootScope.fontSizes, | 1331 | fontSize: $rootScope.fontSizes, |
1332 | + fromCenter: false, | ||
1313 | fontFamily: $rootScope.fontFamily, | 1333 | fontFamily: $rootScope.fontFamily, |
1314 | align: $rootScope.textAlignmt, | 1334 | align: $rootScope.textAlignmt, |
1315 | strokeWidth: 0, | 1335 | strokeWidth: 0, |
@@ -1333,6 +1353,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1333,6 +1353,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1333 | opacity: $rootScope.shapestyleOpacity, | 1353 | opacity: $rootScope.shapestyleOpacity, |
1334 | strokeStyle: $rootScope.shapestyleborderColor, | 1354 | strokeStyle: $rootScope.shapestyleborderColor, |
1335 | strokeWidth: $rootScope.shapestyleborderWidth, | 1355 | strokeWidth: $rootScope.shapestyleborderWidth, |
1356 | + fromCenter: false, | ||
1336 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | 1357 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, |
1337 | width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | 1358 | width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, |
1338 | height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | 1359 | height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, |
@@ -1365,31 +1386,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1365,31 +1386,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1365 | var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); | 1386 | var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); |
1366 | var TextAreaRectName = "TextAreaNew_"; | 1387 | var TextAreaRectName = "TextAreaNew_"; |
1367 | var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]); | 1388 | var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]); |
1368 | - // alert(TextAreaRectNameConcatenated); | ||
1369 | - //if (_rectLayerOnSaveSplit[1]%2 == 0) | ||
1370 | - //{ | ||
1371 | - // _rectLayerOnSaveSplit[1] = _rectLayerOnSaveSplit[1] - 1; | ||
1372 | - | ||
1373 | - //} | ||
1374 | - //else | ||
1375 | - //{ | ||
1376 | - | ||
1377 | - // _rectLayerOnSaveSplit[1] = _rectLayerOnSaveSplit[1]; | ||
1378 | - //} | ||
1379 | 1389 | ||
1380 | $rootScope.layerNameArr = layer.name; | 1390 | $rootScope.layerNameArr = layer.name; |
1381 | $rootScope.rectTextArr = TextAreaRectNameConcatenated; | 1391 | $rootScope.rectTextArr = TextAreaRectNameConcatenated; |
1382 | 1392 | ||
1383 | 1393 | ||
1384 | $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | 1394 | $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); |
1385 | - // var _rectLayerOnSaveSplitInt; | ||
1386 | - | ||
1387 | - | ||
1388 | - // _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); | ||
1389 | - | ||
1390 | - //alert(_rectLayerOnSaveSplitInt); | ||
1391 | - // alert($rootScope.TextPropertyArray.length); | ||
1392 | - | ||
1393 | 1395 | ||
1394 | for (var i = 0; i <= $rootScope.TextPropertyArray.length - 1; i++) { | 1396 | for (var i = 0; i <= $rootScope.TextPropertyArray.length - 1; i++) { |
1395 | if ($rootScope.TextPropertyArray[i].layerName == TextAreaRectNameConcatenated) { | 1397 | if ($rootScope.TextPropertyArray[i].layerName == TextAreaRectNameConcatenated) { |
@@ -1418,14 +1420,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1418,14 +1420,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1418 | CurrentFontFamily = ''; | 1420 | CurrentFontFamily = ''; |
1419 | CurrentFontSize = ''; | 1421 | CurrentFontSize = ''; |
1420 | 1422 | ||
1421 | - // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" }); | ||
1422 | - // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); | ||
1423 | - | ||
1424 | - | ||
1425 | - //adding text text decoration active class in text edit pop-up | ||
1426 | - | ||
1427 | - | ||
1428 | - | ||
1429 | 1423 | ||
1430 | if ($rootScope.TextPropertyArray[i].TextDecoration == "underline") { | 1424 | if ($rootScope.TextPropertyArray[i].TextDecoration == "underline") { |
1431 | 1425 | ||
@@ -1439,14 +1433,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1439,14 +1433,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1439 | 1433 | ||
1440 | } | 1434 | } |
1441 | 1435 | ||
1442 | - | ||
1443 | - | ||
1444 | //adding text font weight active class in text edit pop-up | 1436 | //adding text font weight active class in text edit pop-up |
1445 | 1437 | ||
1446 | if (fontWeightProp[0] == 700) { | 1438 | if (fontWeightProp[0] == 700) { |
1447 | 1439 | ||
1448 | - | ||
1449 | - | ||
1450 | $("#text-bold").addClass("ActiveFormattingButtonClass"); | 1440 | $("#text-bold").addClass("ActiveFormattingButtonClass"); |
1451 | 1441 | ||
1452 | } | 1442 | } |
@@ -1491,9 +1481,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1491,9 +1481,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1491 | $("#text-left").removeClass("ActiveFormattingButtonClass"); | 1481 | $("#text-left").removeClass("ActiveFormattingButtonClass"); |
1492 | 1482 | ||
1493 | $("#text-right").addClass("ActiveFormattingButtonClass"); | 1483 | $("#text-right").addClass("ActiveFormattingButtonClass"); |
1494 | - | ||
1495 | - | ||
1496 | - | ||
1497 | } | 1484 | } |
1498 | 1485 | ||
1499 | else if ($rootScope.TextPropertyArray[i].Align == "center") { | 1486 | else if ($rootScope.TextPropertyArray[i].Align == "center") { |
@@ -1504,12 +1491,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1504,12 +1491,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1504 | 1491 | ||
1505 | $("#text-center").addClass("ActiveFormattingButtonClass"); | 1492 | $("#text-center").addClass("ActiveFormattingButtonClass"); |
1506 | 1493 | ||
1507 | - | ||
1508 | - | ||
1509 | } | 1494 | } |
1510 | 1495 | ||
1511 | - | ||
1512 | - | ||
1513 | } | 1496 | } |
1514 | else { | 1497 | else { |
1515 | // alert("no"); | 1498 | // alert("no"); |
@@ -1620,6 +1603,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1620,6 +1603,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1620 | fontFamily: _modifiedFontFamily, | 1603 | fontFamily: _modifiedFontFamily, |
1621 | align: _modifiedTextAlign, | 1604 | align: _modifiedTextAlign, |
1622 | strokeWidth: 0, | 1605 | strokeWidth: 0, |
1606 | + fromCenter: false, | ||
1623 | text: _modifiedText, | 1607 | text: _modifiedText, |
1624 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | 1608 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, |
1625 | maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | 1609 | maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, |
@@ -1634,6 +1618,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1634,6 +1618,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1634 | groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | 1618 | groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], |
1635 | dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | 1619 | dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], |
1636 | opacity: $rootScope.shapestyleOpacity, | 1620 | opacity: $rootScope.shapestyleOpacity, |
1621 | + fromCenter: false, | ||
1637 | strokeStyle: $rootScope.shapestyleborderColor, | 1622 | strokeStyle: $rootScope.shapestyleborderColor, |
1638 | strokeWidth: $rootScope.shapestyleborderWidth, | 1623 | strokeWidth: $rootScope.shapestyleborderWidth, |
1639 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | 1624 | x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, |
@@ -1809,9 +1794,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1809,9 +1794,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1809 | 1794 | ||
1810 | } | 1795 | } |
1811 | else if ($rootScope.shapeTypeText == "textAreaRect") { | 1796 | else if ($rootScope.shapeTypeText == "textAreaRect") { |
1812 | - | ||
1813 | - | ||
1814 | - | ||
1815 | $("#canvas").removeLayer($rootScope.canvasLayerNameCollection[0].textareaRectangle).drawLayers(); | 1797 | $("#canvas").removeLayer($rootScope.canvasLayerNameCollection[0].textareaRectangle).drawLayers(); |
1816 | $("#canvas").removeLayer($rootScope.canvasLayerNameCollection[0].textareaString).drawLayers(); | 1798 | $("#canvas").removeLayer($rootScope.canvasLayerNameCollection[0].textareaString).drawLayers(); |
1817 | $rootScope.shapeTypeText = ""; | 1799 | $rootScope.shapeTypeText = ""; |
@@ -1819,7 +1801,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1819,7 +1801,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1819 | } | 1801 | } |
1820 | else { | 1802 | else { |
1821 | 1803 | ||
1822 | - // alert($rootScope.canvasLayerNameCollection); | ||
1823 | $("#canvas").removeLayer($rootScope.canvasLayerNameCollection).drawLayers(); | 1804 | $("#canvas").removeLayer($rootScope.canvasLayerNameCollection).drawLayers(); |
1824 | } | 1805 | } |
1825 | 1806 | ||
@@ -1833,12 +1814,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1833,12 +1814,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1833 | 1814 | ||
1834 | document.getElementById('modelbackground').style.display = "none"; | 1815 | document.getElementById('modelbackground').style.display = "none"; |
1835 | 1816 | ||
1836 | - //if ($rootScope.isTextAreaClosedButtonActive == true) { | ||
1837 | - // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers(); | ||
1838 | - // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | ||
1839 | - | ||
1840 | - //} | ||
1841 | - | ||
1842 | } | 1817 | } |
1843 | //-- End ---------------------------- | 1818 | //-- End ---------------------------- |
1844 | 1819 | ||
@@ -1875,17 +1850,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1875,17 +1850,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1875 | $rootScope.PaintCanvasMousedownListener = function (canvasContext, x, y) { | 1850 | $rootScope.PaintCanvasMousedownListener = function (canvasContext, x, y) { |
1876 | if ($rootScope.isLineDrawSelecyed == true) { | 1851 | if ($rootScope.isLineDrawSelecyed == true) { |
1877 | 1852 | ||
1878 | - canvasContext.lineWidth = 0.1; | ||
1879 | - //$scope.paintCanvasContext.lineJoin = 'round'; | ||
1880 | - //$scope.paintCanvasContext.lineCap = 'round'; | 1853 | + canvasContext.lineWidth = 0.1; |
1881 | canvasContext.strokeStyle = 'red'; | 1854 | canvasContext.strokeStyle = 'red'; |
1882 | - | ||
1883 | - | ||
1884 | canvasContext.beginPath(); | 1855 | canvasContext.beginPath(); |
1885 | - | ||
1886 | - //var canvasOffset = $("#myCanvas").offset(); | ||
1887 | - //var offsetX = canvasOffset.left; | ||
1888 | - //var offsetY = canvasOffset.top; | ||
1889 | canvasContext.moveTo(x, y); | 1856 | canvasContext.moveTo(x, y); |
1890 | } | 1857 | } |
1891 | 1858 | ||
@@ -1942,22 +1909,24 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1942,22 +1909,24 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1942 | 1909 | ||
1943 | $('#listManager').css('display', 'block'); | 1910 | $('#listManager').css('display', 'block'); |
1944 | $("#listManager").css("visibility", "visible"); | 1911 | $("#listManager").css("visibility", "visible"); |
1945 | - | ||
1946 | - // $('#termList option[selected="selected"]').prop("selected", false); | ||
1947 | - // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").prop("selected", true); | ||
1948 | - // $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | ||
1949 | - // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | 1912 | + |
1913 | + // $('#termList option[selected="selected"]').prop("selected", false); | ||
1914 | + // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").prop("selected", true); | ||
1915 | + // $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | ||
1916 | + // $("#termList").find("option[value=" + $rootScope.searchSelectedText + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | ||
1950 | $('#listManager').draggable(); | 1917 | $('#listManager').draggable(); |
1951 | 1918 | ||
1952 | 1919 | ||
1953 | $rootScope.islistManagerEventAlredayDispachted = true; | 1920 | $rootScope.islistManagerEventAlredayDispachted = true; |
1954 | 1921 | ||
1955 | $rootScope.$broadcast('listManagerEvent', true); | 1922 | $rootScope.$broadcast('listManagerEvent', true); |
1956 | - | 1923 | + |
1957 | $('#termList option[selected="selected"]').prop("selected", false); | 1924 | $('#termList option[selected="selected"]').prop("selected", false); |
1958 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | 1925 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); |
1959 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | 1926 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
1960 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | 1927 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); |
1928 | + | ||
1929 | + | ||
1961 | } | 1930 | } |
1962 | 1931 | ||
1963 | $rootScope.CloseListManager = function () { | 1932 | $rootScope.CloseListManager = function () { |
@@ -1994,7 +1963,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -1994,7 +1963,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
1994 | } | 1963 | } |
1995 | } | 1964 | } |
1996 | 1965 | ||
1997 | - | 1966 | + $rootScope.prevId = ""; |
1998 | } | 1967 | } |
1999 | 1968 | ||
2000 | function fillListManagerTerms() { | 1969 | function fillListManagerTerms() { |
@@ -2114,40 +2083,125 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2114,40 +2083,125 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2114 | }; | 2083 | }; |
2115 | 2084 | ||
2116 | $rootScope.UpdateSetting = function (setting) { | 2085 | $rootScope.UpdateSetting = function (setting) { |
2117 | - | 2086 | + var isReloadingViewRequired = false; |
2118 | //1. | 2087 | //1. |
2119 | if (typeof (setting.ethnicity) !== "undefined" && setting.ethnicity !== null) { | 2088 | if (typeof (setting.ethnicity) !== "undefined" && setting.ethnicity !== null) { |
2120 | $rootScope.ChangeEthnicity(setting, setting.ethnicity); | 2089 | $rootScope.ChangeEthnicity(setting, setting.ethnicity); |
2121 | - $rootScope.globalSetting.ethnicity = setting.ethnicity; | ||
2122 | - localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); | ||
2123 | - $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity); | ||
2124 | - } | 2090 | + } |
2125 | if (typeof (setting.modesty) !== "undefined" && setting.modesty !== null) { | 2091 | if (typeof (setting.modesty) !== "undefined" && setting.modesty !== null) { |
2126 | $rootScope.ChangeModesty(setting, setting.modesty); | 2092 | $rootScope.ChangeModesty(setting, setting.modesty); |
2127 | - $rootScope.globalSetting.modesty = setting.modesty; | ||
2128 | - localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); | ||
2129 | - $rootScope.setModestySettings($rootScope.globalSetting.modesty); | ||
2130 | } | 2093 | } |
2131 | 2094 | ||
2132 | //2. | 2095 | //2. |
2133 | - //localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); | 2096 | + if((setting.ethnicity!=null && setting.ethnicity!= $rootScope.globalSetting.ethnicity) && (setting.modesty!=null && setting.modesty != $rootScope.globalSetting.modesty) ){ |
2097 | + $rootScope.globalSetting.ethnicity = setting.ethnicity; | ||
2098 | + localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); | ||
2099 | + | ||
2100 | + $rootScope.globalSetting.modesty = setting.modesty; | ||
2101 | + localStorage.setItem("globalModesty", setting.modesty); | ||
2102 | + | ||
2103 | + isReloadingViewRequired = true; | ||
2104 | + | ||
2105 | + } | ||
2106 | + | ||
2107 | + else if (setting.ethnicity!=null && setting.ethnicity != $rootScope.globalSetting.ethnicity) { | ||
2134 | 2108 | ||
2135 | - //3. | ||
2136 | - //localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); | 2109 | + $rootScope.globalSetting.ethnicity = setting.ethnicity; |
2110 | + localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity); | ||
2137 | 2111 | ||
2138 | - //4. | ||
2139 | - //$rootScope.reloadChildController(); | 2112 | + $rootScope.globalSetting.modesty = localStorage.getItem("globalModesty"); |
2140 | 2113 | ||
2141 | - var len = $rootScope.openModules.length; | ||
2142 | - if (len > 0) { | ||
2143 | - $rootScope.reloadChildController(); | 2114 | + isReloadingViewRequired = true; |
2144 | } | 2115 | } |
2145 | - else { | ||
2146 | - $('#modal-settings').modal('hide'); | 2116 | + else if (setting.modesty!= null && setting.modesty != $rootScope.globalSetting.modesty) { |
2117 | + $rootScope.globalSetting.modesty = setting.modesty; | ||
2118 | + localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); | ||
2119 | + | ||
2120 | + $rootScope.globalSetting.ethnicity = localStorage.getItem("globalEthnicity"); | ||
2121 | + | ||
2122 | + if ($('.modestyImg') != null) { | ||
2123 | + if (($rootScope.globalSetting.modesty == 'Y')) { | ||
2124 | + $('.modestyImg').css('visibility', 'visible'); | ||
2125 | + } | ||
2126 | + | ||
2127 | + else { | ||
2128 | + $('.modestyImg').css('visibility', 'hidden'); | ||
2129 | + } | ||
2130 | + } | ||
2131 | + $rootScope.changeNavigatorModesty(); | ||
2147 | } | 2132 | } |
2133 | + | ||
2134 | + var len = $rootScope.openModules.length; | ||
2135 | + if (len > 0) { | ||
2136 | + if (isReloadingViewRequired == true) { | ||
2137 | + $rootScope.reloadChildController(); | ||
2138 | + } | ||
2139 | + } | ||
2140 | + else { | ||
2141 | + $('#modal-settings').modal('hide'); | ||
2142 | + } | ||
2148 | 2143 | ||
2149 | }; | 2144 | }; |
2150 | 2145 | ||
2146 | + | ||
2147 | + | ||
2148 | + $rootScope.FreeStylePaint = function (e) { | ||
2149 | + | ||
2150 | + var annotationCanvas = document.getElementById("canvas"); | ||
2151 | + // document.getElementById("canvasPaint").addEventListener("mouseup", OnPaintBrushCanvasMouseUp); | ||
2152 | + | ||
2153 | + annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintBrushCanvasMouseDown, false); | ||
2154 | + | ||
2155 | + annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintBrushCanvasMouseUp, false); | ||
2156 | + } | ||
2157 | + | ||
2158 | + | ||
2159 | + | ||
2160 | + | ||
2161 | + $rootScope.OnPaintBrushCanvasMouseDown = function (event) { | ||
2162 | + $rootScope.isMousedownOnPaintCanvas = true; | ||
2163 | + $rootScope.isStartPointDeleted = false; | ||
2164 | + var annotationCanvas = document.getElementById("canvas"); | ||
2165 | + $rootScope.startPageX = parseInt(event.clientX - ($("#canvas").offset().left)); | ||
2166 | + $rootScope.startPageY = parseInt(event.clientY - ($("#canvas").offset().top)); | ||
2167 | + | ||
2168 | + annotationCanvas.addEventListener('mousemove', $rootScope.OnPaintBrushCanvasMouseMove, false); | ||
2169 | + | ||
2170 | + } | ||
2171 | + $rootScope.OnPaintBrushCanvasMouseMove = function (event) { | ||
2172 | + | ||
2173 | + $rootScope.xPage = parseInt(event.clientX - ($("#canvas").offset().left)); | ||
2174 | + $rootScope.yPage = parseInt(event.clientY - ($("#canvas").offset().top)); | ||
2175 | + | ||
2176 | + var btneraseBrushSizeValue = $("#btnBrushSize").val(); | ||
2177 | + $rootScope.eraseshapeSize = parseInt(btneraseBrushSizeValue); | ||
2178 | + | ||
2179 | + if ($rootScope.isEraseToolSelected == true && $rootScope.isMousedownOnPaintCanvas == true) { | ||
2180 | + | ||
2181 | + var sktch = $('#canvasPaint').sketch(); | ||
2182 | + $('#canvasPaint').sketch().actions = []; | ||
2183 | + var paintCanvas = document.getElementById("canvasPaint"); | ||
2184 | + var paintCanvasContext = paintCanvas.getContext('2d'); | ||
2185 | + if ($rootScope.isStartPointDeleted == false) { | ||
2186 | + | ||
2187 | + paintCanvasContext.clearRect($rootScope.startPageX, $rootScope.startPageY, $rootScope.eraseshapeSize, $rootScope.eraseshapeSize); | ||
2188 | + | ||
2189 | + $rootScope.isStartPointDeleted = true; | ||
2190 | + } | ||
2191 | + | ||
2192 | + paintCanvasContext.clearRect($rootScope.xPage, $rootScope.yPage, $rootScope.eraseshapeSize, $rootScope.eraseshapeSize); | ||
2193 | + | ||
2194 | + | ||
2195 | + } | ||
2196 | + } | ||
2197 | + $rootScope.OnPaintBrushCanvasMouseUp = function (event) { | ||
2198 | + $rootScope.isMousedownOnPaintCanvas = false; | ||
2199 | + $rootScope.isEraseToolSelected = false; | ||
2200 | + | ||
2201 | + | ||
2202 | + } | ||
2203 | + | ||
2204 | + | ||
2151 | $rootScope.reloadChildController = function () { | 2205 | $rootScope.reloadChildController = function () { |
2152 | 2206 | ||
2153 | var len = $rootScope.openModules.length; | 2207 | var len = $rootScope.openModules.length; |
@@ -2160,8 +2214,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2160,8 +2214,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2160 | //Check that what current bodyview is open | 2214 | //Check that what current bodyview is open |
2161 | if ($rootScope.openViews.length > 0) { | 2215 | if ($rootScope.openViews.length > 0) { |
2162 | var openViewLen = $rootScope.openViews.length; | 2216 | var openViewLen = $rootScope.openViews.length; |
2163 | - var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId; | ||
2164 | - //$rootScope.isSettingEventAlredayDispachted = true; | 2217 | + var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId; |
2218 | + $rootScope.isSettingEventAlredayDispachted = true; | ||
2165 | $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true); | 2219 | $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true); |
2166 | } | 2220 | } |
2167 | else { | 2221 | else { |
@@ -2171,6 +2225,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | @@ -2171,6 +2225,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", | ||
2171 | } | 2225 | } |
2172 | }; | 2226 | }; |
2173 | 2227 | ||
2228 | + $rootScope.changeNavigatorModesty = function () { | ||
2229 | + var currentOpenViewId = localStorage.getItem("currentBodyViewId");//$rootScope.openViews[openViewLen - 1].BodyViewId; | ||
2230 | + | ||
2231 | + $rootScope.$broadcast('changeNavigatorModestyEvent', { bodyViewId: currentOpenViewId }, true); | ||
2174 | 2232 | ||
2233 | + }; | ||
2175 | }] | 2234 | }] |
2176 | ); | 2235 | ); |
2177 | \ No newline at end of file | 2236 | \ No newline at end of file |
400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html
@@ -59,43 +59,43 @@ | @@ -59,43 +59,43 @@ | ||
59 | </div> | 59 | </div> |
60 | <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view"> | 60 | <div role="tabpanel" ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }" id="list-view"> |
61 | <div class="panel col-sm-12 table-responsive" style="padding-left:0px; padding-right:0; margin-left:11px; margin-bottom:0; width:99%;"> | 61 | <div class="panel col-sm-12 table-responsive" style="padding-left:0px; padding-right:0; margin-left:11px; margin-bottom:0; width:99%;"> |
62 | - <table class="table table-hover table-fixed bg-white table-txt12" style="padding-left:25px; width:100%;"> | 62 | + <table class="table table-hover table-fixed bg-white table-txt12 tablecaview" style="padding-left:25px; width:100%;"> |
63 | <thead class="clstheadca"> | 63 | <thead class="clstheadca"> |
64 | - <tr class="active"> | ||
65 | - <th style="min-width: 250px;">Title</th> | ||
66 | - <th style="min-width: 250px;">Region</th> | ||
67 | - <th style="min-width: 260px;">System</th> | ||
68 | - <th style="min-width: 280px;">Specialty</th> | 64 | + <tr class="active" style="background:#f5f5f5;"> |
65 | + <th style="width:25%">Title</th> | ||
66 | + <th style="width:25%">Region</th> | ||
67 | + <th style="width:25%">System</th> | ||
68 | + <th style="width:25%">Specialty</th> | ||
69 | </tr> | 69 | </tr> |
70 | </thead> | 70 | </thead> |
71 | <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbodyca"> | 71 | <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbodyca"> |
72 | <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData"> | 72 | <tr id="{{item._id}}" ng-class="{selected: item._id === idSelected}" ng-click="showItem(item._id)" ng-dblclick="openView($event)" ng-repeat="item in selectedCAListViewData"> |
73 | - <td style="max-width: 250px;"> | 73 | + <td style="width:25%"> |
74 | {{item._Title}} | 74 | {{item._Title}} |
75 | </td> | 75 | </td> |
76 | - <td style="max-width: 250px;"> | 76 | + <td style="width:25%"> |
77 | {{item._BodyRegion}} | 77 | {{item._BodyRegion}} |
78 | </td> | 78 | </td> |
79 | - <td style="min-width: 260px;"> | 79 | + <td style="width:25%"> |
80 | {{item._BodySystem}} | 80 | {{item._BodySystem}} |
81 | </td> | 81 | </td> |
82 | - <td style="max-width: 280px;"> | 82 | + <td style="width:25%"> |
83 | {{item._MedicalSpecialty}} | 83 | {{item._MedicalSpecialty}} |
84 | </td> | 84 | </td> |
85 | </tr> | 85 | </tr> |
86 | </tbody> | 86 | </tbody> |
87 | <tbody id="ListViewDiv" ng-if="filterstring" class="clstbodyca"> | 87 | <tbody id="ListViewDiv" ng-if="filterstring" class="clstbodyca"> |
88 | <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData"> | 88 | <tr ng-click="showItem(item._id)" ng-class="{selected: item._id === idSelected}" ng-dblclick="openView($event)" ng-repeat="item in searchCAListViewData"> |
89 | - <td style="max-width: 250px;"> | 89 | + <td style="width:25%"> |
90 | {{item._Title}} | 90 | {{item._Title}} |
91 | </td> | 91 | </td> |
92 | - <td style="max-width: 250px;"> | 92 | + <td style="width:25%"> |
93 | {{item._BodyRegion}} | 93 | {{item._BodyRegion}} |
94 | </td> | 94 | </td> |
95 | - <td style="min-width: 260px;"> | 95 | + <td style="width:25%"> |
96 | {{item._BodySystem}} | 96 | {{item._BodySystem}} |
97 | </td> | 97 | </td> |
98 | - <td style="max-width: 280px;"> | 98 | + <td style="width:25%"> |
99 | {{item._MedicalSpecialty}} | 99 | {{item._MedicalSpecialty}} |
100 | </td> | 100 | </td> |
101 | </tr> | 101 | </tr> |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
@@ -238,7 +238,7 @@ | @@ -238,7 +238,7 @@ | ||
238 | </div> | 238 | </div> |
239 | 239 | ||
240 | <div class="col-xs-12"> | 240 | <div class="col-xs-12"> |
241 | - <button id="btnStrutureBox" onclick="enableShowHideStructureBox()" class="btn btn-primary btn-sm marginTop5 btn-block tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Show/Hide Structure Name Boxes"> <img src="content/images/comment-box.png" alt=""></button> | 241 | + <button id="btnStrutureBox" onclick="enableShowHideStructureBox()" class="btn btn-primary btn-sm marginTop5 btn-block tooltip-custom" data-toggle="tooltip" data-placement="bottom" name="showAnnotationStructure" title="Show/Hide Structure Name Boxes"> <img src="content/images/comment-box.png" alt=""></button> |
242 | </div> | 242 | </div> |
243 | 243 | ||
244 | </div> | 244 | </div> |
@@ -313,7 +313,7 @@ | @@ -313,7 +313,7 @@ | ||
313 | 313 | ||
314 | <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; "> | 314 | <div class="dropdown-menu active" id="navigatorDiv" style="min-height:auto; min-width:auto; "> |
315 | <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; "> | 315 | <div id="containment-wrapper" align="center" style="min-width:auto;height:119px; "> |
316 | - <img id="navimg" ng-src="{{navimgsrc}}" alt=""></img> | 316 | + <img id="navimg" alt=""></img> |
317 | <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition"> | 317 | <div id="draggable" class="draggable ui-widget-content" ng-mouseup="ScrollCanvasDiv()" ng-style="dragdivposition"> |
318 | </div> | 318 | </div> |
319 | </div> | 319 | </div> |
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <li><a href="#">Open Existing Curriculum</a></li> | 15 | <li><a href="#">Open Existing Curriculum</a></li> |
16 | <li><a href="#">Save Curriculum As</a></li> | 16 | <li><a href="#">Save Curriculum As</a></li> |
17 | <li role="separator" class="divider"></li> | 17 | <li role="separator" class="divider"></li> |
18 | - <li><a href="#" data-toggle="modal">Export Image</a></li> | 18 | + <li><a href="#" data-toggle="modal">Export Image</a></l |
19 | <li role="separator" class="divider"></li> | 19 | <li role="separator" class="divider"></li> |
20 | <li><a href="#">Print Active Viewer</a></li> | 20 | <li><a href="#">Print Active Viewer</a></li> |
21 | <li><a href="#">Print All Open Viewers</a></li> | 21 | <li><a href="#">Print All Open Viewers</a></li> |
@@ -30,14 +30,14 @@ | @@ -30,14 +30,14 @@ | ||
30 | <ul class="dropdown-menu"> | 30 | <ul class="dropdown-menu"> |
31 | <!--<li><a href="#" ng-click="ShowListManager()">List Manager</a></li>--> | 31 | <!--<li><a href="#" ng-click="ShowListManager()">List Manager</a></li>--> |
32 | 32 | ||
33 | - <li><a href="#" ng-click="ShowListManager()">List Manager</a></li> | 33 | + <li ng-class="disableSubMenu"><a href="#" ng-click="ShowListManager()">List Manager</a></li> |
34 | <!--#7904--> | 34 | <!--#7904--> |
35 | <li><a href="#" id="annotationToolBarOptions" ng-click="ShowAnnotationWindow()">Annotation Toolbar</a></li> | 35 | <li><a href="#" id="annotationToolBarOptions" ng-click="ShowAnnotationWindow()">Annotation Toolbar</a></li> |
36 | 36 | ||
37 | - <li><a href="#">Add to Existing Curriculum</a></li> | 37 | + <li ng-class="disableSubMenu"><a href="#">Add to Existing Curriculum</a></li> |
38 | <li><a ng-click="ShowSettingWindow()" class="cursor-pointer">Settings</a></li> | 38 | <li><a ng-click="ShowSettingWindow()" class="cursor-pointer">Settings</a></li> |
39 | <li role="separator" class="divider"></li> | 39 | <li role="separator" class="divider"></li> |
40 | - <li><a href="#">Lab Exercises PDF</a></li> | 40 | + <li ng-class="disableMenuoption"><a href="#">Lab Exercises PDF</a></li> |
41 | </ul> | 41 | </ul> |
42 | </li> | 42 | </li> |
43 | <li class="dropdown"> | 43 | <li class="dropdown"> |
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -508,12 +508,12 @@ | @@ -508,12 +508,12 @@ | ||
508 | <div class="" role="group" align="center"> | 508 | <div class="" role="group" align="center"> |
509 | <div id="cursor-block" style="display: none; font-size:13px;"></div> | 509 | <div id="cursor-block" style="display: none; font-size:13px;"></div> |
510 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" ng-mouseover="mouseMoveToolTip(75, 60, 120, 'Select Cursor(s)')" ng-mouseleave="mouseOutToolTip()" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button> | 510 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btnCursor" ng-mouseover="mouseMoveToolTip(75, 60, 120, 'Select Cursor(s)')" ng-mouseleave="mouseOutToolTip()" ng-click="Cursor()"><img src="content/images/icon-identity.png" alt="" title=""></button> |
511 | - <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" ng-mouseover="mouseMoveToolTip(75, 100, 120, 'Draw Pin')" ng-mouseleave="mouseOutToolTip()" ng-click="DrPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button> | 511 | + <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-pin" ng-mouseover="mouseMoveToolTip(75, 100, 120, 'Draw Pin')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawPin($event)"><img src="content/images/draw-pin.png" alt="" title=""></button> |
512 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" ng-mouseover="mouseMoveToolTip(75, 120, 120, 'Draw Arrow')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button> | 512 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-arrow" ng-mouseover="mouseMoveToolTip(75, 120, 120, 'Draw Arrow')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawArrow($event)"><img src="content/images/draw-arrow.png" alt="" title=""></button> |
513 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" ng-mouseover="mouseMoveToolTip(75, 140, 120, 'Draw Text')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button> | 513 | <button type="button" class="btn btn-black-annotation btn-xs mrgnBtm5 btn-annotation btn-annotation-Text" ng-mouseover="mouseMoveToolTip(75, 140, 120, 'Draw Text')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawText($event)"><img src="content/images/draw-text.png" alt="" title=""></button> |
514 | </div> | 514 | </div> |
515 | <div class="" role="group" align="center"> | 515 | <div class="" role="group" align="center"> |
516 | - <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" ng-mouseover="mouseMoveToolTip(95, 60, 120, 'Draw Line')" ng-mouseleave="mouseOutToolTip()" ng-click="DrLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button> | 516 | + <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-line" ng-mouseover="mouseMoveToolTip(95, 60, 120, 'Draw Line')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawLine($event)"><img src="content/images/draw-line.png" alt="" title=""></button> |
517 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" ng-mouseover="mouseMoveToolTip(95, 100, 120, 'Draw Rectangle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button> | 517 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-rectangle" ng-mouseover="mouseMoveToolTip(95, 100, 120, 'Draw Rectangle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawRectangle($event)"><img src="content/images/draw-rec.png" alt="" title=""></button> |
518 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" ng-mouseover="mouseMoveToolTip(95, 120, 120, 'Draw Circle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button> | 518 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation btn-annotation-circle" ng-mouseover="mouseMoveToolTip(95, 120, 120, 'Draw Circle')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawCircle($event)"><img src="content/images/draw-cir.png" alt="" title=""></button> |
519 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" ng-mouseover="mouseMoveToolTip(95, 140, 120, 'Draw Polygon')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button> | 519 | <button type="button" class="btn btn-black-annotation btn-xs btn-annotation" ng-mouseover="mouseMoveToolTip(95, 140, 120, 'Draw Polygon')" ng-mouseleave="mouseOutToolTip()" ng-click="DrawPolygon($event)"><img src="content/images/draw-poly.png" alt="" title=""></button> |
@@ -770,7 +770,7 @@ | @@ -770,7 +770,7 @@ | ||
770 | <!--Edit Shape Modal--> | 770 | <!--Edit Shape Modal--> |
771 | 771 | ||
772 | 772 | ||
773 | - <div class="modeleditstyle" id="modeleditstyle" style="z-index: 1000000000; background: white; height: 433px; width: 302px;position:absolute;left:40%;right:0;top:70px;"> | 773 | + <div class="modeleditstyle" id="modeleditstyle" style="z-index: 1000000000; background: white;width: 302px;position:absolute;left:40%;right:0;top:70px;"> |
774 | <div class="modal-content"> | 774 | <div class="modal-content"> |
775 | <div class="modal-header annotation-modal-header"> | 775 | <div class="modal-header annotation-modal-header"> |
776 | <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4> | 776 | <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4> |
@@ -886,7 +886,7 @@ | @@ -886,7 +886,7 @@ | ||
886 | </div> | 886 | </div> |
887 | </div> | 887 | </div> |
888 | <div class="modal-footer"> | 888 | <div class="modal-footer"> |
889 | - <button id="btnShapeStyle" type="button" class="btn btn-primary btn-sm" ng-click="shapestyle('imgOpacity')"> | 889 | + <button id="btnShapeStyle" type="button" class="btn btn-primary btn-sm" ng-click="setPropertiesForShapes('imgOpacity')"> |
890 | OK | 890 | OK |
891 | </button> | 891 | </button> |
892 | <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> | 892 | <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> |
@@ -1008,7 +1008,7 @@ | @@ -1008,7 +1008,7 @@ | ||
1008 | </div> | 1008 | </div> |
1009 | </div> | 1009 | </div> |
1010 | <div class="modal-footer"> | 1010 | <div class="modal-footer"> |
1011 | - <button type="button" class="btn btn-primary btn-sm" ng-click="shapestyle('imgOpacity')"> | 1011 | + <button type="button" class="btn btn-primary btn-sm" ng-click="setPropertiesForShapes('imgOpacity')"> |
1012 | OK | 1012 | OK |
1013 | </button> | 1013 | </button> |
1014 | <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> | 1014 | <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> |
@@ -1230,7 +1230,12 @@ | @@ -1230,7 +1230,12 @@ | ||
1230 | }); | 1230 | }); |
1231 | $("#btnBrushSizeDecrease").click(function () { | 1231 | $("#btnBrushSizeDecrease").click(function () { |
1232 | var brushDecreaseVar = $("#btnBrushSize").val(); | 1232 | var brushDecreaseVar = $("#btnBrushSize").val(); |
1233 | - if (brushDecreaseVar <= 1) { | 1233 | + if (brushDecreaseVar == "") { |
1234 | + var brushDecrementedValue = 1; | ||
1235 | + $("#btnBrushSize").val(brushDecrementedValue); | ||
1236 | + $("#slider-range-min-2").slider("value", parseInt(brushDecrementedValue)); | ||
1237 | + } | ||
1238 | + else if (brushDecreaseVar <= 1) { | ||
1234 | $("#slider-range-min-2").slider("value", 1); | 1239 | $("#slider-range-min-2").slider("value", 1); |
1235 | } | 1240 | } |
1236 | else { | 1241 | else { |
@@ -1435,11 +1440,13 @@ | @@ -1435,11 +1440,13 @@ | ||
1435 | borderWidth = $(this).val(); | 1440 | borderWidth = $(this).val(); |
1436 | 1441 | ||
1437 | if (borderColor != null) { | 1442 | if (borderColor != null) { |
1438 | - | ||
1439 | - $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); | 1443 | + document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; |
1444 | + //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); | ||
1440 | } else { | 1445 | } else { |
1441 | 1446 | ||
1442 | - $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid"); | 1447 | + // $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid"); |
1448 | + document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; | ||
1449 | + | ||
1443 | } | 1450 | } |
1444 | }); | 1451 | }); |
1445 | 1452 | ||
@@ -1464,7 +1471,8 @@ | @@ -1464,7 +1471,8 @@ | ||
1464 | console.log(value); | 1471 | console.log(value); |
1465 | 1472 | ||
1466 | borderColor = value; | 1473 | borderColor = value; |
1467 | - $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); | 1474 | + //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); |
1475 | + document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; | ||
1468 | 1476 | ||
1469 | 1477 | ||
1470 | } | 1478 | } |
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
@@ -811,6 +811,29 @@ textarea { | @@ -811,6 +811,29 @@ textarea { | ||
811 | 811 | ||
812 | } | 812 | } |
813 | 813 | ||
814 | + | ||
815 | + | ||
816 | + | ||
817 | +.tablecaview .clstbody tr td { | ||
818 | + min-width: 275px; | ||
819 | + text-align: left; | ||
820 | +} | ||
821 | + | ||
822 | +.tablecaview .clstheadca tr th { | ||
823 | + min-width: 275px; | ||
824 | + text-align: left; | ||
825 | +} | ||
826 | + | ||
827 | + | ||
828 | +.tablecaview .clstbody,.tablecaview .clstbodyca { | ||
829 | + display: block; | ||
830 | + height: 200px; | ||
831 | + width: 100%; | ||
832 | + overflow:scroll; | ||
833 | +} | ||
834 | + | ||
835 | + | ||
836 | + | ||
814 | .cur-pot { | 837 | .cur-pot { |
815 | cursor:pointer; | 838 | cursor:pointer; |
816 | } | 839 | } |
@@ -884,10 +907,15 @@ cursor:pointer; | @@ -884,10 +907,15 @@ cursor:pointer; | ||
884 | opacity:0.6; | 907 | opacity:0.6; |
885 | 908 | ||
886 | } | 909 | } |
910 | +.disableSubMenu { | ||
911 | + pointer-events: none; | ||
912 | + opacity: 0.6; | ||
913 | +} | ||
887 | 914 | ||
888 | .blankshapediv | 915 | .blankshapediv |
889 | { | 916 | { |
890 | background-image: url("../../../../../content/images/blank-shapes.png"); | 917 | background-image: url("../../../../../content/images/blank-shapes.png"); |
918 | +background-size:cover; | ||
891 | } | 919 | } |
892 | .outlinediv | 920 | .outlinediv |
893 | { | 921 | { |
@@ -909,4 +937,10 @@ background-image: url("../../../../../content/images/blank-shapes.png"); | @@ -909,4 +937,10 @@ background-image: url("../../../../../content/images/blank-shapes.png"); | ||
909 | /*Bug #8679*/ | 937 | /*Bug #8679*/ |
910 | .selected { | 938 | .selected { |
911 | background-color: lightgrey; | 939 | background-color: lightgrey; |
912 | - } | ||
913 | \ No newline at end of file | 940 | \ No newline at end of file |
941 | + } | ||
942 | + | ||
943 | + .disableHideShowStructure | ||
944 | + { | ||
945 | + background:#4b4b4b !important; | ||
946 | + border-color:#3f3f3f !important; | ||
947 | + } |