Merged
Merge Request #898 · created by Nikita Kulshreshtha


made $scope.isExtract to $rootScope.isExtract as this was not the same at all places.

Called CalculateImageCoordinates on bodySystem selection when highlight is false and code added on line 8602


From Bug#22634_1 into Develop

Merged by Amrita Vishnoi

2 participants

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
1 1 
2 2 'use strict';
3 3  
4   -AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService","TermService","AIAConstants",
  4 +AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", "TermService", "AIAConstants",
5 5 function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService, TermService, AIAConstants) {
6 6  
7   -
  7 +
8 8 $scope.genderId = "";
9 9 $scope.BodyViewData;
10 10 $scope.selectedGenderBodyViewData;
... ... @@ -112,8 +112,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
112 112  
113 113 $scope.IsSearchVisible = false;
114 114 $scope.shapesize = 1;
115   -
116   - $scope.CurrentStructure = "active";
  115 +
  116 + $scope.CurrentStructure = "active";
117 117 //array for bodyviewid correspoing to male female(used for gender change)
118 118 $scope.correspondingBodyViewIds = {
119 119 '1': '5',
... ... @@ -146,7 +146,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
146 146 //currentTitleFromJson shows the current BodyView Title
147 147 $scope.currentTitleFromJson;
148 148 $scope.showTabButton = false;
149   -
  149 +
150 150 $scope.IsVisible = function () {
151 151 $scope.scroll();
152 152  
... ... @@ -286,13 +286,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
286 286 for (var i = 0; i < daImagePanelConetent.length; i++) {
287 287 daImagePanelConetent[i].style.pointerEvents = "none";
288 288 daImagePanelConetent[i].style.opacity = "0.5";
289   -
  289 +
290 290 }
291 291 //to disbale layer change slider
292 292 $('.ui-slider').slider('disable');
293   - // document.getElementById('txtlayerNumber').style.pointerEvents = "none";
  293 + // document.getElementById('txtlayerNumber').style.pointerEvents = "none";
294 294 $("#txtlayerNumber").prop('disabled', true);
295   -
  295 +
296 296  
297 297 $scope.isLoading = true;
298 298 $('#spinner').css('visibility', 'visible');
... ... @@ -307,7 +307,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
307 307 }
308 308 //to enable layer change slider
309 309 $('.ui-slider').slider('enable');
310   - // document.getElementById('txtlayerNumber').style.pointerEvents = "auto";
  310 + // document.getElementById('txtlayerNumber').style.pointerEvents = "auto";
311 311 $("#txtlayerNumber").prop('disabled', false);
312 312 $scope.isLoading = false;
313 313  
... ... @@ -315,7 +315,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
315 315 }
316 316  
317 317 $scope.openView = function ($event) {
318   -
  318 +
319 319 $rootScope.disableAnnotationTB = false;
320 320 $rootScope.MenuModuleName = "DA";
321 321 $rootScope.isLoading = true;
... ... @@ -331,7 +331,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
331 331 var u = $location.url();
332 332 $location.url('/da-body-view');
333 333  
334   -
  334 +
335 335  
336 336 var view_list = angular.element($event.currentTarget);
337 337 var view_list_male_female = view_list.attr('title');
... ... @@ -406,10 +406,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
406 406 $rootScope.male = "";
407 407 $rootScope.female = "active";
408 408 }
409   -
410   -
411 409  
412   -
  410 +
  411 +
  412 +
413 413  
414 414 }
415 415  
... ... @@ -584,26 +584,24 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
584 584 //0.3
585 585 var daBodyviewElement = angular.element(document.getElementById("daBodyview"));
586 586  
587   - $timeout(function ()
588   - {
  587 + $timeout(function () {
589 588 $compile(daBodyviewElement.contents())($scope);
590 589  
591 590 console.log('html is compiled ' + document.getElementById('daView'))
592 591  
593 592 if (document.getElementById('daView') != null) {
594   - $scope.loadDAView(currentBodyViewId);
  593 + $scope.loadDAView(currentBodyViewId);
595 594 }
596   - else
597   - {
  595 + else {
598 596 // this is a work around solution for a bug where DA does not load for long and user need to close the DA partially opened
599 597 // view, now we are programmatically closing the hung view and when user will reopen the DA view from tile then it will
600 598 // open without any issue.
601 599 $("#daImagePanel .jsglyph-remove").click();
602   -
  600 +
603 601 console.log('html is compiled in else ' + document.getElementById('daView'))
604   -
  602 +
605 603 }
606   -
  604 +
607 605  
608 606 if ($('#daImagePanel').offset().top == 0)
609 607 $('#daImagePanel').css("top", '70px');
... ... @@ -620,14 +618,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
620 618  
621 619 $location.path('/');
622 620  
623   -
  621 +
624 622 }
625 623 }
626 624  
627 625 // we are loading most of alll data used in DA by this function so that at the time of any functionality delay in data laod will not happened.
628 626  
629   - $scope.loadDAView = function (currentBodyViewId)
630   - {
  627 + $scope.loadDAView = function (currentBodyViewId) {
631 628  
632 629 //0.4 added some stylesheets
633 630 $('#daBodyview').css("height", (parseInt($(window).outerHeight()) - 62 - 20));
... ... @@ -638,7 +635,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
638 635 console.log('before LoadBodyViewNavigatorImage call')
639 636 $scope.LoadBodyViewNavigatorImage();
640 637  
641   -
  638 +
642 639 $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
643 640  
644 641 $scope.layerNumber = 0;
... ... @@ -655,106 +652,105 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
655 652  
656 653 }
657 654  
658   -
  655 +
659 656  
660 657  
661 658 angular.element(document).ready(function (e) {
662 659  
663   - var $ua = navigator.userAgent;
664   - // var $event = ($ua.match(/(iPod|iPhone|iPad|android)/i));
665   - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
666   - $("#layerChangeSlider").css("pointer-events", "auto");
667   - }
  660 + var $ua = navigator.userAgent;
  661 + // var $event = ($ua.match(/(iPod|iPhone|iPad|android)/i));
  662 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  663 + $("#layerChangeSlider").css("pointer-events", "auto");
  664 + }
668 665  
669 666  
670   - //to get slider working on ipad
671   - var $ua = navigator.userAgent;
672   - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
673   - var jspanelContainerWidth = $(".jsPanel-content").css("width");
674   - $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
675   - $("#daImagePanel").css("width", "100%");
676   - $("#layerChangeSlider").css("pointer-events", "auto");
677   - // on identity mode click
678   - $("#btnZoom").removeAttr("onclick");
679   - $("#btnZoom").on("touchstart", function () {
680   - if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928
681   - $(".btn-annotation").removeClass("activebtncolor");
682   - //Dissectible Anatomy > Extract and Annotations displays apart on the page after click on Zoom-in.
683   - $(".com").remove();
684   - $("#bord").remove();
685   - console.log('OnZoom is called outside ');
686   - var scope = angular.element(document.getElementById("daView")).scope();
687   - scope.$apply(function () {
688   - scope.enableZoom();
  667 + //to get slider working on ipad
  668 + var $ua = navigator.userAgent;
  669 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  670 + var jspanelContainerWidth = $(".jsPanel-content").css("width");
  671 + $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
  672 + $("#daImagePanel").css("width", "100%");
  673 + $("#layerChangeSlider").css("pointer-events", "auto");
  674 + // on identity mode click
  675 + $("#btnZoom").removeAttr("onclick");
  676 + $("#btnZoom").on("touchstart", function () {
  677 + if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928
  678 + $(".btn-annotation").removeClass("activebtncolor");
  679 + //Dissectible Anatomy > Extract and Annotations displays apart on the page after click on Zoom-in.
  680 + $(".com").remove();
  681 + $("#bord").remove();
  682 + console.log('OnZoom is called outside ');
  683 + var scope = angular.element(document.getElementById("daView")).scope();
  684 + scope.$apply(function () {
  685 + scope.enableZoom();
  686 + });
689 687 });
690   - });
691   - // on transparency mode click
692   - $("#btnTranparency").removeAttr("onclick");
693   - $("#btnTranparency").on("touchstart", function () {
694   - console.log('OnEnableExtract is called outside ');
695   - var scope = angular.element(document.getElementById("daView")).scope();
696   - scope.$apply(function () {
697   - scope.createTransparencyBox('true');
  688 + // on transparency mode click
  689 + $("#btnTranparency").removeAttr("onclick");
  690 + $("#btnTranparency").on("touchstart", function () {
  691 + console.log('OnEnableExtract is called outside ');
  692 + var scope = angular.element(document.getElementById("daView")).scope();
  693 + scope.$apply(function () {
  694 + scope.createTransparencyBox('true');
  695 + });
698 696 });
699   - });
700   - // on normal mode click
701   - $("#btnNormalMode").removeAttr("onclick");
702   - $("#btnNormalMode").on("touchstart", function () {
703   - console.log('OnEnableNormalMode is called outside ');
704   - $("#btnTranparency").removeClass("disabled");
705   - var scope = angular.element(document.getElementById("daView")).scope();
706   - scope.$apply(function () {
707   - scope.enableNormalMode();
  697 + // on normal mode click
  698 + $("#btnNormalMode").removeAttr("onclick");
  699 + $("#btnNormalMode").on("touchstart", function () {
  700 + console.log('OnEnableNormalMode is called outside ');
  701 + $("#btnTranparency").removeClass("disabled");
  702 + var scope = angular.element(document.getElementById("daView")).scope();
  703 + scope.$apply(function () {
  704 + scope.enableNormalMode();
  705 + });
708 706 });
709   - });
710   - // on extract mode click
711   - $("#btnExtract").removeAttr("onclick");
712   - $("#btnExtract").on("touchstart", function () {
713   - console.log('OnEnableExtract is called outside ');
714   - var scope = angular.element(document.getElementById("daView")).scope();
715   - scope.$apply(function () {
716   - scope.enableExtract('true');
  707 + // on extract mode click
  708 + $("#btnExtract").removeAttr("onclick");
  709 + $("#btnExtract").on("touchstart", function () {
  710 + console.log('OnEnableExtract is called outside ');
  711 + var scope = angular.element(document.getElementById("daView")).scope();
  712 + scope.$apply(function () {
  713 + scope.enableExtract('true');
  714 + });
717 715 });
718   - });
719   - // on highlight mode click
720   - $("#btnHighLight").removeAttr("onclick");
721   - $("#btnHighLight").on("touchstart", function () {
722   - console.log('OnEnableHighlight is called outside ');
723   - var scope = angular.element(document.getElementById("daView")).scope();
724   - scope.$apply(function () {
725   - scope.enableHighlight();
  716 + // on highlight mode click
  717 + $("#btnHighLight").removeAttr("onclick");
  718 + $("#btnHighLight").on("touchstart", function () {
  719 + console.log('OnEnableHighlight is called outside ');
  720 + var scope = angular.element(document.getElementById("daView")).scope();
  721 + scope.$apply(function () {
  722 + scope.enableHighlight();
  723 + });
726 724 });
727   - });
728   - // on show/hide mode click
729   - $("#btnStrutureBox").removeAttr("onclick");
730   - $("#btnStrutureBox").on("touchstart", function () {
731   - console.log('OnBodySystem chnaged is called outside ');
732   - var scope = angular.element(document.getElementById("daView")).scope();
733   - scope.$apply(function () {
734   - scope.enableShowHideStructureBox();
  725 + // on show/hide mode click
  726 + $("#btnStrutureBox").removeAttr("onclick");
  727 + $("#btnStrutureBox").on("touchstart", function () {
  728 + console.log('OnBodySystem chnaged is called outside ');
  729 + var scope = angular.element(document.getElementById("daView")).scope();
  730 + scope.$apply(function () {
  731 + scope.enableShowHideStructureBox();
  732 + });
735 733 });
736   - });
737   - }
  734 + }
  735 +
  736 + $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
738 737  
739   - $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
740   -
741 738 $rootScope.selectedBodySystemName = 'All';
742 739 $rootScope.selectedBodySystemId = 0;
743 740 $rootScope.searchSelectedText = '';
744 741 });
745 742  
746 743 var sliderVal = document.getElementById('layerChangeSlider');
747   -
  744 +
748 745 console.log('on slider initialize:' + sliderVal);
749 746  
750 747  
751 748 $("#layerChangeSlider").slider({
752 749 orientation: "vertical",
753   - range: "max",
  750 + range: "max",
754 751 min: 0,
755 752 value: 0,
756   - slide: function (event, ui)
757   - {
  753 + slide: function (event, ui) {
758 754 var sliderVal = document.getElementById('layerChangeSlider');
759 755  
760 756 console.log('on slider slide :' + sliderVal);
... ... @@ -767,7 +763,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
767 763 },
768 764  
769 765 stop: function (event, ui) {
770   -
  766 +
771 767 var la;
772 768 var rootScope = angular.element(document.getElementById("bo")).scope();
773 769 rootScope.$apply(function () {
... ... @@ -824,20 +820,20 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
824 820 var languageArray = [];
825 821 $rootScope.vocabTermDataArray = [];
826 822 var languageArray = $rootScope.lexiconLanguageArray;
827   -
  823 +
828 824 console.log(languageArray.length);
829 825 console.log('loadSearchDataForBodyView');
830   -
  826 +
831 827 var currentBodyViewId = $rootScope.getLocalStorageValue("currentBodyViewId");
832   -
  828 +
833 829 for (var i = 0; i <= languageArray.length - 1; i++) {
834 830 var searchWorker = new Worker('search-wp.js');
835   -
  831 +
836 832 //push workers in array to further used the refernece to delete the workers
837 833 $scope.runningSearchWorkers.push({ 'workerName': searchWorker })
838 834  
839 835 //console.log('for bodyRegionId = ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"))
840   -
  836 +
841 837  
842 838 searchWorker.postMessage({
843 839  
... ... @@ -847,7 +843,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
847 843 })
848 844  
849 845 searchWorker.onmessage = function (e) {
850   -
  846 +
851 847 //console.log('callback searchWorker , time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"));
852 848 $rootScope.TermNumberData = e.data.TermNumberData;
853 849 console.log("$rootScope.TermNumberData = " + $rootScope.TermNumberData.length);
... ... @@ -855,10 +851,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
855 851 $scope.vocabTermTxt = e.data.vocabTermTxt,
856 852 $scope.vocabLanguage = e.data.language,
857 853 $rootScope.vocabTermDataArray.push({ "language": $scope.vocabLanguage, "VocabTermData": $rootScope.VocabTermData, "vocabTermTxt": $scope.vocabTermTxt });
858   -
  854 +
859 855 for (var i = 0; i <= $rootScope.lexiconLanguageArray.length - 1; i++) {
860 856  
861   -
  857 +
862 858 $rootScope.vocabTermDataArray[i].vocabTermTxt = new jinqJs()
863 859 .from($rootScope.vocabTermDataArray[i].vocabTermTxt)
864 860 .distinct('_TermText', '_ActualTermNumber')
... ... @@ -872,7 +868,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
872 868  
873 869 if ($rootScope.vocabTermDataArray.length == $rootScope.lexiconLanguageArray.length) {
874 870 $("#setting-spinner").css("display", "none");
875   -
  871 +
876 872 for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) {
877 873 if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) {
878 874 primaryLexiconIndex = i;
... ... @@ -902,12 +898,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
902 898 }
903 899 }
904 900  
905   -
  901 +
906 902 //console.log("s" + $rootScope.vocabTermDataArray);
907 903 //call watch on '$scope.VocabTermTxt and compile <li> and append to <ul> on first time load
908 904 //$scope.$watch('$rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt', function (newValue, oldValue, scope) {
909   -
910   -
  905 +
  906 +
911 907  
912 908 //}, true);
913 909  
... ... @@ -942,7 +938,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
942 938 $rootScope.totalLayers = dataLength - 1;
943 939  
944 940 $('#txtLayerNumber').attr('max', $rootScope.totalLayers);
945   -
  941 +
946 942 var layerChangeSliderVal = document.getElementById('layerChangeSlider');
947 943  
948 944 console.log('inside bodyViewWorker.onmessage. $rootScope.totalLayers = ' + $rootScope.totalLayers + ' #layerChangeSlider value: ' + layerChangeSliderVal);
... ... @@ -1147,7 +1143,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1147 1143 //remove transparency scale
1148 1144 $('#transparencyScale').css('visibility', 'hidden');
1149 1145 }
1150   -
  1146 +
1151 1147 }
1152 1148  
1153 1149 if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) {
... ... @@ -1201,7 +1197,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1201 1197  
1202 1198 //2.Draw mirror image
1203 1199 $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), src, value._BodyRegionId, 'N');
1204   -
  1200 +
1205 1201 $rootScope.BodyRegionCordinatesData.push(
1206 1202 {
1207 1203 "bodyRegionId": value._BodyRegionId, "Height": Math.round(rectangle.scaledHeight), "Width": Math.round(rectangle.scaledWidth),
... ... @@ -1211,7 +1207,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1211 1207  
1212 1208 //3.GetMaskImageSource
1213 1209 var maskImageSrc = $scope.GetMaskImageSource($scope.imageSource);
1214   -
  1210 +
1215 1211 //4 Draw Mask Mirror Image
1216 1212 $scope.DrawMirroredImage(Math.round(rectangle.scaledHeight), Math.round(rectangle.scaledWidth), Math.round(rectangle.scaledX), Math.round(rectangle.scaledY), maskImageSrc, value._BodyRegionId, 'Y');
1217 1213  
... ... @@ -1306,34 +1302,33 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1306 1302  
1307 1303 if ((dtlOfSktn != null || dtlOfSktn != undefined) && (dtlOfSktn.length > 0)) {
1308 1304  
1309   -
1310 1305  
1311   - $scope.figLaefImageName = dtlOfSktn[0]._ImageId;
1312 1306  
  1307 + $scope.figLaefImageName = dtlOfSktn[0]._ImageId;
1313 1308  
1314   - $scope.lowerlayerNumberForModesty = dtlOfSktn[0]._lns;
1315   - $scope.HigherlayerNumberForModesty = dtlOfSktn[0]._lne;
1316   - $scope.layerInfoForModesty.push({ "bodyRegionId": value._BodyRegionId, "lowerlayerNumberForModesty": $scope.lowerlayerNumberForModesty, "HigherlayerNumberForModesty": $scope.HigherlayerNumberForModesty })
1317 1309  
1318   - var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
  1310 + $scope.lowerlayerNumberForModesty = dtlOfSktn[0]._lns;
  1311 + $scope.HigherlayerNumberForModesty = dtlOfSktn[0]._lne;
  1312 + $scope.layerInfoForModesty.push({ "bodyRegionId": value._BodyRegionId, "lowerlayerNumberForModesty": $scope.lowerlayerNumberForModesty, "HigherlayerNumberForModesty": $scope.HigherlayerNumberForModesty })
1319 1313  
  1314 + var rectangle = scaleRectangle(value._X, value._Y, value._Height, value._Width, value._MirrorValue);
1320 1315  
1321   - var src = "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName;
1322 1316  
1323   - $scope.DrawImage(rectangle.scaledHeight, rectangle.scaledWidth, rectangle.scaledX, rectangle.scaledY, src, 'modestyImg' + value._BodyRegionId, 'N')
1324   - if ((parseInt(dtlOfSktn[0]._lns) <= parseInt($scope.layerNumber)) && (parseInt(dtlOfSktn[0]._lne) > parseInt($scope.layerNumber)) && (dtlOfSktn[0]._isfr == 'Y')) {
1325   - $rootScope.isLayerLessSeven = true;
1326   - if (($rootScope.globalSetting.modesty == 'Y')) {
1327   -
1328   - $('.modestyImg').css('visibility', 'visible');
1329   - }
1330   - }
1331   - else
1332   - {
1333   -
1334   - $rootScope.isLayerLessSeven = false;
1335   - $('.modestyImg').css('visibility', 'hidden');
  1317 + var src = "content/images/DA/" + $rootScope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/0/" + value._BodyRegionId + "/" + $scope.figLaefImageName;
  1318 +
  1319 + $scope.DrawImage(rectangle.scaledHeight, rectangle.scaledWidth, rectangle.scaledX, rectangle.scaledY, src, 'modestyImg' + value._BodyRegionId, 'N')
  1320 + if ((parseInt(dtlOfSktn[0]._lns) <= parseInt($scope.layerNumber)) && (parseInt(dtlOfSktn[0]._lne) > parseInt($scope.layerNumber)) && (dtlOfSktn[0]._isfr == 'Y')) {
  1321 + $rootScope.isLayerLessSeven = true;
  1322 + if (($rootScope.globalSetting.modesty == 'Y')) {
  1323 +
  1324 + $('.modestyImg').css('visibility', 'visible');
1336 1325 }
  1326 + }
  1327 + else {
  1328 +
  1329 + $rootScope.isLayerLessSeven = false;
  1330 + $('.modestyImg').css('visibility', 'hidden');
  1331 + }
1337 1332 }
1338 1333 }
1339 1334 }
... ... @@ -1351,12 +1346,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1351 1346 //$('#spinner').css('visibility', 'hidden');
1352 1347 }
1353 1348  
1354   -
  1349 +
1355 1350 //set scrollbars on canvas and hide loading label
1356   -
  1351 +
1357 1352 //check the OS
1358 1353 var isiOSSafari = (navigator.userAgent.match(/(iPod|iPhone|iPad|android)/i)) ? true : false;
1359   -
  1354 +
1360 1355 //set scrollbars on canvas and hide loading label
1361 1356 $('#daLoaderLabel').css('visibility', 'hidden')
1362 1357  
... ... @@ -1374,12 +1369,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1374 1369 // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition)
1375 1370 $('#canvasDiv').scrollTop(50)
1376 1371 //var abc = $rootScope.BodyRegionCordinatesData;
1377   -
  1372 +
1378 1373 var sliderVal = parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber);
1379 1374  
1380 1375 console.log('inside CalculateImageCordinates line no 1350. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + '- parseInt($scope.layerNumber)' + parseInt($scope.layerNumber) + 'set value: ' + sliderVal);
1381 1376  
1382   - $('#layerChangeSlider').slider("option", "value",sliderVal );
  1377 + $('#layerChangeSlider').slider("option", "value", sliderVal);
1383 1378  
1384 1379  
1385 1380 // $('#spinner').css('visibility', 'hidden');
... ... @@ -1399,7 +1394,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1399 1394  
1400 1395 var dragdivw = 42
1401 1396 $scope.dragdivleft = 21;
1402   - $scope.dragdivtop = 0;
  1397 + $scope.dragdivtop = 0;
1403 1398 }
1404 1399 else {
1405 1400 var dragdivw = 83;
... ... @@ -1410,13 +1405,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1410 1405 }
1411 1406 $(".dragdivposition").css("left", $scope.dragdivleft);
1412 1407 $(".dragdivposition").css("top", $scope.dragdivtop);
1413   -
  1408 +
1414 1409  
1415 1410 $('#draggable').css('width', dragdivw);
1416 1411 $('#draggable').css('height', dragdivh)
1417 1412  
1418 1413 }
1419   -
  1414 +
1420 1415  
1421 1416 function scaleRectangle(x, y, height, width, mirrorValue) {
1422 1417 var nzoom = $rootScope.zoomInOut;
... ... @@ -1472,7 +1467,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1472 1467 }
1473 1468 }
1474 1469  
1475   -
  1470 +
1476 1471  
1477 1472 $scope.GetImageSource = function (bodyRegionId) {
1478 1473  
... ... @@ -1793,7 +1788,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1793 1788  
1794 1789 $scope.MultiLanguageAnnationArray = [];
1795 1790 for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
1796   -
  1791 +
1797 1792 $scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
1798 1793 }
1799 1794  
... ... @@ -1813,7 +1808,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1813 1808 // alert(annotationText);
1814 1809 $scope.MultiLanguageAnnationArray = [];
1815 1810 for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
1816   -
  1811 +
1817 1812 $scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
1818 1813 }
1819 1814  
... ... @@ -1825,7 +1820,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1825 1820 // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top);
1826 1821 $scope.MultiLanguageAnnationArray = [];
1827 1822 for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
1828   -
  1823 +
1829 1824 $scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
1830 1825 }
1831 1826  
... ... @@ -1880,19 +1875,19 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1880 1875 var totalCanvas;
1881 1876 if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) {
1882 1877 totalCanvas = 9;
1883   -
  1878 +
1884 1879 }
1885 1880 else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) {
1886 1881 totalCanvas = 5;
1887   -
  1882 +
1888 1883 }
1889 1884 else if (($rootScope.viewOrientationId == '5')) {
1890 1885 totalCanvas = 4;
1891   -
  1886 +
1892 1887 }
1893 1888 else if (($rootScope.viewOrientationId == '6')) {
1894 1889 totalCanvas = 1;
1895   -
  1890 +
1896 1891 }
1897 1892  
1898 1893 if ($scope.ColoredImageSRC.length < totalCanvas) {
... ... @@ -1907,7 +1902,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1907 1902 }
1908 1903 );
1909 1904 }
1910   -
  1905 +
1911 1906  
1912 1907 var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR');
1913 1908  
... ... @@ -1923,7 +1918,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1923 1918 }
1924 1919  
1925 1920  
1926   -
  1921 +
1927 1922 if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
1928 1923  
1929 1924 if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
... ... @@ -1941,7 +1936,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1941 1936 else {
1942 1937 $scope.isEligibleForHighlight = false;
1943 1938 }
1944   -
  1939 +
1945 1940 if ($scope.isEligibleForHighlight == true) {
1946 1941 $scope.DisableUI();
1947 1942 if ($scope.isSearchDataLoaded) {
... ... @@ -1949,7 +1944,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1949 1944 $('#spinner').css('visibility', 'hidden');
1950 1945 }
1951 1946  
1952   - if ($scope.isExtract == true) {
  1947 + if ($rootScope.isExtract == true) {
1953 1948 $rootScope.isLoading = true;
1954 1949 $('#spinner').css('visibility', 'visible');
1955 1950 $scope.DisableUI();
... ... @@ -1971,12 +1966,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
1971 1966 //This block is executed when normal body is created and no further process like highlight,extract, etc
1972 1967 $rootScope.isLoading = false;
1973 1968 $('#spinner').css('visibility', 'hidden');
1974   -
  1969 +
1975 1970 $scope.EnableUI();
1976 1971  
1977 1972 }
1978 1973 }
1979   -
  1974 +
1980 1975 }
1981 1976  
1982 1977 console.log('DrawMirroredImage- ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length);
... ... @@ -2217,7 +2212,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2217 2212 // alert(annotationText);
2218 2213 $scope.MultiLanguageAnnationArray = [];
2219 2214 for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
2220   -
  2215 +
2221 2216 $scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
2222 2217 }
2223 2218  
... ... @@ -2243,7 +2238,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2243 2238  
2244 2239  
2245 2240 for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
2246   -
  2241 +
2247 2242 $scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
2248 2243 }
2249 2244  
... ... @@ -2255,7 +2250,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2255 2250 else {
2256 2251 $scope.MultiLanguageAnnationArray = [];
2257 2252 for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
2258   -
  2253 +
2259 2254 $scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
2260 2255 }
2261 2256  
... ... @@ -2305,20 +2300,20 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2305 2300 var totalCanvas;
2306 2301 if (($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) {
2307 2302 totalCanvas = 9;
2308   -
  2303 +
2309 2304 }
2310 2305 else if (($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) {
2311 2306 totalCanvas = 5;
2312   -
  2307 +
2313 2308 }
2314 2309 else if (($rootScope.viewOrientationId == '5')) {
2315 2310 totalCanvas = 4;
2316   -
  2311 +
2317 2312 }
2318 2313 else if (($rootScope.viewOrientationId == '6')) {
2319 2314 totalCanvas = 1;
2320 2315 }
2321   -
  2316 +
2322 2317 if ($scope.ColoredImageSRC.length < totalCanvas) {
2323 2318 $scope.ColoredImageSRC.push(
2324 2319 {
... ... @@ -2333,7 +2328,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2333 2328 );
2334 2329 }
2335 2330  
2336   -
  2331 +
2337 2332 var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId);
2338 2333  
2339 2334 if (imageCanvas != null || imageCanvas != undefined) {
... ... @@ -2347,7 +2342,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2347 2342  
2348 2343 $rootScope.coloredImageCanvasList[parseInt(bodyRegionId - 1)] = coloredImageDataVar;
2349 2344 }
2350   -
  2345 +
2351 2346 if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
2352 2347  
2353 2348 if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
... ... @@ -2373,14 +2368,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2373 2368 $('#spinner').css('visibility', 'hidden');
2374 2369 }
2375 2370  
2376   - if ($scope.isExtract == true) {
  2371 + if ($rootScope.isExtract == true) {
2377 2372 $rootScope.isLoading = true;
2378 2373 $('#spinner').css('visibility', 'visible');
2379 2374 $scope.DisableUI();
2380 2375 $scope.highLightBody();
2381 2376 }
2382 2377 else if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true))
2383   - || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true)) || $scope.isExtract == true || $rootScope.isHighlightBodyByBodySystem == true) {
  2378 + || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true)) || $rootScope.isExtract == true || $rootScope.isHighlightBodyByBodySystem == true) {
2384 2379  
2385 2380 console.log('2. $rootScope.isHighLight= ' + $rootScope.isHighLight)
2386 2381  
... ... @@ -2404,7 +2399,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2404 2399 $scope.EnableUI();
2405 2400 }
2406 2401 }
2407   -
  2402 +
