Commit ced4a1ffa6ba8243927fd04e83cae29cb8515d75
1 parent
f6cb7059
Tbox black issue with develop bramch merged
Showing
2 changed files
with
294 additions
and
591 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -45,7 +45,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
45 | 45 | $scope.doHighlightOrExtract = false; |
46 | 46 | $scope.isEligibleForHighlightBodyByTermList = false; |
47 | 47 | |
48 | - // $scope.AnteriorView = "active"; | |
48 | + $scope.AnteriorView = "active"; | |
49 | 49 | |
50 | 50 | $scope.zoomInOut = 75; |
51 | 51 | $scope.speechBubbleCounter = 0; |
... | ... | @@ -165,7 +165,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
165 | 165 | //get the DA body view list based on selected gender |
166 | 166 | $scope.getDAViewList = function ($event) { |
167 | 167 | |
168 | - | |
168 | + // debugger; | |
169 | 169 | if ($('#MainImage') != null) { |
170 | 170 | $('#MainImage').remove(); |
171 | 171 | } |
... | ... | @@ -244,7 +244,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
244 | 244 | } |
245 | 245 | |
246 | 246 | $scope.imagePath = "~/../content/images/DA/" + $scope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage; |
247 | - | |
247 | + // debugger; | |
248 | 248 | |
249 | 249 | var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._title + ' data-ng-click="openView($event)"><div class="thumbnail" >' |
250 | 250 | + '<img class= "daImg" id="' + value._title + '" src="' + $scope.imagePath + '" alt="" title="" >' |
... | ... | @@ -265,7 +265,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
265 | 265 | |
266 | 266 | |
267 | 267 | $scope.openView = function ($event) { |
268 | - | |
268 | + // debugger; | |
269 | 269 | $rootScope.isLoading = true; |
270 | 270 | $('#spinner').css('visibility', 'visible'); |
271 | 271 | |
... | ... | @@ -273,7 +273,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
273 | 273 | $rootScope.ViewTitle = $event.currentTarget.textContent; |
274 | 274 | |
275 | 275 | localStorage.setItem("currentViewTitleFromJson", $event.currentTarget.textContent); |
276 | - localStorage.setItem("currentViewTitle", $event.currentTarget.textContent); | |
277 | 276 | localStorage.setItem("currentBodyViewId", $event.currentTarget.id); |
278 | 277 | |
279 | 278 | var u = $location.url(); |
... | ... | @@ -282,64 +281,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
282 | 281 | var view_list = angular.element($event.currentTarget); |
283 | 282 | var view_list_male_female = view_list.attr('title'); |
284 | 283 | |
285 | - if (($event.currentTarget.textContent == "Female Anterior" || $event.currentTarget.textContent == "Male Anterior")) { | |
286 | - $rootScope.AnteriorView = "active"; | |
287 | - $rootScope.LateralView = ""; | |
288 | - $rootScope.MedialView = ""; | |
289 | - $rootScope.PosteriorView = ""; | |
290 | - $rootScope.LateralArmView = ""; | |
291 | - $rootScope.MedialArmView = ""; | |
292 | - } | |
293 | - if (($event.currentTarget.textContent == "Female Lateral" || $event.currentTarget.textContent == "Male Lateral")) { | |
294 | - $rootScope.AnteriorView = ""; | |
295 | - $rootScope.LateralView = "active"; | |
296 | - $rootScope.MedialView = ""; | |
297 | - $rootScope.PosteriorView = ""; | |
298 | - $rootScope.LateralArmView = ""; | |
299 | - $rootScope.MedialArmView = ""; | |
300 | - | |
301 | - | |
302 | - } | |
303 | - if (($event.currentTarget.textContent == "Female Medial" || $event.currentTarget.textContent == "Male Medial")) { | |
304 | - $rootScope.AnteriorView = ""; | |
305 | - $rootScope.LateralView = ""; | |
306 | - $rootScope.MedialView = "active"; | |
307 | - $rootScope.PosteriorView = ""; | |
308 | - $rootScope.LateralArmView = ""; | |
309 | - $rootScope.MedialArmView = ""; | |
310 | - | |
311 | - | |
312 | - } | |
313 | - if (($event.currentTarget.textContent == "Female Posterior" || $event.currentTarget.textContent == "Male Posterior")) { | |
314 | - $rootScope.AnteriorView = ""; | |
315 | - $rootScope.LateralView = ""; | |
316 | - $rootScope.MedialView = ""; | |
317 | - $rootScope.PosteriorView = "active"; | |
318 | - $rootScope.LateralArmView = ""; | |
319 | - $rootScope.MedialArmView = ""; | |
320 | - | |
321 | - } | |
322 | - if (($event.currentTarget.textContent == "Female Lateral Arm" || $event.currentTarget.textContent == "Male Lateral Arm")) { | |
323 | - $rootScope.AnteriorView = ""; | |
324 | - $rootScope.LateralView = ""; | |
325 | - $rootScope.MedialView = ""; | |
326 | - $rootScope.PosteriorView = ""; | |
327 | - $rootScope.LateralArmView = "active"; | |
328 | - $rootScope.MedialArmView = ""; | |
329 | - | |
330 | - | |
331 | - } | |
332 | - if (($event.currentTarget.textContent == "Female Medial Arm" || $event.currentTarget.textContent == "Male Medial Arm")) { | |
333 | - $rootScope.AnteriorView = ""; | |
334 | - $rootScope.LateralView = ""; | |
335 | - $rootScope.MedialView = ""; | |
336 | - $rootScope.PosteriorView = ""; | |
337 | - $rootScope.LateralArmView = ""; | |
338 | - $rootScope.MedialArmView = "active"; | |
339 | - | |
340 | - | |
341 | - } | |
342 | - | |
343 | 284 | //$rootScope.Normal = "LeftButtonsDefaultState"; |
344 | 285 | |
345 | 286 | if (view_list_male_female == "Male") { |
... | ... | @@ -682,7 +623,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
682 | 623 | |
683 | 624 | |
684 | 625 | $scope.LoadDefaultLayerImage = function () { |
685 | - | |
626 | + // debugger; | |
627 | + | |
686 | 628 | $rootScope.isNormalMode = true; |
687 | 629 | |
688 | 630 | $scope.layerNumber = 0; |
... | ... | @@ -943,19 +885,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
943 | 885 | var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; |
944 | 886 | |
945 | 887 | //set scrollbars on canvas and hide loading label |
946 | - $('#daLoaderLabel').css('visibility', 'hidden') | |
888 | + // $('#daLoaderLabel').css('visibility', 'hidden') | |
947 | 889 | |
948 | - | |
949 | - $('#canvasDiv').css('overflow', 'scroll') | |
950 | - if (isiOSSafari) { | |
951 | - $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) | |
952 | - | |
953 | - } | |
954 | - else { | |
955 | - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) | |
956 | - } | |
957 | - | |
890 | + $('#canvasDiv').css('overflow', 'scroll') | |
891 | + if (isiOSSafari) { | |
892 | + $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) | |
958 | 893 | |
894 | + } | |
895 | + else { | |
896 | + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) | |
897 | + } | |
959 | 898 | // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) |
960 | 899 | $('#canvasDiv').scrollTop(50) |
961 | 900 | var abc = $rootScope.BodyRegionCordinatesData; |
... | ... | @@ -996,8 +935,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
996 | 935 | }; |
997 | 936 | } |
998 | 937 | |
999 | - | |
1000 | - | |
1001 | 938 | $('#draggable').css('width', dragdivw); |
1002 | 939 | $('#draggable').css('height', dragdivh) |
1003 | 940 | } |
... | ... | @@ -1059,7 +996,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1059 | 996 | |
1060 | 997 | |
1061 | 998 | $scope.GetImageSource = function (bodyRegionId) { |
1062 | - | |
999 | + | |
1063 | 1000 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
1064 | 1001 | |
1065 | 1002 | //set max for LayerNumber input |
... | ... | @@ -1077,7 +1014,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1077 | 1014 | |
1078 | 1015 | $scope.userInput = parseInt($scope.layerNumber); |
1079 | 1016 | |
1080 | - | |
1017 | + | |
1081 | 1018 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
1082 | 1019 | |
1083 | 1020 | var SelectedLayerData = []; |
... | ... | @@ -1139,7 +1076,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1139 | 1076 | } |
1140 | 1077 | |
1141 | 1078 | $scope.GetBackgroundImgSource = function (bodyRegionId) { |
1142 | - | |
1079 | + | |
1143 | 1080 | |
1144 | 1081 | var selectedGender; |
1145 | 1082 | if (localStorage.getItem("genderId") == "Male") { |
... | ... | @@ -1157,7 +1094,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1157 | 1094 | if ($scope.bagartBodyRegionDetails != null || $scope.bagartBodyRegionDetails != undefined) { |
1158 | 1095 | |
1159 | 1096 | //filter bodyRegion data basd on skintone |
1160 | - $scope.skinTone = $rootScope.globalSetting.ethnicity | |
1097 | + $scope.skinTone = $rootScope.globalSetting.ethnicity | |
1161 | 1098 | $scope.bagartDetailsOnSktn = new jinqJs() |
1162 | 1099 | .from($scope.bagartBodyRegionDetails) |
1163 | 1100 | .where('_Skintone == ' + $scope.skinTone) |
... | ... | @@ -1452,9 +1389,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1452 | 1389 | $scope.isEligibleForHighlight = false; |
1453 | 1390 | } |
1454 | 1391 | |
1455 | - if ($scope.isEligibleForHighlight == true) | |
1456 | - { | |
1457 | - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { | |
1392 | + if ($scope.isEligibleForHighlight == true) { | |
1393 | + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { | |
1458 | 1394 | |
1459 | 1395 | //$rootScope.isLoading = false; |
1460 | 1396 | //$('#spinner').css('visibility', 'hidden'); |
... | ... | @@ -1465,7 +1401,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1465 | 1401 | //$timeout(function () { |
1466 | 1402 | console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) |
1467 | 1403 | $rootScope.isHighLight = true; |
1468 | - console.log('in FlipedImgCanvas just before highLightBody call'); | |
1404 | + console.log('just before highLightBody call'); | |
1469 | 1405 | $scope.highLightBody(); |
1470 | 1406 | console.log('just after highLightBody call'); |
1471 | 1407 | //}, 500); |
... | ... | @@ -1773,9 +1709,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1773 | 1709 | $scope.isEligibleForHighlight = false; |
1774 | 1710 | } |
1775 | 1711 | |
1776 | - if ($scope.isEligibleForHighlight == true) | |
1777 | - { | |
1778 | - | |
1712 | + if ($scope.isEligibleForHighlight == true) { | |
1779 | 1713 | if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { |
1780 | 1714 | |
1781 | 1715 | $rootScope.isLoading = false; |
... | ... | @@ -1787,11 +1721,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1787 | 1721 | //$timeout(function () { |
1788 | 1722 | console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) |
1789 | 1723 | $rootScope.isHighLight = true; |
1790 | - | |
1791 | 1724 | console.log('just before highLightBody call'); |
1792 | - | |
1793 | 1725 | $scope.highLightBody(); |
1794 | - | |
1795 | 1726 | console.log('just after highLightBody call'); |
1796 | 1727 | //}, 500); |
1797 | 1728 | } |
... | ... | @@ -1845,16 +1776,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1845 | 1776 | |
1846 | 1777 | $scope.HighlightBodyOnExtract = function () { |
1847 | 1778 | |
1848 | - | |
1779 | + | |
1849 | 1780 | var multiTermList = []; |
1850 | 1781 | var CallBackBodyRegion = []; |
1851 | 1782 | |
1852 | 1783 | if ($rootScope.isListManagerSelected) { |
1853 | - | |
1854 | - multiTermList = $scope.AllTerms; | |
1855 | - | |
1856 | - } | |
1857 | - else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { | |
1784 | + | |
1785 | + multiTermList = $scope.AllTerms; | |
1786 | + | |
1787 | + } | |
1788 | + else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { | |
1858 | 1789 | angular.forEach($rootScope.previousHighlightList, function (value, key) { |
1859 | 1790 | |
1860 | 1791 | var ActualTermNo = $scope.getActualTermNumber(value); |
... | ... | @@ -2268,7 +2199,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2268 | 2199 | |
2269 | 2200 | //$scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId }); |
2270 | 2201 | |
2271 | - | |
2202 | + | |
2272 | 2203 | // |
2273 | 2204 | |
2274 | 2205 | }; |
... | ... | @@ -2415,11 +2346,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2415 | 2346 | //layer change function |
2416 | 2347 | $scope.LayerChange = function () { |
2417 | 2348 | |
2418 | - | |
2419 | - //if listanager is visisble then close it | |
2420 | - $rootScope.isListManagerSelected = false; | |
2421 | - | |
2422 | - $rootScope.CloseListManager(); | |
2349 | + | |
2350 | + //if listanager is visisble then close it | |
2351 | + $rootScope.isListManagerSelected = false; | |
2352 | + | |
2353 | + $rootScope.CloseListManager(); | |
2423 | 2354 | |
2424 | 2355 | |
2425 | 2356 | |
... | ... | @@ -2536,8 +2467,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2536 | 2467 | if ($scope.isHighlightBodyByBodySystem) { |
2537 | 2468 | $timeout(function () { $scope.DisableProgressBar() }, 20000); |
2538 | 2469 | } |
2539 | - else | |
2540 | - { | |
2470 | + else { | |
2541 | 2471 | $timeout(function () { $scope.DisableProgressBar() }, 2000); |
2542 | 2472 | } |
2543 | 2473 | } |
... | ... | @@ -2693,87 +2623,77 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2693 | 2623 | |
2694 | 2624 | + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' |
2695 | 2625 | + '</div>'; |
2626 | + $('#canvasDiv').append(sppechBubbleDotHTML); | |
2696 | 2627 | |
2697 | - //Issue #7286 :Undefined annotation should not appear | |
2698 | - for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { | |
2699 | - var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; | |
2700 | - } | |
2701 | - | |
2702 | - if (MultipleLanguage == undefined) { | |
2703 | - console.log("No text is found"); | |
2704 | - } else { | |
2705 | - $('#canvasDiv').append(sppechBubbleDotHTML); | |
2706 | - | |
2707 | - if ($scope.MultiLanguageAnnationArray.length > 0) { | |
2708 | - for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { | |
2709 | - var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; | |
2710 | - $("#sppeachBubble").append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>"); | |
2711 | - } | |
2628 | + if ($scope.MultiLanguageAnnationArray.length > 0) { | |
2629 | + for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { | |
2630 | + var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; | |
2631 | + $("#sppeachBubble").append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>"); | |
2712 | 2632 | } |
2713 | - else { | |
2714 | - console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) | |
2715 | - } | |
2716 | - if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { | |
2717 | - if ($scope.longestAnnotation.length <= 10) { | |
2718 | - | |
2633 | + } | |
2634 | + else { | |
2635 | + console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) | |
2636 | + } | |
2637 | + if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { | |
2638 | + if ($scope.longestAnnotation.length <= 10) { | |
2719 | 2639 | |
2720 | - $("#sppeachBubble").css("width", "100px"); | |
2721 | 2640 | |
2722 | - } | |
2641 | + $("#sppeachBubble").css("width", "100px"); | |
2723 | 2642 | |
2724 | - else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { | |
2643 | + } | |
2725 | 2644 | |
2645 | + else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { | |
2726 | 2646 | |
2727 | 2647 | |
2728 | - $("#sppeachBubble").css("width", "140px"); | |
2729 | 2648 | |
2730 | - } | |
2731 | - else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { | |
2649 | + $("#sppeachBubble").css("width", "140px"); | |
2732 | 2650 | |
2651 | + } | |
2652 | + else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { | |
2733 | 2653 | |
2734 | - $("#sppeachBubble").css("width", "195px"); | |
2735 | 2654 | |
2736 | - } | |
2737 | - else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { | |
2655 | + $("#sppeachBubble").css("width", "195px"); | |
2738 | 2656 | |
2739 | - $("#sppeachBubble").css("width", "248px"); | |
2657 | + } | |
2658 | + else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { | |
2740 | 2659 | |
2741 | - } | |
2742 | - else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { | |
2660 | + $("#sppeachBubble").css("width", "248px"); | |
2743 | 2661 | |
2662 | + } | |
2663 | + else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { | |
2744 | 2664 | |
2745 | - $("#sppeachBubble").css("width", "300px"); | |
2746 | - } | |
2747 | 2665 | |
2748 | - else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { | |
2666 | + $("#sppeachBubble").css("width", "300px"); | |
2667 | + } | |
2749 | 2668 | |
2750 | - $("#sppeachBubble").css("width", "370px"); | |
2669 | + else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { | |
2751 | 2670 | |
2752 | - } | |
2671 | + $("#sppeachBubble").css("width", "370px"); | |
2753 | 2672 | |
2754 | - else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { | |
2673 | + } | |
2755 | 2674 | |
2675 | + else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { | |
2756 | 2676 | |
2757 | - $("#sppeachBubble").css("width", "450px"); | |
2758 | 2677 | |
2759 | - } | |
2678 | + $("#sppeachBubble").css("width", "450px"); | |
2760 | 2679 | |
2761 | - else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { | |
2680 | + } | |
2762 | 2681 | |
2682 | + else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { | |
2763 | 2683 | |
2764 | - $("#sppeachBubble").css("width", "510px"); | |
2765 | 2684 | |
2766 | - } | |
2685 | + $("#sppeachBubble").css("width", "510px"); | |
2767 | 2686 | |
2768 | - else { | |
2687 | + } | |
2769 | 2688 | |
2689 | + else { | |
2770 | 2690 | |
2771 | - $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%"); | |
2772 | 2691 | |
2692 | + $("#sppeachBubble").css("width", ($scope.longestAnnotation.length) + "%"); | |
2773 | 2693 | |
2774 | - } | |
2775 | 2694 | |
2776 | 2695 | } |
2696 | + | |
2777 | 2697 | } |
2778 | 2698 | var Globe = []; |
2779 | 2699 | Globe.push({ currentX: x, currentY: y }); |
... | ... | @@ -3261,54 +3181,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3261 | 3181 | |
3262 | 3182 | $scope.createSpeechBubbleBasedOnAnnotationLength = function (pointClicked, x, y, id) { |
3263 | 3183 | var sppechBubbleHTML = "<div id ='" + pointClicked + "' class='com'><div style='z-index:10000;position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.speechBubbleCounter + "'></div><div data=" + $scope.speechBubbleCounter + " id=" + id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'><div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.speechBubbleCounter + " class='dynCross' src=" + $rootScope.path + "></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.speechBubbleCounter + "'></div></div>"; |
3264 | - //Issue #7286 :Undefined annotation should not appear | |
3184 | + $("#canvasDiv").append(sppechBubbleHTML); | |
3185 | + | |
3265 | 3186 | for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { |
3266 | 3187 | var annotation = $scope.MultiLanguageAnnationArray[i]; |
3267 | - } | |
3268 | - | |
3269 | - if (annotation == undefined) { | |
3270 | - console.log("No text found"); | |
3271 | - } else { | |
3272 | 3188 | |
3273 | - $("#canvasDiv").append(sppechBubbleHTML); | |
3274 | - | |
3275 | - for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { | |
3276 | - var annotation = $scope.MultiLanguageAnnationArray[i]; | |
3277 | - | |
3278 | - $("#" + id).append("<p style='margin-bottom:2px;'>" + annotation + "</p>"); | |
3279 | - } | |
3189 | + $("#" + id).append("<p style='margin-bottom:2px;'>" + annotation + "</p>"); | |
3190 | + } | |
3280 | 3191 | |
3281 | - if ($scope.longestAnnotation.length <= 10) { | |
3282 | - $("#" + id).css("width", "100px"); | |
3283 | - } | |
3192 | + if ($scope.longestAnnotation.length <= 10) { | |
3193 | + $("#" + id).css("width", "100px"); | |
3194 | + } | |
3284 | 3195 | |
3285 | - else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { | |
3286 | - $("#" + id).css("width", "140px"); | |
3287 | - } | |
3288 | - else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { | |
3289 | - $("#" + id).css("width", "195px"); | |
3196 | + else if ($scope.longestAnnotation.length > 10 && $scope.longestAnnotation.length <= 17) { | |
3197 | + $("#" + id).css("width", "140px"); | |
3198 | + } | |
3199 | + else if ($scope.longestAnnotation.length > 17 && $scope.longestAnnotation.length <= 26) { | |
3200 | + $("#" + id).css("width", "195px"); | |
3290 | 3201 | |
3291 | - } | |
3292 | - else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { | |
3293 | - $("#" + id).css("width", "248px"); | |
3294 | - } | |
3295 | - else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { | |
3296 | - $("#" + id).css("width", "300px"); | |
3297 | - } | |
3202 | + } | |
3203 | + else if ($scope.longestAnnotation.length > 26 && $scope.longestAnnotation.length <= 34) { | |
3204 | + $("#" + id).css("width", "248px"); | |
3205 | + } | |
3206 | + else if ($scope.longestAnnotation.length > 34 && $scope.longestAnnotation.length <= 44) { | |
3207 | + $("#" + id).css("width", "300px"); | |
3208 | + } | |
3298 | 3209 | |
3299 | - else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { | |
3300 | - $("#" + id).css("width", "370px"); | |
3301 | - } | |
3302 | - else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { | |
3303 | - $("#" + id).css("width", "450px"); | |
3304 | - } | |
3305 | - else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { | |
3306 | - $("#" + id).css("width", "510px"); | |
3210 | + else if ($scope.longestAnnotation.length > 44 && $scope.longestAnnotation.length <= 54) { | |
3211 | + $("#" + id).css("width", "370px"); | |
3212 | + } | |
3213 | + else if ($scope.longestAnnotation.length > 54 && $scope.longestAnnotation.length <= 69) { | |
3214 | + $("#" + id).css("width", "450px"); | |
3215 | + } | |
3216 | + else if ($scope.longestAnnotation.length > 69 && $scope.longestAnnotation.length <= 75) { | |
3217 | + $("#" + id).css("width", "510px"); | |
3307 | 3218 | |
3308 | - } | |
3309 | - else { | |
3310 | - $("#" + id).css("width", ($scope.longestAnnotation.length) + "%"); | |
3311 | - } | |
3219 | + } | |
3220 | + else { | |
3221 | + $("#" + id).css("width", ($scope.longestAnnotation.length) + "%"); | |
3312 | 3222 | } |
3313 | 3223 | } |
3314 | 3224 | |
... | ... | @@ -3407,9 +3317,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3407 | 3317 | |
3408 | 3318 | |
3409 | 3319 | //if listanager is visisble then close it |
3410 | - | |
3411 | - $rootScope.isListManagerSelected = false; | |
3412 | - $rootScope.CloseListManager(); | |
3320 | + | |
3321 | + $rootScope.isListManagerSelected = false; | |
3322 | + $rootScope.CloseListManager(); | |
3413 | 3323 | |
3414 | 3324 | |
3415 | 3325 | $scope.isTransparencyActivated = true; |
... | ... | @@ -3652,7 +3562,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3652 | 3562 | |
3653 | 3563 | $('#btnTranparency').addClass('tButtonActive'); |
3654 | 3564 | //debugger; |
3655 | - // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1); | |
3565 | + // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1); | |
3656 | 3566 | //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
3657 | 3567 | $('#btnTranparency').removeClass('tButtonActive'); |
3658 | 3568 | $('#btnTranparency').addClass('btn-black'); |
... | ... | @@ -3831,7 +3741,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3831 | 3741 | } |
3832 | 3742 | $scope.layerNumber = tranparencyLayer; |
3833 | 3743 | } |
3834 | - | |
3744 | + | |
3835 | 3745 | $('#txtlayerNumber').val($scope.layerNumber); |
3836 | 3746 | //dedebugger; |
3837 | 3747 | //1. get the image source |
... | ... | @@ -4618,7 +4528,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4618 | 4528 | |
4619 | 4529 | |
4620 | 4530 | //if listanager is visisble then close it |
4621 | - | |
4531 | + | |
4622 | 4532 | $rootScope.isListManagerSelected = false; |
4623 | 4533 | $rootScope.CloseListManager(); |
4624 | 4534 | // $('#btnIdentity').addClass('btn-primary'); |
... | ... | @@ -4661,7 +4571,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4661 | 4571 | |
4662 | 4572 | $rootScope.isZoomed = true; |
4663 | 4573 | //1. |
4664 | - | |
4574 | + | |
4665 | 4575 | $scope.flushCanvas(); |
4666 | 4576 | |
4667 | 4577 | if ($scope.zoomInOut == 25) { |
... | ... | @@ -4807,12 +4717,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4807 | 4717 | |
4808 | 4718 | $scope.enableHighlight = function () { |
4809 | 4719 | |
4810 | - | |
4720 | + | |
4811 | 4721 | |
4812 | 4722 | |
4813 | 4723 | //if listanager is visisble then close it |
4814 | 4724 | |
4815 | - // $rootScope.isListManagerSelected = false; | |
4725 | + // $rootScope.isListManagerSelected = false; | |
4816 | 4726 | $rootScope.CloseListManager(); |
4817 | 4727 | |
4818 | 4728 | if ($rootScope.isHighLight == true) { |
... | ... | @@ -4869,15 +4779,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4869 | 4779 | } |
4870 | 4780 | |
4871 | 4781 | $scope.enableNormalMode = function () { |
4872 | - | |
4873 | - console.log('enableNormalMode is called'); | |
4874 | 4782 | |
4875 | - | |
4876 | - // $rootScope.isHighLight = false; | |
4877 | 4783 | |
4878 | - //to do should not call every time | |
4879 | - $rootScope.CloseListManager(); | |
4880 | - | |
4784 | + //if listanager is visisble then close it | |
4785 | + | |
4786 | + // $rootScope.isListManagerSelected = false; | |
4787 | + $rootScope.CloseListManager(); | |
4881 | 4788 | |
4882 | 4789 | if ($rootScope.isNormalMode == true) { |
4883 | 4790 | |
... | ... | @@ -4900,9 +4807,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4900 | 4807 | $rootScope.isZoomed = false; |
4901 | 4808 | |
4902 | 4809 | //6. |
4903 | - $rootScope.isListManagerSelected = false; | |
4904 | - | |
4905 | - //7. | |
4906 | 4810 | $scope.CalculateImageCordinates($rootScope.viewOrientationId); |
4907 | 4811 | |
4908 | 4812 | |
... | ... | @@ -4937,7 +4841,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4937 | 4841 | |
4938 | 4842 | //if listanager is visisble then close it |
4939 | 4843 | |
4940 | - // $rootScope.isListManagerSelected = false; | |
4844 | + // $rootScope.isListManagerSelected = false; | |
4941 | 4845 | $rootScope.CloseListManager(); |
4942 | 4846 | //1. |
4943 | 4847 | $rootScope.isLoading = true; |
... | ... | @@ -5182,7 +5086,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5182 | 5086 | $('#spinner').css('visibility', 'hidden'); |
5183 | 5087 | //} |
5184 | 5088 | |
5185 | - | |
5089 | + | |
5186 | 5090 | if (($scope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { |
5187 | 5091 | |
5188 | 5092 | |
... | ... | @@ -5225,8 +5129,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5225 | 5129 | else if ($rootScope.isListManagerSelected == true) { |
5226 | 5130 | console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') |
5227 | 5131 | |
5228 | - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | |
5229 | - | |
5132 | + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); | |
5133 | + | |
5230 | 5134 | } |
5231 | 5135 | } |
5232 | 5136 | //else { |
... | ... | @@ -5387,8 +5291,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5387 | 5291 | else if ($rootScope.isListManagerSelected == true) { |
5388 | 5292 | console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') |
5389 | 5293 | $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); |
5390 | - | |
5391 | - } | |
5294 | + | |
5295 | + } | |
5392 | 5296 | } |
5393 | 5297 | |
5394 | 5298 | } |
... | ... | @@ -5469,9 +5373,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5469 | 5373 | $scope.OnGenderChange = function (event) { |
5470 | 5374 | |
5471 | 5375 | //if listanager is visisble then close it |
5472 | - | |
5473 | - //$rootScope.isListManagerSelected = false; | |
5474 | - $rootScope.CloseListManager(); | |
5376 | + | |
5377 | + //$rootScope.isListManagerSelected = false; | |
5378 | + $rootScope.CloseListManager(); | |
5475 | 5379 | |
5476 | 5380 | $rootScope.isLoading = true; |
5477 | 5381 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -5935,8 +5839,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5935 | 5839 | $rootScope.Object1Index = 0; |
5936 | 5840 | $rootScope.Object2Index = 0; |
5937 | 5841 | $rootScope.resetText = 0; |
5938 | - $rootScope.resetTextSave = 0; | |
5939 | - $rootScope.ObjectIndexSave = 0; | |
5842 | + | |
5940 | 5843 | var arrayRect = {}; |
5941 | 5844 | |
5942 | 5845 | |
... | ... | @@ -6065,10 +5968,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6065 | 5968 | |
6066 | 5969 | resizeFromCenter: false, |
6067 | 5970 | |
6068 | - dblclick: function () { | |
6069 | - $rootScope.backOpacity(); | |
6070 | - | |
6071 | - }, | |
6072 | 5971 | |
6073 | 5972 | click: function (layer) { |
6074 | 5973 | $rootScope.canvasLayerNameCollection = []; |
... | ... | @@ -6145,7 +6044,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6145 | 6044 | |
6146 | 6045 | |
6147 | 6046 | click: function (layer) { |
6148 | - // alert(layer.name); | |
6149 | 6047 | $rootScope.canvasLayerNameCollection = []; |
6150 | 6048 | $rootScope.canvasLayerNameCollection.push(layer.name); |
6151 | 6049 | $('#canvas').setLayer(layer.name, { |
... | ... | @@ -6161,7 +6059,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6161 | 6059 | }, |
6162 | 6060 | mouseout: function (layer) { |
6163 | 6061 | $rootScope.canvasLayerNameCollection = []; |
6164 | - | |
6165 | 6062 | $('#canvas').setLayer(layer.name, { |
6166 | 6063 | handle: { |
6167 | 6064 | type: 'arc', |
... | ... | @@ -6288,7 +6185,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6288 | 6185 | x2: $scope.x, y2: $scope.y, |
6289 | 6186 | |
6290 | 6187 | click: function (layer) { |
6291 | - | |
6188 | + // debugger; | |
6292 | 6189 | $rootScope.shapeTypePin = "Pin"; |
6293 | 6190 | $rootScope.canvasLayerNameCollection = []; |
6294 | 6191 | var pinLine_layer = layer.name; |
... | ... | @@ -6312,7 +6209,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6312 | 6209 | |
6313 | 6210 | }, |
6314 | 6211 | mouseout: function (layer) { |
6315 | - | |
6212 | + // $rootScope.resetPinArc = ""; | |
6213 | + // ax = ""; | |
6214 | + | |
6316 | 6215 | $rootScope.canvasLayerNameCollection = []; |
6317 | 6216 | $('#canvas').setLayer(layer.name, { |
6318 | 6217 | handle: { |
... | ... | @@ -6375,8 +6274,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6375 | 6274 | $('.btnCursor').addClass('activebtncolor'); |
6376 | 6275 | break; |
6377 | 6276 | case "TextArea": |
6378 | - $rootScope.IsTextAlreadySave = false; | |
6379 | - $("#text_area").val(''); | |
6277 | + | |
6380 | 6278 | // Draw text |
6381 | 6279 | $rootScope.resetTextRect = $rootScope.ObjectIndex++; |
6382 | 6280 | $rootScope.resetText = $rootScope.ObjectIndex++; |
... | ... | @@ -6394,7 +6292,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6394 | 6292 | align: "left", |
6395 | 6293 | fontFamily: 'Verdana, sans-serif', |
6396 | 6294 | text: '' |
6397 | - | |
6295 | + | |
6296 | + | |
6297 | + | |
6398 | 6298 | }) |
6399 | 6299 | // Draw rect as wide as the text |
6400 | 6300 | .drawRect({ |
... | ... | @@ -6458,8 +6358,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6458 | 6358 | |
6459 | 6359 | $("#annotationTextModal").modal("toggle"); |
6460 | 6360 | $('.btnCursor').trigger('click'); |
6461 | - $("#text_area").val(''); | |
6462 | - $("#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" }); | |
6463 | 6361 | $(".btn-annotation").removeClass("activebtncolor"); |
6464 | 6362 | $('.btnCursor').addClass('activebtncolor'); |
6465 | 6363 | break; |
... | ... | @@ -6483,275 +6381,129 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6483 | 6381 | $rootScope.underlineText; |
6484 | 6382 | $rootScope.textArea; |
6485 | 6383 | $rootScope.fontFamily; |
6486 | - $rootScope.TextPropertyArray = []; | |
6487 | - $rootScope.modifySavedText = []; | |
6488 | - $rootScope.TextRectangleArr = []; | |
6489 | - $rootScope.rectDimension = []; | |
6490 | - | |
6384 | + $rootScope.saveText = function () { | |
6491 | 6385 | |
6492 | - // will refactor this code later | |
6386 | + $rootScope.fontSizes = $("#text_area").css("font-size"); | |
6387 | + $rootScope.fontWeight = $("#text_area").css("font-weight"); | |
6388 | + $rootScope.fontStyle = $("#text_area").css("font-style"); | |
6389 | + $rootScope.textAlignmt = $("#text_area").css("text-align"); | |
6390 | + $rootScope.fontColor = $("#text_area").css("color"); | |
6391 | + $rootScope.fontFamily = $("#text_area").css("font-family"); | |
6392 | + $rootScope.underlineText = $("#text_area").css("text-decoration"); | |
6393 | + $rootScope.textArea = $("#text_area").val(); | |
6394 | + $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); | |
6395 | + $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | |
6396 | + | |
6397 | + $('#canvas').drawText({ | |
6398 | + layer: true, | |
6399 | + draggable: true, | |
6400 | + name: 'TextArea_' + $rootScope.resetText, | |
6401 | + groups: ['TextArea_' + $rootScope.resetText], | |
6402 | + dragGroups: ['TextArea_' + $rootScope.resetText], | |
6403 | + fillStyle: $rootScope.fontColor, | |
6404 | + fontStyle: $rootScope.fontStyle, | |
6405 | + fontSize: $rootScope.fontSizes, | |
6406 | + fontFamily: $rootScope.fontFamily, | |
6407 | + align: $rootScope.textAlignmt, | |
6408 | + strokeWidth: 0, | |
6409 | + text: $rootScope.textArea, | |
6410 | + x: $scope.offsetX1, y: $scope.offsetY1, | |
6411 | + maxWidth: $scope.x - $scope.offsetX1, | |
6412 | + maxHeight: $scope.y - $scope.offsetY1, | |
6413 | + | |
6414 | + | |
6415 | + click: function (layer) { | |
6416 | + | |
6417 | + | |
6418 | + | |
6419 | + }, | |
6420 | + change: function (layer, props) { | |
6421 | + | |
6422 | + } | |
6423 | + | |
6424 | + }) | |
6425 | + // Draw rect as wide as the text | |
6426 | + .drawRect({ | |
6427 | + name: 'TextArea1_' + $rootScope.resetText, | |
6428 | + layer: true, | |
6429 | + draggable: true, | |
6430 | + groups: ['TextArea_' + $rootScope.resetText], | |
6431 | + dragGroups: ['TextArea_' + $rootScope.resetText], | |
6432 | + opacity: $rootScope.shapestyleOpacity, | |
6433 | + // strokeStyle: 'black', | |
6434 | + // strokeWidth: 2, | |
6435 | + strokeStyle: $rootScope.shapestyleborderColor, | |
6436 | + strokeWidth: $rootScope.shapestyleborderWidth, | |
6437 | + // fillStyle: $rootScope.shapestyleFillColor, | |
6438 | + x: $scope.offsetX1, y: $scope.offsetY1, | |
6439 | + width: $scope.x - $scope.offsetX1, | |
6440 | + height: $scope.y - $scope.offsetY1, | |
6441 | + | |
6442 | + click: function (layer) { | |
6443 | + $rootScope.shapeTypeText = "textAreaRect"; | |
6444 | + | |
6445 | + var layerNameSplit = layer.name; | |
6446 | + | |
6447 | + var splitedName = layerNameSplit.split("_"); | |
6448 | + | |
6449 | + var textValName = "TextArea_"; | |
6450 | + | |
6451 | + var concatinateResult = textValName.concat(splitedName[1]); | |
6452 | + | |
6453 | + $rootScope.canvasLayerNameCollection = []; | |
6454 | + $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); | |
6455 | + | |
6456 | + | |
6457 | + | |
6458 | + $('#canvas').setLayer(layer.name, { | |
6459 | + handle: { | |
6460 | + type: 'rectangle', | |
6461 | + fillStyle: '#fff', | |
6462 | + strokeStyle: '#c33', | |
6463 | + strokeWidth: 2, | |
6464 | + width: 5, height: 5, | |
6465 | + cornerRadius: 3 | |
6466 | + } | |
6467 | + }).drawLayers(); | |
6468 | + | |
6469 | + }, | |
6470 | + mouseout: function (layer) { | |
6471 | + | |
6472 | + $rootScope.canvasLayerNameCollection = []; | |
6473 | + $('#canvas').setLayer(layer.name, { | |
6474 | + handle: { | |
6475 | + type: 'rectangle', | |
6476 | + fillStyle: 'pink', | |
6477 | + strokeStyle: 'yellow', | |
6478 | + strokeWidth: 0, | |
6479 | + width: 0, height: 0, | |
6480 | + cornerRadius: 0 | |
6481 | + } | |
6482 | + | |
6483 | + }).drawLayers(); | |
6484 | + | |
6485 | + }, | |
6486 | + mouseover: function (layer) { | |
6487 | + | |
6488 | + $('#canvas').setLayer(layer.name, { | |
6489 | + handle: { | |
6490 | + type: 'rectangle', | |
6491 | + fillStyle: '#fff', | |
6492 | + strokeStyle: '#c33', | |
6493 | + strokeWidth: 2, | |
6494 | + width: 5, height: 5, | |
6495 | + cornerRadius: 3 | |
6496 | + } | |
6497 | + }).drawLayers(); | |
6498 | + | |
6499 | + } | |
6500 | + }); | |
6501 | + $("#text_area").val(''); | |
6502 | + | |
6503 | + $("#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" }); | |
6493 | 6504 | |
6494 | - | |
6495 | - $rootScope.saveText = function () { | |
6496 | - // this part will work first time when save button will be clicked | |
6497 | - if ($rootScope.IsTextAlreadySave == false) { | |
6498 | - // getting textarea style properties | |
6499 | - $rootScope.fontSizes = $("#text_area").css("font-size"); | |
6500 | - $rootScope.fontWeight = $("#text_area").css("font-weight"); | |
6501 | - $rootScope.fontStyle = $("#text_area").css("font-style"); | |
6502 | - $rootScope.textAlignmt = $("#text_area").css("text-align"); | |
6503 | - $rootScope.fontColor = $("#text_area").css("color"); | |
6504 | - $rootScope.fontFamily = $("#text_area").css("font-family"); | |
6505 | - $rootScope.underlineText = $("#text_area").css("text-decoration"); | |
6506 | - $rootScope.textArea = $("#text_area").val(); | |
6507 | - | |
6508 | - // deleting previous text area | |
6509 | - | |
6510 | - $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); | |
6511 | - $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | |
6512 | - | |
6513 | - // Text After Saving in Rectangle | |
6514 | - $('#canvas').drawText({ | |
6515 | - layer: true, | |
6516 | - draggable: true, | |
6517 | - name: 'TextArea_' + $rootScope.resetText, | |
6518 | - groups: ['TextArea_' + $rootScope.resetText], | |
6519 | - dragGroups: ['TextArea_' + $rootScope.resetText], | |
6520 | - fillStyle: $rootScope.fontColor, | |
6521 | - fontStyle: $rootScope.fontStyle, | |
6522 | - fontSize: $rootScope.fontSizes, | |
6523 | - fontFamily: $rootScope.fontFamily, | |
6524 | - align: $rootScope.textAlignmt, | |
6525 | - strokeWidth: 0, | |
6526 | - text: $rootScope.textArea, | |
6527 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
6528 | - maxWidth: $scope.x - $scope.offsetX1, | |
6529 | - maxHeight: $scope.y - $scope.offsetY1, | |
6530 | - add: function (layer) { | |
6531 | - $rootScope.TextPropertyArray.push({ Text1: '', Align: '', FontColor: '', FontSize: '', FontStyle: '', FontFamily: '' }); | |
6532 | - $rootScope.TextPropertyArray.push({ Text1: layer.text, Align: layer.align, FontColor: layer.fillStyle, FontSize: layer.fontSize, FontStyle: layer.fontStyle, FontFamily: layer.fontFamily }); | |
6533 | - } | |
6534 | - }) | |
6535 | - // Draw rectangle | |
6536 | - .drawRect({ | |
6537 | - name: 'TextArea1_' + $rootScope.resetText, | |
6538 | - layer: true, | |
6539 | - draggable: true, | |
6540 | - groups: ['TextArea_' + $rootScope.resetText], | |
6541 | - dragGroups: ['TextArea_' + $rootScope.resetText], | |
6542 | - opacity: $rootScope.shapestyleOpacity, | |
6543 | - strokeStyle: $rootScope.shapestyleborderColor, | |
6544 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
6545 | - x: $scope.offsetX1, y: $scope.offsetY1, | |
6546 | - width: $scope.x - $scope.offsetX1, | |
6547 | - height: $scope.y - $scope.offsetY1, | |
6548 | - click: function (layer) { | |
6549 | - $rootScope.shapeTypeText = "textAreaRect"; | |
6550 | - | |
6551 | - var layerNameSplit = layer.name; | |
6552 | - var splitedName = layerNameSplit.split("_"); | |
6553 | - var textValName = "TextArea_"; | |
6554 | - var concatinateResult = textValName.concat(splitedName[1]); | |
6555 | - $rootScope.canvasLayerNameCollection = []; | |
6556 | - $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); | |
6557 | - $('#canvas').setLayer(layer.name, { | |
6558 | - handle: { | |
6559 | - type: 'rectangle', | |
6560 | - fillStyle: '#fff', | |
6561 | - strokeStyle: '#c33', | |
6562 | - strokeWidth: 2, | |
6563 | - width: 5, height: 5, | |
6564 | - cornerRadius: 3 | |
6565 | - } | |
6566 | - }).drawLayers(); | |
6567 | - }, | |
6568 | - dblclick: function (layer) { | |
6569 | - $rootScope.IsTextAlreadySave = true; | |
6570 | - | |
6571 | - var _rectLayerOnSave = layer.name; | |
6572 | - var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); | |
6573 | - var TextAreaRectName = "TextArea_"; | |
6574 | - var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]); | |
6575 | - $rootScope.modifySavedText.push({ TextName: layer.name, RectText: TextAreaRectNameConcatenated }); | |
6576 | - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | |
6577 | - var _rectLayerOnSaveSplitInt; | |
6578 | - if (_rectLayerOnSaveSplit[1] >= 3) | |
6579 | - _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1] - 2); | |
6580 | - else | |
6581 | - _rectLayerOnSaveSplitInt = parseInt(_rectLayerOnSaveSplit[1]); | |
6582 | - var b = $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Text1; | |
6583 | - $("#text_area").val(b); | |
6584 | - $("#text_area").css("font-size", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontSize); | |
6585 | - $("#text_area").css("font-weight", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle); | |
6586 | - $("#text_area").css("font-style", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontStyle); | |
6587 | - $("#text_area").css("text-align", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].Align); | |
6588 | - $("#text_area").css("color", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor); | |
6589 | - $("#text_area").css("font-family", $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontFamily); | |
6590 | - $("#text_area").css("text-decoration", $rootScope.underlineText); | |
6591 | - _rectLayerOnSaveSplitInt = ''; b = ''; | |
6592 | - $("#annotationTextModal").modal("toggle"); | |
6593 | - }, | |
6594 | - mouseout: function (layer) { | |
6595 | - $rootScope.canvasLayerNameCollection = []; | |
6596 | - $('#canvas').setLayer(layer.name, { | |
6597 | - handle: { | |
6598 | - type: 'rectangle', | |
6599 | - fillStyle: 'pink', | |
6600 | - strokeStyle: 'yellow', | |
6601 | - strokeWidth: 0, | |
6602 | - width: 0, height: 0, | |
6603 | - cornerRadius: 0 | |
6604 | - } | |
6605 | - }).drawLayers(); | |
6606 | - }, | |
6607 | - mouseover: function (layer) { | |
6608 | - $('#canvas').setLayer(layer.name, { | |
6609 | - handle: { | |
6610 | - type: 'rectangle', | |
6611 | - fillStyle: '#fff', | |
6612 | - strokeStyle: '#c33', | |
6613 | - strokeWidth: 2, | |
6614 | - width: 5, height: 5, | |
6615 | - cornerRadius: 3 | |
6616 | - } | |
6617 | - }).drawLayers(); | |
6618 | - | |
6619 | - } | |
6620 | - }); | |
6621 | - $("#text_area").val(''); | |
6622 | - $("#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" }); | |
6623 | - | |
6624 | - } | |
6625 | - | |
6626 | -// this part will work second time when save button will be clicked | |
6627 | - else { | |
6628 | - // getting textarea style properties | |
6629 | - var _modifiedText = $("#text_area").val(); | |
6630 | - var _modifiedFontSize = $("#text_area").css("font-size"); | |
6631 | - var _modifiedFontWeight = $("#text_area").css("font-weight"); | |
6632 | - var _modifiedFontStyle = $("#text_area").css("font-style"); | |
6633 | - var _modifiedTextAlign = $("#text_area").css("text-align"); | |
6634 | - var _modifiedFontColor = $("#text_area").css("color"); | |
6635 | - var _modifiedFontFamily = $("#text_area").css("font-family"); | |
6636 | - var _modifiedFontDecoration = $("#text_area").css("text-decoration"); | |
6637 | - | |
6638 | - // deleting previous textarea | |
6639 | - $("#canvas").removeLayer($rootScope.modifySavedText[0].RectText).drawLayers(); | |
6640 | - $("#canvas").removeLayer($rootScope.modifySavedText[0].TextName).drawLayers(); | |
6641 | - $rootScope.resetTextRectSave = $rootScope.ObjectIndexSave++; | |
6642 | - $rootScope.resetTextSave = $rootScope.ObjectIndexSave++; | |
6643 | - | |
6644 | - // generating new text area | |
6645 | - $('#canvas').drawText({ | |
6646 | - layer: true, | |
6647 | - draggable: true, | |
6648 | - name: 'TextAreaAfterEdit_' + $rootScope.resetTextSave, | |
6649 | - groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
6650 | - dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
6651 | - fillStyle: _modifiedFontColor, | |
6652 | - fontStyle: _modifiedFontStyle, | |
6653 | - fontSize: _modifiedFontSize, | |
6654 | - fontFamily: _modifiedFontFamily, | |
6655 | - align: _modifiedTextAlign, | |
6656 | - strokeWidth: 0, | |
6657 | - text: _modifiedText, | |
6658 | - x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | |
6659 | - maxWidth: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | |
6660 | - maxHeight: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height | |
6661 | - | |
6662 | - }) | |
6663 | - // Draw rect as wide as the text | |
6664 | - .drawRect({ | |
6665 | - name: 'TextAreaAfterEditRect_' + $rootScope.resetTextSave, | |
6666 | - layer: true, | |
6667 | - draggable: true, | |
6668 | - groups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
6669 | - dragGroups: ['TextAreaAfterEdit_' + $rootScope.resetTextSave], | |
6670 | - opacity: $rootScope.shapestyleOpacity, | |
6671 | - strokeStyle: $rootScope.shapestyleborderColor, | |
6672 | - strokeWidth: $rootScope.shapestyleborderWidth, | |
6673 | - x: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].x, y: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].y, | |
6674 | - width: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].width, | |
6675 | - height: $rootScope.rectDimension[$rootScope.rectDimension.length - 1].height, | |
6676 | - click: function (layer) { | |
6677 | - $rootScope.shapeTypeText = "textAreaRect"; | |
6678 | - var layerNameSplit = layer.name; | |
6679 | - var splitedName = layerNameSplit.split("_"); | |
6680 | - var textValName = "TextAreaAfterEdit_"; | |
6681 | - var concatinateResult = textValName.concat(splitedName[1]); | |
6682 | - $rootScope.canvasLayerNameCollection = []; | |
6683 | - $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult }); | |
6684 | - | |
6685 | - $('#canvas').setLayer(layer.name, { | |
6686 | - handle: { | |
6687 | - type: 'rectangle', | |
6688 | - fillStyle: '#fff', | |
6689 | - strokeStyle: '#c33', | |
6690 | - strokeWidth: 2, | |
6691 | - width: 5, height: 5, | |
6692 | - cornerRadius: 3 | |
6693 | - } | |
6694 | - }).drawLayers(); | |
6695 | - | |
6696 | - }, | |
6697 | - dblclick: function (layer) { | |
6698 | - | |
6699 | - $rootScope.IsTextAlreadySave = true; | |
6700 | - var _rectLayerOnSave = layer.name; | |
6701 | - var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_"); | |
6702 | - var RectNameAfterEdit = "TextAreaAfterEdit_"; | |
6703 | - var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]); | |
6704 | - $rootScope.modifySavedText.push({ TextName: layer.name, RectText: RectNameAfterEditResult }); | |
6705 | - $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y }); | |
6706 | - $("#text_area").val(_modifiedText); | |
6707 | - $("#text_area").css("font-size", _modifiedFontSize); | |
6708 | - $("#text_area").css("font-weight", _modifiedFontWeight); | |
6709 | - $("#text_area").css("font-style", _modifiedFontStyle); | |
6710 | - $("#text_area").css("text-align", _modifiedTextAlign); | |
6711 | - $("#text_area").css("color", _modifiedFontColor); | |
6712 | - $("#text_area").css("font-family", _modifiedFontFamily); | |
6713 | - $("#text_area").css("text-decoration", _modifiedFontDecoration); | |
6714 | - $("#annotationTextModal").modal("toggle"); | |
6715 | - }, | |
6716 | - mouseout: function (layer) { | |
6717 | - $rootScope.canvasLayerNameCollection = []; | |
6718 | - $('#canvas').setLayer(layer.name, { | |
6719 | - handle: { | |
6720 | - type: 'rectangle', | |
6721 | - fillStyle: 'pink', | |
6722 | - strokeStyle: 'yellow', | |
6723 | - strokeWidth: 0, | |
6724 | - width: 0, height: 0, | |
6725 | - cornerRadius: 0 | |
6726 | - } | |
6727 | - }).drawLayers(); | |
6728 | - }, | |
6729 | - mouseover: function (layer) { | |
6730 | - $('#canvas').setLayer(layer.name, { | |
6731 | - handle: { | |
6732 | - type: 'rectangle', | |
6733 | - fillStyle: '#fff', | |
6734 | - strokeStyle: '#c33', | |
6735 | - strokeWidth: 2, | |
6736 | - width: 5, height: 5, | |
6737 | - cornerRadius: 3 | |
6738 | - } | |
6739 | - }).drawLayers(); | |
6740 | - | |
6741 | - } | |
6742 | - }); | |
6743 | - $rootScope.modifySavedText = []; | |
6744 | - | |
6745 | - } | |
6746 | 6505 | } |
6747 | - | |
6748 | - // deleting text area on close button | |
6749 | - $rootScope.closeModal = function () { | |
6750 | 6506 | |
6751 | - $("#canvas").removeLayer('TextArea_' + $rootScope.resetText).drawLayers(); | |
6752 | - $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | |
6753 | - | |
6754 | - } | |
6755 | 6507 | |
6756 | 6508 | |
6757 | 6509 | function OnPaintCanvasMouseMove(event) { |
... | ... | @@ -6760,7 +6512,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6760 | 6512 | } |
6761 | 6513 | |
6762 | 6514 | $rootScope.FreeStylePaint = function (e) { |
6763 | - | |
6515 | + // debugger; | |
6516 | + | |
6517 | + | |
6518 | + // $rootScope.shapeType = "FreeStylePaint"; | |
6519 | + canvasPaint.addEventListener('mouseup', $scope.OnPaintBrushCanvasMouseUp, false); | |
6520 | + canvasPaint.addEventListener('mousedown', $scope.OnPaintBrushCanvasMouseDown, false); | |
6521 | + | |
6764 | 6522 | |
6765 | 6523 | } |
6766 | 6524 | $scope.OnPaintBrushCanvasMouseDown = function (event) { |
... | ... | @@ -6768,22 +6526,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6768 | 6526 | |
6769 | 6527 | case "FreeStylePaint": |
6770 | 6528 | |
6771 | - | |
6772 | - | |
6773 | - // $('#canvasPaint').sketch(); | |
6774 | - // $('#canvasPaint').sketch({ defaultSize: 1 }); | |
6775 | - // if ($("#amount-2").val() == '') { | |
6776 | - // //$('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6777 | - // $('#canvasPaint').sketch(); | |
6778 | - // } | |
6779 | - // else { | |
6529 | + debugger; | |
6530 | + $('#canvasPaint').sketch({ defaultSize: 1 }); | |
6531 | + //if ($("#amount-2").val() == '') { | |
6532 | + // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6533 | + //} | |
6534 | + //else { | |
6780 | 6535 | |
6781 | - // // var a = $("#amount-2").val(); | |
6782 | - //// $scope.shapesize = parseInt(a); | |
6783 | - // // $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); | |
6784 | - // // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6536 | + // var a = $("#amount-2").val(); | |
6537 | + // $scope.shapesize = parseInt(a); | |
6538 | + // // alert(JSON.stringify({ defaultSize: $scope.shapesize })); | |
6539 | + // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); | |
6785 | 6540 | |
6786 | - // } | |
6541 | + //} | |
6787 | 6542 | |
6788 | 6543 | |
6789 | 6544 | break; |
... | ... | @@ -6801,7 +6556,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6801 | 6556 | |
6802 | 6557 | // case "FreeStylePaint": |
6803 | 6558 | |
6804 | - | |
6559 | + // debugger; | |
6560 | + | |
6805 | 6561 | // if ($("#amount-2").val() == '') |
6806 | 6562 | // { |
6807 | 6563 | // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize }); |
... | ... | @@ -6829,7 +6585,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6829 | 6585 | |
6830 | 6586 | |
6831 | 6587 | if (event.which == 46) { |
6832 | - | |
6588 | + //debugger; | |
6833 | 6589 | if ($rootScope.shapeTypePin == "Pin") { |
6834 | 6590 | |
6835 | 6591 | |
... | ... | @@ -7162,16 +6918,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7162 | 6918 | } |
7163 | 6919 | |
7164 | 6920 | $scope.jumpToTerm = function (event) { |
7165 | - | |
7166 | - | |
7167 | - //1. | |
7168 | 6921 | $scope.searchFilter = event.currentTarget.innerHTML; |
7169 | - | |
7170 | - //2. | |
7171 | 6922 | $scope.HighlightBodyOnListManagerSelection(event); |
7172 | 6923 | |
7173 | 6924 | $scope.IsSearchVisible = false; |
7174 | - $rootScope.isNormalMode = false; | |
7175 | 6925 | |
7176 | 6926 | //Highlight only Highlight button |
7177 | 6927 | |
... | ... | @@ -7219,7 +6969,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7219 | 6969 | |
7220 | 6970 | //list manager |
7221 | 6971 | $scope.$on('listManagerEvent', function (event, data) { |
7222 | - | |
6972 | + // debugger; | |
7223 | 6973 | $('#spinner').css('visibility', 'visible'); |
7224 | 6974 | console.log('listManagerEvent') |
7225 | 6975 | if ($rootScope.islistManagerEventAlredayDispachted == true) { |
... | ... | @@ -7239,7 +6989,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7239 | 6989 | $compile($elem)($scope); |
7240 | 6990 | }) |
7241 | 6991 | |
7242 | - | |
6992 | + | |
7243 | 6993 | $('#viewName').empty(); |
7244 | 6994 | var currentView = localStorage.getItem("currentViewTitle"); |
7245 | 6995 | var viewNmeHtml = '<option>' + currentView + '</option>' |
... | ... | @@ -7319,23 +7069,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7319 | 7069 | |
7320 | 7070 | |
7321 | 7071 | } |
7322 | - } | |
7072 | + } | |
7323 | 7073 | |
7324 | 7074 | |
7325 | 7075 | $scope.HighlightBodyOnListManagerSelection = function (event) { |
7326 | 7076 | |
7327 | 7077 | $scope.terminateCurrentlyRunningWPs(); |
7328 | - | |
7078 | + //debugger | |
7329 | 7079 | $rootScope.isListManagerSelected = true; |
7330 | - | |
7331 | - $rootScope.setScrollBasedOnSearch = true; | |
7332 | - | |
7333 | 7080 | $rootScope.isLoading = true; |
7334 | 7081 | |
7335 | 7082 | $('#spinner').css('visibility', 'visible'); |
7336 | 7083 | //1. |
7337 | - $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value; | |
7338 | - console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber) | |
7084 | + $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value; | |
7085 | + console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber) | |
7339 | 7086 | |
7340 | 7087 | //2. |
7341 | 7088 | |
... | ... | @@ -7520,8 +7267,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7520 | 7267 | var canvasX = parseInt($('#canvasDiv').css('left')); |
7521 | 7268 | var canvasY = parseInt($('#canvasDiv').css('top')); |
7522 | 7269 | //var canvasWidth = parseInt($('#canvasDiv').css('width')); |
7523 | - // var canvasHeight = parseInt($('#canvasDiv').css('height')); | |
7524 | - | |
7270 | + // var canvasHeight = parseInt($('#canvasDiv').css('height')); | |
7271 | + | |
7525 | 7272 | |
7526 | 7273 | var canvasHeight = $('#canvasDiv').height(); |
7527 | 7274 | var canvasWidth = $('#canvasDiv').width(); |
... | ... | @@ -7529,11 +7276,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7529 | 7276 | var canvasBottom = canvasY + canvasHeight; |
7530 | 7277 | var canvasRight = canvasX + canvasWidth |
7531 | 7278 | |
7532 | - if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom){ | |
7533 | - //if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) { | |
7534 | - | |
7535 | - //} | |
7536 | - //else { | |
7279 | + if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom) { | |
7280 | + //if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) { | |
7281 | + | |
7282 | + //} | |
7283 | + //else { | |
7537 | 7284 | |
7538 | 7285 | |
7539 | 7286 | |
... | ... | @@ -7568,7 +7315,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7568 | 7315 | |
7569 | 7316 | |
7570 | 7317 | console.log('newX =' + newX + ',newY= ' + newY) |
7571 | - | |
7318 | + | |
7572 | 7319 | |
7573 | 7320 | $scope.isLoading = false; |
7574 | 7321 | $('#spinner').css('visibility', 'hidden'); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -72,11 +72,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
72 | 72 | if (alreadyOpenThisView != null) { |
73 | 73 | for (var i = 0; i < $rootScope.openViews.length; i++) { |
74 | 74 | k++; |
75 | -<<<<<<< HEAD | |
76 | 75 | if ($rootScope.openViews[i].bodyView == title) { |
77 | -======= | |
78 | - if ($rootScope.openViews[i].body - views == title) { | |
79 | ->>>>>>> 27d0ad0c6a406c5ac1911e4eafe4ab2d1a009416 | |
80 | 76 | $rootScope.openViews.splice((k - 1), 1); |
81 | 77 | |
82 | 78 | $rootScope.openViews.push( |
... | ... | @@ -134,30 +130,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
134 | 130 | } |
135 | 131 | |
136 | 132 | $rootScope.OnIdentifyClick = function () { |
137 | - // $rootScope.isIdetifyClicked = true; | |
138 | - // $rootScope.isDrawingToolSelected = false; | |
139 | - $("#canvasPaint").css("display", "none"); | |
140 | - $("#canvas").css("display", "none"); | |
141 | - | |
142 | - // $("#canvasPaint").css("z-index", "0"); | |
143 | - // $("#canvas").css("z-index", "0"); | |
144 | - $('.btnCursor').removeClass('activebtncolor'); | |
145 | - | |
133 | + $rootScope.isIdetifyClicked = true; | |
134 | + $rootScope.isDrawingToolSelected = false; | |
146 | 135 | } |
147 | 136 | |
148 | - | |
149 | - | |
150 | - $rootScope.DrawingMode = function () { | |
151 | - | |
152 | - $('.btnCursor').addClass('activebtncolor'); | |
153 | - $rootScope.switchCanvas(); | |
154 | - $("#canvasPaint").css("display", "block"); | |
155 | - $("#canvas").css("display", "block"); | |
156 | - | |
157 | - } | |
158 | - | |
159 | - | |
160 | - | |
161 | 137 | //----Annotation Toolbar: Jcanvas----- |
162 | 138 | |
163 | 139 | $rootScope.DrawLine = function (e) { |
... | ... | @@ -199,24 +175,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
199 | 175 | $(".btn-annotation-rectangle").addClass("activebtncolor"); |
200 | 176 | } |
201 | 177 | $rootScope.paintBrush = function () { |
202 | - // debugger; | |
203 | - // $('.btnCursor').addClass('activebtncolor'); | |
204 | - $rootScope.switchCanvasToPaintCanvas(); | |
205 | - $rootScope.shapeType = "FreeStylePaint"; | |
206 | - var a = $("#amount-2").val(); | |
207 | - $rootScope.shapeSize = parseInt(a); | |
208 | - if ($rootScope.shapeSize == '') { | |
209 | - $('#canvasPaint').sketch({ defaultSize: 1 }); | |
210 | - } | |
211 | - else { | |
212 | - $('#canvasPaint').sketch({ defaultSize: $rootScope.shapeSize }); | |
213 | - | |
214 | - } | |
215 | - | |
216 | - | |
217 | - // $('#canvasPaint').sketch(); | |
218 | 178 | |
179 | + $('.btnCursor').addClass('activebtncolor'); | |
180 | + $rootScope.switchCanvasToPaintCanvas(); | |
219 | 181 | |
182 | + $rootScope.shapeType = "FreeStylePaint"; | |
183 | + //alert($rootScope.shapeType); | |
220 | 184 | |
221 | 185 | } |
222 | 186 | |
... | ... | @@ -255,8 +219,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
255 | 219 | $('.btnCursor').removeClass('activebtncolor'); |
256 | 220 | $(".btn-annotation").removeClass("activebtncolor"); |
257 | 221 | $(".btn-annotation-Text").addClass("activebtncolor"); |
258 | - // $("#text_area").val(''); | |
259 | - // $("#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" }); | |
222 | + | |
260 | 223 | } |
261 | 224 | |
262 | 225 | $rootScope.DrawPolygon = function () { |
... | ... | @@ -312,14 +275,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
312 | 275 | $rootScope.shapestyleborderWidth = intPart[0]; |
313 | 276 | $rootScope.shapestyleborderStyles = "solid"; |
314 | 277 | |
315 | - | |
316 | 278 | $('#editshapestyle').modal('hide'); |
317 | - // name: 'Circle_' + $rootScope.resetCircle, | |
318 | - | |
319 | - | |
320 | - // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); | |
321 | - | |
322 | - | |
323 | 279 | } |
324 | 280 | |
325 | 281 | $rootScope.enableAnnotationToolBar = function () { | ... | ... |