Commit c819cd19eab39fd2fa09690dc24ad5bad9e09607

Authored by unknown
1 parent f7ecf31e

Pin Issue Resolved

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -335,7 +335,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -335,7 +335,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
335 openedImage.onerror = loadFailure; 335 openedImage.onerror = loadFailure;
336 openedImage.src = $rootScope.OpenItemImagePath; 336 openedImage.src = $rootScope.OpenItemImagePath;
337 } 337 }
338 - 338 +
339 } 339 }
340 340
341 341
@@ -349,25 +349,26 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -349,25 +349,26 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
349 if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) { 349 if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
350 $("#listManager").css("display", "none"); 350 $("#listManager").css("display", "none");
351 $("#optionsListManagerTab").removeClass("active"); 351 $("#optionsListManagerTab").removeClass("active");
  352 + // scope.isBodySystemSelected = false;
352 //make the head green 353 //make the head green
353 354
354 - setTimeout(function () { 355 + //setTimeout(function () {
355 356
356 - var radialAfterClick = $('#aaDetailViewCanvas').createGradient({  
357 - x1: 50, y1: 50,  
358 - x2: 50, y2: 50,  
359 - r1: 10, r2: 30,  
360 - c1: 'rgba(100, 50, 0,0)',  
361 - c2: 'rgb(126, 187, 83)'  
362 - });  
363 - console.log(scope.listMangerID);  
364 - for (var i = 0; i <= scope.listMangerID.length - 1; i++) {  
365 - $('#aaDetailViewCanvas').setLayer(scope.listMangerID[i], {  
366 - fillStyle: radialAfterClick,  
367 - }).drawLayers();  
368 - } 357 + // var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
  358 + // x1: 50, y1: 50,
  359 + // x2: 50, y2: 50,
  360 + // r1: 10, r2: 30,
  361 + // c1: 'rgba(100, 50, 0,0)',
  362 + // c2: 'rgb(126, 187, 83)'
  363 + // });
  364 + // console.log(scope.listMangerID);
  365 + // for (var i = 0; i <= scope.listMangerID.length - 1; i++) {
  366 + // $('#aaDetailViewCanvas').setLayer(scope.listMangerID[i], {
  367 + // fillStyle: radialAfterClick,
  368 + // }).drawLayers();
  369 + // }
369 370
370 - }, 1000); 371 + //}, 1000);
371 372
372 if (ui.value == 100) { 373 if (ui.value == 100) {
373 relativeWidth = scope.ViewImageWidth; 374 relativeWidth = scope.ViewImageWidth;
@@ -438,7 +439,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -438,7 +439,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
438 case "hidePinBtn": 439 case "hidePinBtn":
439 break; 440 break;
440 case "allPinBtn": 441 case "allPinBtn":
441 -  
442 if ($("#bodySystemList li.activeAASystemSelect a").attr("id") != undefined) { 442 if ($("#bodySystemList li.activeAASystemSelect a").attr("id") != undefined) {
443 scope.showSelectedSystemPins($("#bodySystemList li.activeAASystemSelect a").attr("id")) 443 scope.showSelectedSystemPins($("#bodySystemList li.activeAASystemSelect a").attr("id"))
444 setTimeout(function () { 444 setTimeout(function () {
@@ -516,13 +516,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -516,13 +516,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
516 $rootScope.aaPinDataArray = []; 516 $rootScope.aaPinDataArray = [];
517 $rootScope.isShowSelectedSystemPinsClicked = false; 517 $rootScope.isShowSelectedSystemPinsClicked = false;
518 $scope.showAllPins = function () { 518 $scope.showAllPins = function () {
519 -  
520 $scope.allPinDataArray = []; 519 $scope.allPinDataArray = [];
521 var promise = ModuleService.getPinDataForImage($rootScope.imageName) 520 var promise = ModuleService.getPinDataForImage($rootScope.imageName)
522 -  
523 .then( 521 .then(
524 function (result) { 522 function (result) {
525 -  
526 //load navigator image 523 //load navigator image
527 if (result.data.Root._NavigatorImage != undefined) { 524 if (result.data.Root._NavigatorImage != undefined) {
528 document.getElementById('navimg').src = '~/../content/images/aa/images/navigator/' + result.data.Root._NavigatorImage; 525 document.getElementById('navimg').src = '~/../content/images/aa/images/navigator/' + result.data.Root._NavigatorImage;
@@ -533,7 +530,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -533,7 +530,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
533 document.getElementById('navigatorDiv').style.visibility = 'hidden'; 530 document.getElementById('navigatorDiv').style.visibility = 'hidden';
534 531
535 } 532 }
536 -  
537 //draw pins 533 //draw pins
538 $scope.aaPinData = result.data.Root.Item; 534 $scope.aaPinData = result.data.Root.Item;
539 if ($scope.aaPinData != null && $scope.aaPinData.length > 0) { 535 if ($scope.aaPinData != null && $scope.aaPinData.length > 0) {
@@ -543,7 +539,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -543,7 +539,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
543 $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY) 539 $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
544 }) 540 })
545 541
546 -  
547 if ($rootScope.isShowSelectedSystemPinsClicked == false) { 542 if ($rootScope.isShowSelectedSystemPinsClicked == false) {
548 $rootScope.isShowSelectedSystemPinsClicked = true; 543 $rootScope.isShowSelectedSystemPinsClicked = true;
549 //load search/vocab data 544 //load search/vocab data
@@ -553,8 +548,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -553,8 +548,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
553 $rootScope.isLoading = false; 548 $rootScope.isLoading = false;
554 $('#spinner').css('visibility', 'hidden'); 549 $('#spinner').css('visibility', 'hidden');
555 } 550 }
556 -  
557 -  
558 } 551 }
559 }, 552 },
560 function (error) { 553 function (error) {
@@ -775,114 +768,206 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -775,114 +768,206 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
775 $scope.FilterByImage(1, query); 768 $scope.FilterByImage(1, query);
776 769
777 } 770 }
778 - $scope.isSelectedSystemSelected = false; 771 + $scope.isBodySystemSelected = false;
  772 + $scope.SelectedSystemTitle = "Current Structure";
779 $scope.showSelectedSystemPins = function (event) { 773 $scope.showSelectedSystemPins = function (event) {
780 -  
781 - if (typeof event == "string") { 774 +
  775 + if (typeof event == "object") {
  776 + if (event.currentTarget.title == $("#bodySystemList li.activeAASystemSelect a").attr("title")) {
  777 +
  778 + }
  779 + else {
  780 + $scope.typeOfEvent = typeof event;
  781 + $scope.SelectedSystemID = event.currentTarget.id;
  782 + $scope.SelectedSystemTitle = event.currentTarget.title;
  783 + if (event.currentTarget.title == "Current Structure") {
  784 +
  785 + }
  786 + else
  787 + {
  788 + $scope.clickedPins = [];
  789 + $scope.activePinArray = [];
  790 + }
  791 + $scope.isBodySystemSelected = true;
  792 + $rootScope.isShowSelectedSystemPinsClicked = true;
  793 + var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a");
  794 + var bodySystemListlength = bodySystemListObj.length;
  795 + for (var i = 0; i < bodySystemListlength; i++) {
  796 +
  797 + $("#" + i).parent().removeClass("activeAASystemSelect");
  798 + }
  799 + $("#" + $scope.SelectedSystemID).parent().addClass("activeAASystemSelect");
  800 +
  801 + $rootScope.isLoading = true;
  802 + $('#spinner').css('visibility', 'visible');
  803 +
  804 + $scope.removeSpeechBubble();
  805 + if ($scope.SelectedSystemID == "0") {
  806 +
  807 + $scope.selectedSystemName = null;
  808 + if ($scope.isHidePinBtnClicked) {
  809 + $scope.showAllPinsAfterHide();
  810 + }
  811 + else {
  812 + $scope.showAllPins();
  813 + }
  814 + }
  815 + else {
  816 +
  817 + $scope.selectedSystemName = $scope.SelectedSystemTitle;
  818 + // get termText info
  819 + var promise = ModuleService.getTermTextDataForPin($scope.moduleName)
  820 + .then(
  821 + function (response) {
  822 +
  823 + $scope.TermInfo = response.data.Terms.Term;
  824 +
  825 + //on gettng all required data, draw pins
  826 + if ($scope.aaPinData != null && $scope.aaPinData.length > 0) {
  827 +
  828 + $scope.selectedSystemPinData = new jinqJs()
  829 + .from($scope.aaPinData)
  830 + .where("_BodySystemName == " + $scope.selectedSystemName)
  831 + .select();
  832 + if ($scope.isHidePinBtnClicked) {
  833 + // $scope.showAllPinsAfterHide($scope.selectedSystemPinData);
  834 + $scope.showAllPinsAfterHide();
  835 +
  836 + }
  837 + else {
  838 + //remove other system pins
  839 + if ($scope.selectedSystemPinData != null && $scope.selectedSystemPinData.length > 0) {
  840 +
  841 + angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) {
  842 +
  843 + if (aaPinDataValue._BodySystemName != $scope.selectedSystemName)
  844 + {
  845 + $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId);
  846 + }
  847 +
  848 + })
  849 +
  850 + angular.forEach($scope.selectedSystemPinData, function (value, key) {
  851 + $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
  852 + });
  853 +
  854 + // make all pin heads grey
  855 + var radial = $('#aaDetailViewCanvas').createGradient({
  856 + x1: 50, y1: 50,
  857 + x2: 50, y2: 50,
  858 + r1: 10, r2: 30,
  859 + c1: 'rgba(100, 50, 0,0)',
  860 + c2: 'rgb(216, 216, 216)'
  861 + });
  862 +
  863 +
  864 + $('#aaDetailViewCanvas').setLayers({
  865 + fillStyle: radial,
  866 + }).drawLayers();
  867 +
  868 + //show annotation on first pin of the sysyem
  869 + $scope.showAnnotation($scope.selectedSystemPinData, false, false, false);
  870 + }
  871 + }
  872 + }
  873 + },
  874 + function (error) {
  875 + // handle errors here
  876 + console.log(' error: ' + error.statusText);
  877 + }
  878 + )
  879 +
  880 + }
  881 +
  882 +
  883 + }
  884 + }
  885 +
  886 + else
  887 + {
782 $scope.SelectedSystemID = event; 888 $scope.SelectedSystemID = event;
783 $scope.SelectedSystemTitle = $("#bodySystemList li.activeAASystemSelect a").attr("title"); 889 $scope.SelectedSystemTitle = $("#bodySystemList li.activeAASystemSelect a").attr("title");
784 - $scope.typeOfEvent = typeof event; 890 + $scope.typeOfEvent = typeof event;
  891 + // $scope.isBodySystemSelected = true;
  892 + $rootScope.isShowSelectedSystemPinsClicked = true;
  893 + var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a");
  894 + var bodySystemListlength = bodySystemListObj.length;
  895 + for (var i = 0; i < bodySystemListlength; i++) {
  896 +
  897 + $("#" + i).parent().removeClass("activeAASystemSelect");
785 } 898 }
786 - else {  
787 - $scope.typeOfEvent = typeof event;  
788 - $scope.SelectedSystemID = event.currentTarget.id;  
789 - $scope.SelectedSystemTitle = event.currentTarget.title;  
790 - $scope.clickedPins = [];  
791 - }  
792 -  
793 - $scope.isSelectedSystemSelected = true;  
794 - $rootScope.isShowSelectedSystemPinsClicked = true;  
795 - var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a");  
796 - var bodySystemListlength = bodySystemListObj.length;  
797 - for (var i = 0; i < bodySystemListlength; i++) { 899 + $("#" + $scope.SelectedSystemID).parent().addClass("activeAASystemSelect");
798 900
799 - $("#" + i).parent().removeClass("activeAASystemSelect");  
800 - }  
801 - $("#" + $scope.SelectedSystemID).parent().addClass("activeAASystemSelect"); 901 + $rootScope.isLoading = true;
  902 + $('#spinner').css('visibility', 'visible');
802 903
803 - $rootScope.isLoading = true;  
804 - $('#spinner').css('visibility', 'visible'); 904 + $scope.removeSpeechBubble();
  905 + if ($scope.SelectedSystemID == "0") {
805 906
806 - $scope.removeSpeechBubble();  
807 - if ($scope.SelectedSystemID == "0") {  
808 -  
809 - $scope.selectedSystemName = null;  
810 - if ($scope.isHidePinBtnClicked) {  
811 - $scope.showAllPinsAfterHide(); 907 + $scope.selectedSystemName = null;
  908 + if ($scope.isHidePinBtnClicked) {
  909 + $scope.showAllPinsAfterHide();
  910 + }
  911 + else {
  912 + $scope.showAllPins();
  913 + }
812 } 914 }
813 else { 915 else {
814 - $scope.showAllPins();  
815 - }  
816 - }  
817 - else {  
818 -  
819 - $scope.selectedSystemName = $scope.SelectedSystemTitle;  
820 - // get termText info  
821 - var promise = ModuleService.getTermTextDataForPin($scope.moduleName)  
822 - .then(  
823 - function (response) {  
824 -  
825 - $scope.TermInfo = response.data.Terms.Term;  
826 916
827 - //on gettng all required data, draw pins  
828 - if ($scope.aaPinData != null && $scope.aaPinData.length > 0) { 917 + $scope.selectedSystemName = $scope.SelectedSystemTitle;
  918 + // get termText info
  919 + var promise = ModuleService.getTermTextDataForPin($scope.moduleName)
  920 + .then(
  921 + function (response) {
  922 + $scope.TermInfo = response.data.Terms.Term;
829 923
830 - $scope.selectedSystemPinData = new jinqJs()  
831 - .from($scope.aaPinData)  
832 - .where("_BodySystemName == " + $scope.selectedSystemName)  
833 - .select();  
834 - if ($scope.isHidePinBtnClicked) {  
835 - // $scope.showAllPinsAfterHide($scope.selectedSystemPinData);  
836 - $scope.showAllPinsAfterHide(); 924 + //on gettng all required data, draw pins
  925 + if ($scope.aaPinData != null && $scope.aaPinData.length > 0) {
837 926
838 - }  
839 - else {  
840 - //remove other system pins  
841 - if ($scope.selectedSystemPinData != null && $scope.selectedSystemPinData.length > 0) {  
842 -  
843 - angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) {  
844 -  
845 - if (aaPinDataValue._BodySystemName != $scope.selectedSystemName)  
846 - $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId);  
847 - })  
848 -  
849 - angular.forEach($scope.selectedSystemPinData, function (value, key) {  
850 - $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)  
851 - });  
852 -  
853 - //make all pin heads grey  
854 - var radial = $('#aaDetailViewCanvas').createGradient({  
855 - x1: 50, y1: 50,  
856 - x2: 50, y2: 50,  
857 - r1: 10, r2: 30,  
858 - c1: 'rgba(100, 50, 0,0)',  
859 - c2: 'rgb(216, 216, 216)'  
860 - });  
861 -  
862 -  
863 - $('#aaDetailViewCanvas').setLayers({  
864 - fillStyle: radial,  
865 - }).drawLayers();  
866 -  
867 - //show annotation on first pin of the sysyem  
868 - $scope.showAnnotation($scope.selectedSystemPinData, false, false, false); 927 + $scope.selectedSystemPinData = new jinqJs()
  928 + .from($scope.aaPinData)
  929 + .where("_BodySystemName == " + $scope.selectedSystemName)
  930 + .select();
  931 + if ($scope.isHidePinBtnClicked) {
  932 + // $scope.showAllPinsAfterHide($scope.selectedSystemPinData);
  933 + $scope.showAllPinsAfterHide();
  934 +
  935 + }
  936 + else {
  937 + //remove other system pins
  938 + if ($scope.selectedSystemPinData != null && $scope.selectedSystemPinData.length > 0) {
  939 +
  940 + angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) {
  941 +
  942 + if (aaPinDataValue._BodySystemName != $scope.selectedSystemName)
  943 + $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId);
  944 + })
  945 +
  946 + angular.forEach($scope.selectedSystemPinData, function (value, key) {
  947 + $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
  948 + });
  949 + //show annotation on first pin of the sysyem
  950 + $scope.showAnnotation($scope.selectedSystemPinData, false, false, false);
  951 + }
869 } 952 }
870 } 953 }
871 - }  
872 - },  
873 - function (error) {  
874 - // handle errors here  
875 - console.log(' error: ' + error.statusText);  
876 - }  
877 - ) 954 + },
  955 + function (error) {
  956 + // handle errors here
  957 + console.log(' error: ' + error.statusText);
  958 + }
  959 + )
878 960
  961 + }
879 } 962 }
880 963
  964 +