2408 2403 }
2409 2404  
2410 2405 console.log('DrawImage- ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length);
... ... @@ -2700,7 +2695,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2700 2695  
2701 2696 // $timeout(function () { $scope.DisableProgressBar() }, 1000);
2702 2697  
2703   -
  2698 +
2704 2699  
2705 2700  
2706 2701 };
... ... @@ -2987,27 +2982,27 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2987 2982  
2988 2983 }
2989 2984 }
2990   -
  2985 +
2991 2986  
2992 2987  
2993 2988 };
2994 2989 worker.onerror = function (e) {
2995 2990 alert('Error: Line ' + e.lineno + ' in ' + e.filename + ': ' + e.message);
2996 2991 };
2997   -
  2992 +
2998 2993 }
2999 2994 }
3000 2995  
3001 2996 $timeout(function () {
3002   -
  2997 +
3003 2998 // alert($("#termList option").prop('selected', true).val());
3004 2999 // alert(document.getElementById("typedTermName").value);
3005 3000 // alert($rootScope.searchSelectedText);
3006   - var termSelectedName = $rootScope.searchSelectedText;
3007   - if (termSelectedName == "Cardiovascular") {
3008   - termSelectedName = "Skin";
3009   - }
3010   - if (document.getElementById("typedTermName").value == "Skin" || termSelectedName == "Skin") {
  3001 + var termSelectedName = $rootScope.searchSelectedText;
  3002 + if (termSelectedName == "Cardiovascular") {
  3003 + termSelectedName = "Skin";
  3004 + }
  3005 + if (document.getElementById("typedTermName").value == "Skin" || termSelectedName == "Skin") {
3011 3006 $rootScope.isLoading = false;
3012 3007 $('#spinner').css('visibility', 'hidden');
3013 3008 $scope.EnableUI();
... ... @@ -3027,7 +3022,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3027 3022 $scope.DisableUI();
3028 3023 $('.ui-slider').slider('disable');
3029 3024  
3030   -
  3025 +
3031 3026 if ($scope.isTransparencyActivated) {
3032 3027  
3033 3028 $scope.layerNumber = $rootScope.currentLayerNumber;
... ... @@ -3036,18 +3031,18 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3036 3031 $scope.layerNumber = $('#txtlayerNumber').val();
3037 3032 $rootScope.currentLayerNumber = $scope.layerNumber;
3038 3033 }
3039   -
  3034 +
3040 3035 $("#btnTranparency").attr('disabled', 'disabled');
3041   -
3042 3036  
3043   -
  3037 +
  3038 +
3044 3039  
3045 3040 $rootScope.isLoading = true;
3046 3041 $('#spinner').css('visibility', 'visible');
3047 3042  
3048 3043  
3049 3044 if ($rootScope.isHighLight == true) {
3050   - // $rootScope.isHighLight = false;
  3045 + // $rootScope.isHighLight = false;
3051 3046 $scope.CloseTransparencyBox();
3052 3047 }
3053 3048  
... ... @@ -3061,8 +3056,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3061 3056 .then(
3062 3057 function (result) {
3063 3058  
3064   - if (result.length == 0)
3065   - {
  3059 + if (result.length == 0) {
3066 3060 $rootScope.isLoading = false;
3067 3061 $('#spinner').css('visibility', 'hidden');
3068 3062  
... ... @@ -3148,7 +3142,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3148 3142  
3149 3143  
3150 3144 grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth)
3151   - if ($scope.isExtract) {
  3145 + if ($rootScope.isExtract) {
3152 3146 grayCanvasContext.putImageData($rootScope.whiteImageDataList[parseInt(TermExistInBodyRegionId) - 1], 0, 0);
3153 3147  
3154 3148 }
... ... @@ -3268,7 +3262,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3268 3262  
3269 3263 $('#spinner').css('visibility', 'hidden')
3270 3264 $rootScope.isLoading = false;
3271   -
  3265 +
3272 3266 //document.getElementById("daView").style.pointerEvents = "auto";
3273 3267 //debugger;
3274 3268 //$('.ui-slider').slider('enable');
... ... @@ -3301,11 +3295,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3301 3295  
3302 3296 });
3303 3297  
3304   -
  3298 +
3305 3299 }
3306 3300  
3307   -
3308   - $scope.scrollToHighlightedBodyRegion = function(TermExistInBodyRegionId){
  3301 +
  3302 + $scope.scrollToHighlightedBodyRegion = function (TermExistInBodyRegionId) {
3309 3303 if ($scope.isScrolledToHighlightedBR == false) {
3310 3304  
3311 3305 $scope.bodyRegionCoordinates = new jinqJs()
... ... @@ -3396,7 +3390,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3396 3390  
3397 3391 //get annotation from term number
3398 3392 $scope.GetAnnotationText = function (termNumber) {
3399   -
  3393 +
3400 3394 $rootScope.annotationText = [];
3401 3395 var annotationText;
3402 3396 var annotation = [];
... ... @@ -3406,8 +3400,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3406 3400 if (parseInt(termNumber) != parseInt(figLeafTermNo)) {
3407 3401 $scope.TermNumber = termNumber;
3408 3402 for (var j = 0; j <= $rootScope.lexiconLanguageArray.length - 1; j++) {
3409   - if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined)
3410   - {
  3403 + if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined) {
3411 3404 $scope.matchedTermNoData = new jinqJs()
3412 3405 .from($rootScope.TermNumberData.TermData.Term)
3413 3406 .where('_TermNumber == ' + termNumber)
... ... @@ -3668,7 +3661,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3668 3661  
3669 3662 //$scope.isMousUp();
3670 3663  
3671   -
  3664 +
3672 3665  
3673 3666 $rootScope.isLoading = true;
3674 3667 $('#spinner').css('visibility', 'visible');
... ... @@ -3777,7 +3770,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3777 3770 $rootScope.isLoading = false;
3778 3771 $('#spinner').css('visibility', 'hidden');
3779 3772  
3780   -
  3773 +
3781 3774 }
3782 3775  
3783 3776  
... ... @@ -3817,7 +3810,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3817 3810 //1. In transparency box we shows two annotation at a time, so we need to decide the max length of annotation in btween two annotation because based on that
3818 3811 // we decide the size of speech bubble
3819 3812 //2.
3820   -
  3813 +
3821 3814 if (event.ctrlKey) {
3822 3815 console.log('ctrl pressed');
3823 3816 $scope.multiAnnotationIsON = true;
... ... @@ -3937,14 +3930,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3937 3930 });
3938 3931 }
3939 3932 }
3940   -
  3933 +
3941 3934 if (document.getElementById("btnStrutureBox").name == "showAnnotationStructure") {
3942 3935 $scope.showAnnotation()
3943 3936 }
3944 3937 else {
3945 3938 $scope.hideAnnotation()
3946 3939 }
3947   -
  3940 +
3948 3941 if ($rootScope.isTBCompleted == true) {
3949 3942 $('#sppeachBubble').remove();
3950 3943 $('#dot').remove();
... ... @@ -4228,7 +4221,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4228 4221 + '<div style="position:absolute;border:1px solid #000;display:none;z-index:59000;" id="bord_annotation">'
4229 4222 + '</div>';
4230 4223 $("#sppeachBubble_annotation").css("height", "auto");
4231   -
  4224 +
4232 4225 if ($scope.longest_annotationT1.length > $scope.longest_annotationT2.length) {
4233 4226 $("#sppeachBubble_annotation p").remove();
4234 4227 $('#canvasDiv').append(sppechBubbleDotHTML_annotation);
... ... @@ -4352,7 +4345,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4352 4345 }
4353 4346  
4354 4347 function myFunction(crossId) {
4355   -
  4348 +
4356 4349 $('#' + crossId).parent().parent().parent().css("display", "none");
4357 4350  
4358 4351 }
... ... @@ -4412,10 +4405,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4412 4405  
4413 4406 };
4414 4407  
4415   -
4416   -
  4408 +
  4409 +
4417 4410 $scope.createTransparencyBox = function () {
4418   -
  4411 +
4419 4412 $scope.isTransparencyBtnClicked = true;
4420 4413  
4421 4414 //do not create TBOX if in extarct mode otherwise create
... ... @@ -4430,7 +4423,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4430 4423  
4431 4424  
4432 4425  
4433   -
  4426 +
4434 4427 $('#btnTranparency').addClass('tButtonActive');
4435 4428 $('#btnIdentify').removeClass(' btn-primary');
4436 4429 $('#btnIdentify').addClass('btn-black');
... ... @@ -4441,17 +4434,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4441 4434  
4442 4435 var canvasDiv = document.getElementById('canvasDiv');
4443 4436  
4444   - canvasDiv.addEventListener("touchstart", mouseDownListener);
  4437 + canvasDiv.addEventListener("touchstart", mouseDownListener);
  4438 +
  4439 + canvasDiv.addEventListener("touchmove", mouseMoveListener);
4445 4440  
4446   - canvasDiv.addEventListener("touchmove", mouseMoveListener);
4447   -
4448   - canvasDiv.addEventListener("touchend", mouseUpListener);
  4441 + canvasDiv.addEventListener("touchend", mouseUpListener);
4449 4442  
4450 4443 canvasDiv.addEventListener("mousedown", mouseDownListener);
4451 4444  
4452 4445 canvasDiv.addEventListener("mousemove", mouseMoveListener);
4453 4446  
4454   - canvasDiv.addEventListener("mouseup", mouseUpListener);
  4447 + canvasDiv.addEventListener("mouseup", mouseUpListener);
4455 4448  
4456 4449  
4457 4450 }
... ... @@ -4481,9 +4474,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4481 4474 }
4482 4475  
4483 4476 function mouseDownListener(e) {
4484   - e.preventDefault();
4485   - //to prevent screen scroll on ipad while drawing TB
4486   - e.preventDefault();
  4477 + e.preventDefault();
  4478 + //to prevent screen scroll on ipad while drawing TB
  4479 + e.preventDefault();
4487 4480 //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
4488 4481 var tCanvas = document.getElementById('transparencyCanvas');
4489 4482 if ($('#transparencyScale').css("visibility") == 'visible') {
... ... @@ -4532,16 +4525,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4532 4525  
4533 4526 document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener);
4534 4527  
4535   - document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
  4528 + document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
4536 4529  
4537 4530  
4538 4531 //Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
4539   - if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) {
  4532 + if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) {
4540 4533  
4541   - var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber);
4542   - console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal);
  4534 + var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber);
  4535 + console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal);
4543 4536  
4544   - $('#layerChangeSlider').slider("option", "value", sliderVal);
  4537 + $('#layerChangeSlider').slider("option", "value", sliderVal);
4545 4538  
4546 4539 $("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber));
4547 4540 }
... ... @@ -4549,9 +4542,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4549 4542 }
4550 4543  
4551 4544 function mouseMoveListener(e) {
4552   - e.preventDefault();
4553   - //to prevent screen scroll on ipad while drawing TB
4554   - e.preventDefault();
  4545 + e.preventDefault();
  4546 + //to prevent screen scroll on ipad while drawing TB
  4547 + e.preventDefault();
4555 4548  
4556 4549 var canvasDiv = document.getElementById('canvasDiv');
4557 4550 $scope.verticalScrollPosition = canvasDiv.scrollTop;
... ... @@ -4579,11 +4572,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4579 4572  
4580 4573  
4581 4574 function mouseUpListener(e) {
4582   - e.preventDefault();
4583   -
  4575 + e.preventDefault();
4584 4576  
4585   - //to prevent screen scroll on ipad while drawing TB
4586   - e.preventDefault();
  4577 +
  4578 + //to prevent screen scroll on ipad while drawing TB
  4579 + e.preventDefault();
4587 4580  
4588 4581 $scope.isTBDrawnOnBodyRegion = false;
4589 4582  
... ... @@ -4825,11 +4818,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4825 4818 document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener);
4826 4819  
4827 4820  
4828   - document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
4829   -
4830   - document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener);
4831   -
4832   - document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener);
  4821 + document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
  4822 +
  4823 + document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener);
  4824 +
  4825 + document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener);
4833 4826 // document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener);
4834 4827 $('#btnTranparency').removeClass('btn-black');
4835 4828  
... ... @@ -4880,13 +4873,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4880 4873 $rootScope.switchToTransparencycanvas();
4881 4874 }
4882 4875 }
4883   - else
4884   - {
  4876 + else {
4885 4877  
4886 4878 $rootScope.UIWrapperZIndex = 12000;
4887   -
  4879 +
4888 4880 $(".ui-wrapper").css("z-index", $rootScope.UIWrapperZIndex);
4889   -
  4881 +
4890 4882 }
4891 4883 //hide the speechbubble
4892 4884  
... ... @@ -5070,7 +5062,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5070 5062  
5071 5063 var modestyTransTempCanvasId = 'tempCanvasModesty_' + bodyRegionId;
5072 5064 var modestyTransCanvasId = 'modestyTransCanavs_' + bodyRegionId;
5073   -
  5065 +
5074 5066 if (document.getElementById(modestyTransTempCanvasId) != null) {
5075 5067 document.getElementById(modestyTransTempCanvasId).parentNode.removeChild(document.getElementById(modestyTransTempCanvasId));
5076 5068 }
... ... @@ -5093,7 +5085,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5093 5085 }
5094 5086  
5095 5087 if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) {
5096   -
  5088 +
5097 5089 var canvasModesty = document.createElement('canvas');
5098 5090 canvasModesty.id = modestyTransCanvasId;
5099 5091 canvasModesty.className = 'transModestyImg'
... ... @@ -5115,7 +5107,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5115 5107 }
5116 5108 else
5117 5109 canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex;
5118   -
  5110 +