881 } 965 }
882 $scope.listMangerID = []; 966 $scope.listMangerID = [];
883 $scope.activePinArray = []; 967 $scope.activePinArray = [];
884 $scope.isSearchOptionClicked = false; 968 $scope.isSearchOptionClicked = false;
885 $scope.showAnnotation = function (selectedPinData, isCtrlPressed, isPinClicked, isItemSearched) { 969 $scope.showAnnotation = function (selectedPinData, isCtrlPressed, isPinClicked, isItemSearched) {
  970 +
886 $scope.selectedPin = []; 971 $scope.selectedPin = [];
887 var isSameTermWithMultiPin = false; 972 var isSameTermWithMultiPin = false;
888 var firstPinId = selectedPinData[0]._PinId; 973 var firstPinId = selectedPinData[0]._PinId;
@@ -896,14 +981,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -896,14 +981,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
896 .where("_TermId == " + pinTermNumber) 981 .where("_TermId == " + pinTermNumber)
897 .select(); 982 .select();
898 983
899 - if ($scope.isSearchOptionClicked == true) {  
900 - $scope.activePinArray = [];  
901 - $scope.clickedPins = [];  
902 - $scope.isSearchOptionClicked = false;  
903 - }  
904 - if ($scope.isSelectedSystemSelected == true) {  
905 - $scope.activePinArray = [];  
906 - $scope.isSelectedSystemSelected = false; 984 + //if ($scope.isSearchOptionClicked == true) {
  985 + // $scope.activePinArray = [];
  986 + // $scope.clickedPins = [];
  987 + // $scope.isSearchOptionClicked = false;
  988 + //}
  989 + if ($scope.isBodySystemSelected == true) {
  990 +
907 $scope.isSelectedSystemSelectedAftrChange = true; 991 $scope.isSelectedSystemSelectedAftrChange = true;
908 } 992 }
909 for (var i = 0; i <= pinDataWithFirstTermNumber.length - 1; i++) { 993 for (var i = 0; i <= pinDataWithFirstTermNumber.length - 1; i++) {
@@ -952,10 +1036,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -952,10 +1036,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
952 if (pinDataWithFirstTermNumber.length > 1) { 1036 if (pinDataWithFirstTermNumber.length > 1) {
953 isSameTermWithMultiPin = true; 1037 isSameTermWithMultiPin = true;
954 } 1038 }
955 -  
956 angular.forEach(pinDataWithFirstTermNumber, function (value, key) { 1039 angular.forEach(pinDataWithFirstTermNumber, function (value, key) {
957 $scope.selectedPin.push(value._PinId); 1040 $scope.selectedPin.push(value._PinId);
958 - $scope.clickedPins.push({ 'id': value._PinId }); 1041 + if ($scope.isBodySystemSelected == true) {
  1042 + $scope.clickedPins.push({ 'id': value._PinId });
  1043 + $scope.isBodySystemSelected = false;
  1044 + }
959 var headX = (parseInt(value._HeadX)); 1045 var headX = (parseInt(value._HeadX));
960 var headY = (parseInt(value._HeadY)); 1046 var headY = (parseInt(value._HeadY));
961 $scope.createSpeechBubble(parseInt(headX) + 10, parseInt(headY) + 10, value._PinId, isCtrlPressed, isPinClicked, isSameTermWithMultiPin); 1047 $scope.createSpeechBubble(parseInt(headX) + 10, parseInt(headY) + 10, value._PinId, isCtrlPressed, isPinClicked, isSameTermWithMultiPin);
@@ -1024,8 +1110,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1024,8 +1110,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1024 }; 1110 };
1025 1111
1026 $scope.hideSpeechBubble = function () { 1112 $scope.hideSpeechBubble = function () {
1027 -  
1028 -  
1029 //clear speech bubbles 1113 //clear speech bubbles
1030 var speechBubbles = $("div[id*='speechBubble']"); 1114 var speechBubbles = $("div[id*='speechBubble']");
1031 if (speechBubbles != null || speechBubbles != undefined && speechBubbles.length > 0) { 1115 if (speechBubbles != null || speechBubbles != undefined && speechBubbles.length > 0) {
@@ -1230,7 +1314,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1230,7 +1314,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1230 fillStyle: radial, 1314 fillStyle: radial,
1231 }).drawLayers(); 1315 }).drawLayers();
1232 }); 1316 });
1233 - 1317 +
1234 //make the head green 1318 //make the head green
1235 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ 1319 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
1236 x1: 50, y1: 50, 1320 x1: 50, y1: 50,
@@ -1242,12 +1326,20 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1242,12 +1326,20 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1242 var pinHeadName = 'PinArc_' + PinId; 1326 var pinHeadName = 'PinArc_' + PinId;
1243 var pin = $('#aaDetailViewCanvas').getLayer(pinHeadName); 1327 var pin = $('#aaDetailViewCanvas').getLayer(pinHeadName);
1244 // pin.fillStyle = radialAfterClick; 1328 // pin.fillStyle = radialAfterClick;
1245 - 1329 +
1246 $('#aaDetailViewCanvas').setLayer(pinHeadName, { 1330 $('#aaDetailViewCanvas').setLayer(pinHeadName, {
1247 fillStyle: radialAfterClick, 1331 fillStyle: radialAfterClick,
1248 }).drawLayers(); 1332 }).drawLayers();
1249 -  
1250 - 1333 +
  1334 + if ($scope.typeOfEvent == "string") {
  1335 + for (var i = 0; i <= $scope.clickedPins.length - 1; i++) {
  1336 + var pinHeadName = 'PinArc_' + $scope.clickedPins[i].id;
  1337 + $('#aaDetailViewCanvas').setLayer(pinHeadName, {
  1338 + fillStyle: radialAfterClick,
  1339 + }).drawLayers();
  1340 + }
  1341 + }
  1342 +
1251 } 1343 }
1252 $scope.angle = function (id, cx, cy, ex, ey, BoolValues) { 1344 $scope.angle = function (id, cx, cy, ex, ey, BoolValues) {
1253 1345
@@ -1292,13 +1384,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1292,13 +1384,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1292 1384
1293 1385
1294 $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) { 1386 $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) {
1295 -  
1296 - if ($scope.isSearchOptionClicked == true) {  
1297 - $scope.clickedPins = [];  
1298 - $scope.isSearchOptionClicked = false;  
1299 - } 1387 +
  1388 + //if ($scope.isSearchOptionClicked == true) {
  1389 + // $scope.clickedPins = [];
  1390 + // $scope.isSearchOptionClicked = false;
  1391 + //}
1300 1392
1301 - 1393 +
1302 var multipliedByValue = 5; 1394 var multipliedByValue = 5;
1303 var $ua = navigator.userAgent; 1395 var $ua = navigator.userAgent;
1304 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { 1396 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
@@ -1337,7 +1429,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1337,7 +1429,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1337 radius: 10, 1429 radius: 10,
1338 1430
1339 click: function (clickedPin) { 1431 click: function (clickedPin) {
1340 - 1432 +
1341 if (clickedPin.event.ctrlKey == false) { 1433 if (clickedPin.event.ctrlKey == false) {
1342 $scope.clickedPins = []; 1434 $scope.clickedPins = [];
1343 $scope.listMangerID = []; 1435 $scope.listMangerID = [];
@@ -1416,6 +1508,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1416,6 +1508,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1416 } 1508 }
1417 1509
1418 }).drawLayers(); 1510 }).drawLayers();
  1511 +
1419 } 1512 }
1420 1513
1421 1514
@@ -1705,7 +1798,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1705,7 +1798,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1705 } 1798 }
1706 1799
1707 $scope.showAllPinsAfterHide = function (event) { 1800 $scope.showAllPinsAfterHide = function (event) {
1708 - 1801 +
1709 if ($("#dropdownMenu221").hasClass("aaSystemDisable")) { 1802 if ($("#dropdownMenu221").hasClass("aaSystemDisable")) {
1710 $("#dropdownMenu221").removeClass("aaSystemDisable"); 1803 $("#dropdownMenu221").removeClass("aaSystemDisable");
1711 } 1804 }
@@ -1742,7 +1835,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1742,7 +1835,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1742 1835
1743 1836
1744 $scope.showSelectedPins = function () { 1837 $scope.showSelectedPins = function () {
1745 - 1838 +
1746 $("#listManager").css("display", "none"); 1839 $("#listManager").css("display", "none");
1747 $("#optionsListManagerTab").removeClass("active"); 1840 $("#optionsListManagerTab").removeClass("active");
1748 $("#dropdownMenu221").addClass("aaSystemDisable"); 1841 $("#dropdownMenu221").addClass("aaSystemDisable");
@@ -1786,8 +1879,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1786,8 +1879,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1786 1879
1787 1880
1788 $scope.showSystemPins = function (seletedSystemPinData, isShowSelectedPins) { 1881 $scope.showSystemPins = function (seletedSystemPinData, isShowSelectedPins) {
1789 -  
1790 - console.log("$scope.activePinArray"+ $scope.activePinArray); 1882 +
1791 if (isShowSelectedPins) { 1883 if (isShowSelectedPins) {
1792 1884
1793 angular.forEach($scope.clickedPins, function (value, key) { 1885 angular.forEach($scope.clickedPins, function (value, key) {
@@ -1907,10 +1999,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1907,10 +1999,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1907 } 1999 }
1908 2000
1909 $scope.highlightPinBasedOnSerachItem = function (id) { 2001 $scope.highlightPinBasedOnSerachItem = function (id) {
  2002 +
1910 $scope.isSelectedSystemSelectedAftrChange = false; 2003 $scope.isSelectedSystemSelectedAftrChange = false;
1911 $scope.isSearchOptionClicked = true; 2004 $scope.isSearchOptionClicked = true;
1912 $scope.listMangerID = []; 2005 $scope.listMangerID = [];
1913 $scope.searchItemId = id; 2006 $scope.searchItemId = id;
  2007 +
1914 $scope.searchItemText = $("#" + id).val(); 2008 $scope.searchItemText = $("#" + id).val();
1915 $rootScope.searchSelectedText = $("#" + id).val(); 2009 $rootScope.searchSelectedText = $("#" + id).val();
1916 $('#termList option[selected="selected"]').prop("selected", false); 2010 $('#termList option[selected="selected"]').prop("selected", false);
@@ -1944,7 +2038,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1944,7 +2038,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1944 $('#aaDetailViewCanvas').setLayers({ 2038 $('#aaDetailViewCanvas').setLayers({
1945 fillStyle: radial, 2039 fillStyle: radial,
1946 }).drawLayers(); 2040 }).drawLayers();
1947 - 2041 + console.log(pinDataForTerm[0]._PinId);
  2042 + $scope.clickedPins = [];
  2043 + $scope.clickedPins.push({ 'id': pinDataForTerm[0]._PinId });
1948 $scope.showAnnotation(pinDataForTerm, false, false, true); 2044 $scope.showAnnotation(pinDataForTerm, false, false, true);
1949 // maintaing scroll position on selection of options in list manager. 2045 // maintaing scroll position on selection of options in list manager.
1950 var annotationTopPos = $(".common-drag").css("top").split("p"); 2046 var annotationTopPos = $(".common-drag").css("top").split("p");
@@ -1993,25 +2089,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1993,25 +2089,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1993 } 2089 }
1994 $scope.activePinOnLayerChange = function () { 2090 $scope.activePinOnLayerChange = function () {
1995 2091
1996 - if ($scope.isSelectedSystemSelectedAftrChange == true) {  
1997 - //make all pin heads grey  
1998 - var radial = $('#aaDetailViewCanvas').createGradient({  
1999 - x1: 50, y1: 50,  
2000 - x2: 50, y2: 50,  
2001 - r1: 10, r2: 30,  
2002 - c1: 'rgba(100, 50, 0,0)',  
2003 - c2: 'rgb(216, 216, 216)'  
2004 - });  
2005 - $('#aaDetailViewCanvas').setLayers({  
2006 - fillStyle: radial,  
2007 - }).drawLayers();  
2008 -  
2009 - }  
2010 -  
2011 - if ($("#bodySystemList li.activeAASystemSelect a").attr("id") == "0") {  
2012 - $scope.activePinArray = [];  
2013 - }  
2014 - console.log($scope.activePinArray);  
2015 for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { 2092 for (var i = 0; i <= $scope.activePinArray.length - 1; i++) {
2016 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ 2093 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
2017 x1: 50, y1: 50, 2094 x1: 50, y1: 50,
@@ -2026,12 +2103,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -2026,12 +2103,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2026 }).drawLayers(); 2103 }).drawLayers();
2027 2104
2028 } 2105 }
2029 -  
2030 -  
2031 -  
2032 } 2106 }
2033 -  
2034 -  
2035 angular.element(document).click(function () { 2107 angular.element(document).click(function () {
2036 $("#bodySystemList").css("display","none"); 2108 $("#bodySystemList").css("display","none");
2037 var $ua = navigator.userAgent; 2109 var $ua = navigator.userAgent;
@@ -2040,11 +2112,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -2040,11 +2112,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2040 } 2112 }
2041 }); 2113 });
2042 2114
2043 - //angulaar.element(document).click(function () {  
2044 - // $("#bodySystemList").css("display", "none");  
2045 - //});  
2046 -  
2047 -  
2048 $scope.activePinOnSliderChange = function () { 2115 $scope.activePinOnSliderChange = function () {
2049 2116
2050 if ($scope.activePinArray.length == 1) { 2117 if ($scope.activePinArray.length == 1) {
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
@@ -231,6 +231,8 @@ @@ -231,6 +231,8 @@
231 <script> 231 <script>
232 var isSideBarBtnClicked = true; 232 var isSideBarBtnClicked = true;
233 $(document).ready(function () { 233 $(document).ready(function () {
  234 +
  235 + $("#bodySystemList li:nth-child(1)").addClass("activeAASystemSelect");
234 $('[data-toggle="tooltip"]').tooltip(); 236 $('[data-toggle="tooltip"]').tooltip();
235 $("#sideBarToggle").click(function () { 237 $("#sideBarToggle").click(function () {
236 if (isSideBarBtnClicked == true) { 238 if (isSideBarBtnClicked == true) {