5119 5111 canvasModesty.addEventListener('click', OnClickModestyTransCanvas);
5120 5112  
5121 5113 document.getElementById('canvasDiv').appendChild(canvasModesty);
... ... @@ -5144,7 +5136,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5144 5136 var tempCtx = transparencyTempCanvas.getContext('2d');
5145 5137  
5146 5138 if (IsMirror == 'Yes') {
5147   -
  5139 +
5148 5140 tempCtx.save();
5149 5141 tempCtx.translate(Width, 0);
5150 5142 tempCtx.scale(-1, 1);
... ... @@ -5210,11 +5202,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5210 5202 var tranparencyMaskImgSrc = $scope.GetMaskImageSource(tranparencyImgSrc);
5211 5203 tempMaskImg.src = tranparencyMaskImgSrc;//"http://localhost/AIA/" + tranparencyMaskImgSrc;
5212 5204 tempMaskImg.onload = function () {
5213   -
  5205 +
5214 5206 var tempmaskCtx = transparencyTempcanavsMask.getContext('2d');
5215 5207  
5216 5208 if (IsMirror == 'Yes') {
5217   -
  5209 +
5218 5210 tempmaskCtx.save();
5219 5211 tempmaskCtx.translate(Width, 0);
5220 5212 tempmaskCtx.scale(-1, 1);
... ... @@ -5255,14 +5247,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5255 5247 var modestyCanavs = document.getElementById(modestyTransCanvases[j].id);
5256 5248  
5257 5249 if ($rootScope.isModestyOn == true && (parseInt(lowerlayerNumberForModesty) <= parseInt($scope.layerNumber)) && (HigherlayerNumberForModesty) > parseInt($scope.layerNumber)) {
5258   -
  5250 +
5259 5251 $rootScope.isTBLayerLessSeven = true;
5260   -
5261   - modestyCanavs.style.visibility = 'visible';
5262   -
  5252 +
  5253 + modestyCanavs.style.visibility = 'visible';
  5254 +
5263 5255 }
5264 5256 else {
5265   -
  5257 +
5266 5258 $rootScope.isTBLayerLessSeven = false;
5267 5259 modestyCanavs.style.visibility = 'hidden';
5268 5260  
... ... @@ -5495,7 +5487,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5495 5487 //}
5496 5488 }
5497 5489  
5498   -
  5490 +
5499 5491  
5500 5492 // set every fourth value to the desired number of transparency
5501 5493 var imageD1 = tempCtx.getImageData(0, 0, Width, Height);
... ... @@ -5504,7 +5496,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5504 5496  
5505 5497 for (var i = 3; i < length; i += 4) {
5506 5498  
5507   -
  5499 +
5508 5500 if ($scope.voId == "9" || $scope.voId == "11") {
5509 5501  
5510 5502 if (imageData1[i] == 0) {
... ... @@ -5570,13 +5562,13 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5570 5562 ctx.putImageData(imageD1, 0, 0);
5571 5563  
5572 5564  
5573   -
  5565 +
5574 5566 if ($rootScope.isModestyOn && $rootScope.isTBLayerLessSeven == true) {
5575   -
  5567 +
5576 5568 document.getElementById('modestyTransCanavs_' + bodyRegionId).style.visibility = 'visible';
5577 5569 }
5578 5570 else {
5579   -
  5571 +
5580 5572 document.getElementById('modestyTransCanavs_' + bodyRegionId).style.visibility = 'hidden';
5581 5573 }
5582 5574  
... ... @@ -5813,7 +5805,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5813 5805 // alert(annotationText);
5814 5806 $scope.MultiLanguageAnnationArray = [];
5815 5807 for (var i = 0; i <= $rootScope.annotationText.length - 1; i++) {
5816   -
  5808 +
5817 5809 $scope.MultiLanguageAnnationArray.push($rootScope.annotationText[i]);
5818 5810 }
5819 5811 if (annotationText == "undefined") {
... ... @@ -5848,7 +5840,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5848 5840 $rootScope.isMirrorBodyRegion = value.IsMirror;
5849 5841 return false;
5850 5842 }
5851   -
  5843 +
5852 5844 }
5853 5845 });
5854 5846 }
... ... @@ -5972,7 +5964,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5972 5964 $scope.layerNumber = $scope.layerNumber + 1;
5973 5965  
5974 5966 }
5975   -
  5967 +
5976 5968 }
5977 5969  
5978 5970 if (value.bodyRegionId == '3') {
... ... @@ -5999,8 +5991,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5999 5991 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
6000 5992 }
6001 5993 }
6002   - else
6003   - {
  5994 + else {
6004 5995 if (value.bodyRegionId == '3' && $scope.canThirdBRDrawn == true) {
6005 5996  
6006 5997 $scope.loadTransparencyImage(value.bodyRegionId, value.Height, value.Width, value.X, value.Y, value.IsMirror, $scope.TransparencyBoxStartX, $scope.TransparencyEndX, $scope.TransparencyBoxStartY, $scope.TransparencyBoxEndY, $scope, false, false, true);
... ... @@ -6087,7 +6078,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6087 6078  
6088 6079 function TransparencyCanvasClickListener(evt) {
6089 6080 // alert('tb clicked');
6090   -
  6081 +
6091 6082 var pixelData;
6092 6083 var pixelDataTrans;
6093 6084 var mousePos = $scope.getMousePos(evt);
... ... @@ -6262,7 +6253,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6262 6253 }
6263 6254 //$scope.annotationTextArrayT1.push(annotations.annotationT1);
6264 6255 // $scope.annotationTextArrayT2.push(annotations.annotationT2);
6265   -
  6256 +
6266 6257 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
6267 6258 }
6268 6259 else
... ... @@ -6279,7 +6270,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6279 6270 }
6280 6271 //$scope.annotationTextArrayT1.push(annotations.annotationT1);
6281 6272 // $scope.annotationTextArrayT2.push(annotations.annotationT2);
6282   -
  6273 +
6283 6274 $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, false);
6284 6275 }
6285 6276  
... ... @@ -6364,11 +6355,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6364 6355 $scope.annotationTextArrayT1 = [];
6365 6356 $scope.annotationTextArrayT2 = [];
6366 6357 for (var i = 0; i <= annotations.annotationT1.length - 1; i++) {
6367   - $scope.annotationTextArrayT1.push(annotations.annotationT1[i]);
  6358 + $scope.annotationTextArrayT1.push(annotations.annotationT1[i]);
6368 6359  
6369 6360 }
6370 6361 for (var i = 0; i <= annotations.annotationT2.length - 1; i++) {
6371   - $scope.annotationTextArrayT2.push(annotations.annotationT2[i]);
  6362 + $scope.annotationTextArrayT2.push(annotations.annotationT2[i]);
6372 6363 }
6373 6364 //$scope.annotationTextArrayT1.push(annotations.annotationT1);
6374 6365 // $scope.annotationTextArrayT2.push(annotations.annotationT2);
... ... @@ -6396,8 +6387,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6396 6387 // $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(evt);
6397 6388 //}
6398 6389 }
6399   - else
6400   - {
  6390 + else {
6401 6391 $rootScope.getAnnotationTextBasedOnSelectedBodyRegion(evt);
6402 6392 }
6403 6393 }
... ... @@ -6427,7 +6417,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6427 6417 //trans layer image data
6428 6418 var pixelDataTrans = maskCanvasContexttrans.getImageData(imgX, imgY, 1, 1);
6429 6419 // console.log('at the time' + pixelData.data[0])
6430   -
  6420 +
6431 6421 var annotations = $scope.getAnnotationForTransparencyBox(pixelData, pixelDataTrans, $scope);
6432 6422 if ($('#speechBubble').length > 0)
6433 6423 $('#speechBubble').remove();
... ... @@ -6694,7 +6684,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6694 6684 //var txtTransparencyChange = document.getElementById("txtTransparencyChange");
6695 6685 //txtTransparencyChange.value = 0;
6696 6686 // document.getElementById('txtLayerNumber').value = 0;
6697   -
  6687 +
6698 6688 var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber);
6699 6689  
6700 6690 console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal);
... ... @@ -6774,7 +6764,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6774 6764  
6775 6765  
6776 6766 };
6777   -
  6767 +
6778 6768  
6779 6769 function positionTooltip(event, x, y) {
6780 6770 // alert('positionTooltip')
... ... @@ -6895,14 +6885,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6895 6885 $rootScope.isNormalMode = false;
6896 6886 $rootScope.isGenderChnage = false;
6897 6887 $rootScope.isViewChange = false;
6898   -
  6888 +
6899 6889 //if listanager is visisble then close it
6900 6890  
6901 6891 $rootScope.CloseListManager();
6902 6892  
6903 6893 // $rootScope.isHighlightBodyByBodySystem = false;
6904 6894  
6905   -
  6895 +
6906 6896 $('#sppeachBubble').css('display', 'none');
6907 6897  
6908 6898 $("#dot").css("display", "none");
... ... @@ -7053,7 +7043,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7053 7043 $scope.enableHighlight = function () {
7054 7044  
7055 7045 $scope.DisableUI();
7056   -
  7046 +
7057 7047 $("#btnTranparency").removeAttr('disabled', 'disabled');
7058 7048  
7059 7049 //if listanager is visisble then close it
... ... @@ -7161,7 +7151,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7161 7151  
7162 7152 }
7163 7153 else {
7164   -
  7154 +
7165 7155 //1.
7166 7156 $scope.flushCanvas();
7167 7157  
... ... @@ -7347,7 +7337,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7347 7337  
7348 7338 $scope.enableShowHideStructureBox = function () {
7349 7339  
7350   -
  7340 +
7351 7341 //if listanager is visisble then close it
7352 7342  
7353 7343  
... ... @@ -7456,7 +7446,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7456 7446  
7457 7447 var colorMode;
7458 7448  
7459   - if ($scope.isExtract == true) {
  7449 + if ($rootScope.isExtract == true) {
7460 7450  
7461 7451 if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true || ($rootScope.isHighlightBodyByBodySystem == true || $scope.isbodySystemHighlight == true)) {
7462 7452  
... ... @@ -7523,7 +7513,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7523 7513 var grayImageData = context_gray.getImageData(0, 0, width, ht);
7524 7514 var grayImageImageDataVar = grayImageData.data;
7525 7515  
7526   - if ($scope.isExtract == true) {
  7516 + if ($rootScope.isExtract == true) {
7527 7517 if (value.haveMirror == 'true') {
7528 7518 $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
7529 7519 }
... ... @@ -7568,7 +7558,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7568 7558  
7569 7559 if ($scope.isEligibleForHighlightBodyByTermList == true) {
7570 7560  
7571   - if ((($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined))||( $scope.isbodySystemHighlight == true && $rootScope.isHighLight == true)) {
  7561 + if ((($rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) || ($scope.isbodySystemHighlight == true && $rootScope.isHighLight == true)) {
7572 7562  
7573 7563  
7574 7564 $scope.isLoading = true;
... ... @@ -7688,8 +7678,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7688 7678  
7689 7679 var colorMode;
7690 7680  
7691   - if ($scope.isExtract == true) {
7692   - if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true || $rootScope.isHighlightBodyByBodySystem==true || $scope.isbodySystemHighlight==true) {
  7681 + if ($rootScope.isExtract == true) {
  7682 + if ((($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) || $rootScope.isListManagerSelected == true || $rootScope.isHighlightBodyByBodySystem == true || $scope.isbodySystemHighlight == true) {
7693 7683  
7694 7684 colorMode = $scope.applyWhiteMatrix(img, context);
7695 7685 }
... ... @@ -7728,7 +7718,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7728 7718 var grayImageData = context.getImageData(0, 0, width, ht);
7729 7719 var grayImageImageDataVar = grayImageData.data;
7730 7720  
7731   - if ($scope.isExtract == true) {
  7721 + if ($rootScope.isExtract == true) {
7732 7722 if (value.haveMirror == 'true') {
7733 7723 $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
7734 7724 }
... ... @@ -7783,8 +7773,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7783 7773 }
7784 7774 }
7785 7775 }
7786   - if (!$("#btnExtract").hasClass("btn-primary"))
7787   - {
  7776 + if (!$("#btnExtract").hasClass("btn-primary")) {
7788 7777 $("#btnHighLight").addClass("btn-primary");
7789 7778 $("#btnHighLight").removeClass("btn-black");
7790 7779  
... ... @@ -7862,7 +7851,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7862 7851 }
7863 7852  
7864 7853 $scope.getTermNumberList = function (actualTermNo) {
7865   -
  7854 +
7866 7855 if ($rootScope.TermNumberData != null) {
7867 7856  
7868 7857 $scope.termList = new jinqJs()
... ... @@ -8056,7 +8045,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8056 8045 $rootScope.isHighlightBodyByBodySystem = false;
8057 8046 $rootScope.CloseListManager();
8058 8047 })
8059   -
  8048 +
8060 8049 $scope.loadSelectedBodyView = function (currentBodyViewId) {
8061 8050  
8062 8051 //remove transaprency scale
... ... @@ -8073,7 +8062,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8073 8062 DataService.getJson(layerJsonPath)
8074 8063 .then(
8075 8064 function (result) {
8076   -
  8065 +
8077 8066  
8078 8067 $rootScope.BodyLayerData = result;
8079 8068  
... ... @@ -8119,7 +8108,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8119 8108  
8120 8109 if ($rootScope.TermNumberData != undefined) {
8121 8110 $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber);
8122   - if ($scope.TermList != null && $scope.TermList.length>0) {
  8111 + if ($scope.TermList != null && $scope.TermList.length > 0) {
8123 8112 $scope.setLayerNumberAndHighlightByTermList();
8124 8113 }
8125 8114 else {
... ... @@ -8128,16 +8117,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8128 8117 $scope.CalculateImageCordinates($rootScope.viewOrientationId)
8129 8118 }
8130 8119 }
8131   -
  8120 +
8132 8121 }
8133 8122  
8134 8123 else {
8135 8124  
8136 8125 $scope.CalculateImageCordinates($rootScope.viewOrientationId);
8137   -
  8126 +
8138 8127 // $("#btnTranparency").remove("disabled");
8139 8128 $('#txtlayerNumber').val($scope.layerNumber)
8140   -
  8129 +
8141 8130  
8142 8131  
8143 8132 }
... ... @@ -8157,11 +8146,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8157 8146 }
8158 8147 );
8159 8148 }
8160   -
  8149 +
8161 8150 $scope.OnViewChange = function (event) {
8162 8151 $scope.DisableUI();
8163 8152 if ($("[title='" + event.target.title + "']").parent().hasClass("active") == true) {
8164   -
  8153 +
8165 8154  
8166 8155 }
8167 8156 else {
... ... @@ -8416,8 +8405,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8416 8405  
8417 8406 $scope.loadNavigatorForSelectedBodyView(data.reloadDABodyViewId);
8418 8407  
8419   - if($scope.layerNumber!= 0) {
8420   - $scope.EnableUI();
  8408 + if ($scope.layerNumber != 0) {
  8409 + $scope.EnableUI();
8421 8410 }
8422 8411 }
8423 8412 // $scope.currentTitleFromJson = $rootScope.getLocalStorageValue("currentViewTitle");
... ... @@ -8504,7 +8493,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8504 8493  
8505 8494 //body highlight options functinality
8506 8495 $scope.LoadBodySystemData = function (event) {
8507   - event.stopPropagation();
  8496 + event.stopPropagation();
8508 8497 $("#structureDropdown").toggle();
8509 8498 $("#genderChangeId").css("display", "none");
8510 8499 $("#viewID").css("display", "none");
... ... @@ -8519,24 +8508,24 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8519 8508 angular.forEach(systemList, function (value, key) {
8520 8509  
8521 8510 systemListHtml = systemListHtml + '<li><a href="#" id="' + value._BodySystemId + '" title="' + value._Name + '">' + value._Name + '</a></li>'
8522   - })
  8511 + })
8523 8512  
8524 8513 systemListHtml = systemListHtml + '</ul>';
8525 8514 $('#bodySystem').append(systemListHtml);
8526 8515  
8527   -
8528   - // var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json';
8529   - // DataService.getJson(bodySystemDataPath)
8530   - //.then(
8531   - // function (result) {
8532 8516  
8533   - // $rootScope.BodySystemData = result;
  8517 + // var bodySystemDataPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_body_system_term_' + currentBodyViewId + '.json';
  8518 + // DataService.getJson(bodySystemDataPath)
  8519 + //.then(
  8520 + // function (result) {
8534 8521  
8535   - // },
8536   - // function (error) {
8537   - // console.log(error.statusText)
8538   - // }
8539   - // )
  8522 + // $rootScope.BodySystemData = result;
  8523 +
  8524 + // },
  8525 + // function (error) {
  8526 + // console.log(error.statusText)
  8527 + // }
  8528 + // )
8540 8529  
8541 8530 }
8542 8531  
... ... @@ -8562,14 +8551,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8562 8551 $("#viewID").css("display", "none");
8563 8552 var $ua = navigator.userAgent;
8564 8553 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
8565   - $(".custom-tooltip").css("display","none");
8566   - $(".custom-tooltip1").css("display","none");
8567   - $(".custom-tooltip2").css("display","none");
  8554 + $(".custom-tooltip").css("display", "none");
  8555 + $(".custom-tooltip1").css("display", "none");
  8556 + $(".custom-tooltip2").css("display", "none");
8568 8557 }
8569   -
  8558 +
8570 8559 });
8571 8560  
8572 8561 $scope.HighlightBodyByBodySystem = function (event) {
  8562 +
  8563 + $rootScope.isExtract = false;
  8564 +
8573 8565 $("#structureDropdown").toggle();
8574 8566 $scope.DisableUI();
8575 8567  
... ... @@ -8581,7 +8573,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8581 8573  
8582 8574 $rootScope.systemNumber = event.currentTarget.id;
8583 8575  
8584   -
  8576 +
8585 8577 if ($rootScope.systemNumber == 0) {
8586 8578  
8587 8579 console.log("inside HighlightBodyByBodySystem ..came inside current structure");
... ... @@ -8602,9 +8594,16 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8602 8594  
8603 8595 if ($rootScope.isHighLight == false) {
8604 8596 //color the body gray
8605   - $rootScope.isHighLight = true
8606   - console.log('highLightBody from HighlightBodyByBodySystem')
8607   - $scope.highLightBody();
  8597 + console.log('highLightBody from HighlightBodyByBodySystem');
  8598 +
  8599 + $rootScope.isHighLight = true;
  8600 +
  8601 + if ($rootScope.isExtract = true) {
  8602 + $rootScope.isExtract = false;
  8603 + $scope.CalculateImageCordinates($rootScope.viewOrientationId);
  8604 + }
  8605 + else
  8606 + $scope.highLightBody();
8608 8607 }
8609 8608 else {
8610 8609 //This else is when user seraced anything then change the view and clicked on highlight options
... ... @@ -8636,7 +8635,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8636 8635 //$rootScope.isLoading = true;
8637 8636 $('#spinner').css('visibility', 'visible');
8638 8637  
8639   -
  8638 +
8640 8639 var viewtarget_highlightbody = angular.element(event.currentTarget);
8641 8640 var title_highlightbody = viewtarget_highlightbody.attr('title');
8642 8641  
... ... @@ -8664,7 +8663,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8664 8663 }
8665 8664 }
8666 8665  
8667   - $scope.removeCurrentHighlightedBodySystem = function(){
  8666 + $scope.removeCurrentHighlightedBodySystem = function () {
8668 8667  
8669 8668 for (var i = 0; i < $rootScope.grayImageDataList.length; i++) {
8670 8669 var grayCanvasID = 'imageCanvas' + parseInt(i + 1);
... ... @@ -8897,7 +8896,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8897 8896 }
8898 8897 }
8899 8898  
8900   -
  8899 +
8901 8900 $scope.ShowSearch = function () {
8902 8901 if (($rootScope.vocabTermDataArray != null || $rootScope.vocabTermDataArray != undefined) && ($rootScope.vocabTermDataArray.length > 0)) {
8903 8902 var primaryLexiconIndex;
... ... @@ -8953,12 +8952,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8953 8952 $compile($e2)($scope);
8954 8953 document.getElementById("termlistfilter").style.display = "block";
8955 8954 $timeout(function () {
8956   - $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) {
8957   - if ($(this).find("a").html() == document.getElementById("typedTermName").value) {
8958   - $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" });
8959   - $(this).find("a").css({ "background-color": "#3399FF", "color": "#ffffff" });
8960   - }
8961   - });
  8955 + $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) {
  8956 + if ($(this).find("a").html() == document.getElementById("typedTermName").value) {
  8957 + $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" });
  8958 + $(this).find("a").css({ "background-color": "#3399FF", "color": "#ffffff" });
  8959 + }
  8960 + });
8962 8961 }, 100);
8963 8962 $timeout(function () {
8964 8963 $rootScope.searchListArray = [];
... ... @@ -8977,12 +8976,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8977 8976 }, 500);
8978 8977  
8979 8978 }
8980   - else
8981   - {
8982   - $rootScope.loadSearchData();
8983   - $scope.ShowSearch();
8984   -
8985   -
  8979 + else {
  8980 + $rootScope.loadSearchData();
  8981 + $scope.ShowSearch();
  8982 +
  8983 +
8986 8984 }
8987 8985 }
8988 8986  
... ... @@ -9065,7 +9063,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9065 9063  
9066 9064 //list manager
9067 9065 $scope.$on('listManagerEvent', function (event, data) {
9068   -
  9066 +
9069 9067 if ($rootScope.islistManagerEventAlredayDispachted == true) {
9070 9068  
9071 9069 $('#spinner').css('visibility', 'visible');
... ... @@ -9119,7 +9117,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9119 9117  
9120 9118  
9121 9119 });
9122   -
  9120 +
9123 9121 $scope.loadListManger = function () {
9124 9122 var primaryLexiconIndex;
9125 9123 if ($rootScope.vocabTermDataArray != null && $rootScope.vocabTermDataArray != undefined && $rootScope.vocabTermDataArray.length > 0) {
... ... @@ -9199,15 +9197,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9199 9197  
9200 9198 }
9201 9199 }
9202   -
  9200 +
9203 9201  
9204 9202  
9205 9203 $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber, isTermListOptionClicked) {
9206   -
  9204 +
9207 9205 $scope.DisableUI();
9208 9206  
9209 9207 $rootScope.searchSelectedText = $("#" + actualTermNumber).text();
9210   -
  9208 +
9211 9209 $rootScope.slectedActualTermNumber = actualTermNumber;
9212 9210  
9213 9211 if (isTermListOptionClicked == true) {
... ... @@ -9237,7 +9235,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9237 9235 $("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });
9238 9236 $("div#backdrop #termlistfilter li").find("a[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
9239 9237 $scope.terminateCurrentlyRunningWPs();
9240   -
  9238 +
9241 9239 $rootScope.isListManagerSelected = true;
9242 9240 //---
9243 9241 if ($rootScope.isListManagerSelected == true) {
... ... @@ -9378,7 +9376,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9378 9376 var sliderVal = parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber);
9379 9377 console.log('inside setLayerNumberAndHighlightByTermList. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - parseInt($scope.layerNumber): ' + parseInt($scope.layerNumber) + ' = set value for layerChangeSlider: ' + sliderVal);
9380 9378  
9381   - $('#layerChangeSlider').slider("option", "value",sliderVal );
  9379 + $('#layerChangeSlider').slider("option", "value", sliderVal);
9382 9380  
9383 9381 //8.remove current layer canavses
9384 9382 // $scope.flushCanvas();
... ... @@ -9484,7 +9482,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9484 9482  
9485 9483 $scope.aligneCanvasWithTerm = function () {
9486 9484 console.log('aligneCanvasWithTerm')
9487   -
  9485 +
9488 9486  
9489 9487 var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $rootScope.zoomInOut, DA[0].ZOOM_TERM_DATA));
9490 9488 var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $rootScope.zoomInOut, DA[0].ZOOM_TERM_DATA));
... ... @@ -9670,7 +9668,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9670 9668  
9671 9669 }
9672 9670 else {
9673   -
  9671 +
9674 9672 $("#txtlayerNumber").val($rootScope.totalLayers);
9675 9673 }
9676 9674  
... ... @@ -9695,7 +9693,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9695 9693  
9696 9694 $scope.LayerValueChangeBasedOnKeyUp = function (e) {
9697 9695  
9698   -
  9696 +
9699 9697 if (e.keyCode == 13) {
9700 9698  
9701 9699 if ($("#txtlayerNumber").val() == '') {
... ... @@ -9714,7 +9712,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9714 9712 else {
9715 9713  
9716 9714 if (keyUplayerNumber > $rootScope.totalLayers) {
9717   -
  9715 +
9718 9716 $("#txtlayerNumber").val($rootScope.totalLayers);
9719 9717 $scope.layerNumber = parseInt($rootScope.totalLayers);
9720 9718  
... ... @@ -9734,12 +9732,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9734 9732 var layerInputVal = $("#txtlayerNumber").val();
9735 9733  
9736 9734 if (layerInputVal <= $rootScope.totalLayers) {
9737   -
  9735 +
9738 9736 $("#txtlayerNumber").val(layerInputVal);
9739   -
  9737 +
9740 9738 }
9741 9739 else {
9742   -
  9740 +
9743 9741 $("#txtlayerNumber").val($rootScope.totalLayers);
9744 9742 }
9745 9743 }
... ... @@ -9800,7 +9798,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9800 9798  
9801 9799 $scope.resetSearchListView = function () {
9802 9800  
9803   - $scope.ShowSearch();
  9801 + $scope.ShowSearch();
9804 9802 }
9805 9803  
9806 9804 }])
... ... @@ -9825,10 +9823,9 @@ function OnViewChange(event) {
9825 9823 function OnBodySystemSelection(event) {
9826 9824 console.log('OnBodySystem chnaged is called outside ');
9827 9825 var scope = angular.element(document.getElementById("daView")).scope();
9828   -
9829 9826  
9830   - scope.$apply(function ()
9831   - {
  9827 +
  9828 + scope.$apply(function () {
9832 9829 scope.HighlightBodyByBodySystem(event);
9833 9830 });
9834 9831 }
... ... @@ -9924,7 +9921,7 @@ function OnIdentifyClick() {
9924 9921 }
9925 9922  
9926 9923 function OnZoom() {
9927   -
  9924 +
9928 9925 var scope = angular.element(document.getElementById("daView")).scope();
9929 9926 scope.DisableUI();
9930 9927  
... ... @@ -9939,7 +9936,7 @@ function OnZoom() {
9939 9936 scope.enableZoom();
9940 9937 });
9941 9938  
9942   -
  9939 +
9943 9940 }
9944 9941  
9945 9942 function onListManagerTermSelection(id, isTermListOptionClicked) {
... ... @@ -9972,5 +9969,5 @@ function viewChange(event) {
9972 9969 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
9973 9970 $(".custom-tooltip2").toggle();
9974 9971 }
9975   -
  9972 +
9976 9973 }
... ...