Commit c819cd19eab39fd2fa09690dc24ad5bad9e09607
1 parent
f7ecf31e
Pin Issue Resolved
Showing
2 changed files
with
236 additions
and
167 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -335,7 +335,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
335 | 335 | openedImage.onerror = loadFailure; |
336 | 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 | 349 | if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) { |
350 | 350 | $("#listManager").css("display", "none"); |
351 | 351 | $("#optionsListManagerTab").removeClass("active"); |
352 | + // scope.isBodySystemSelected = false; | |
352 | 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 | 373 | if (ui.value == 100) { |
373 | 374 | relativeWidth = scope.ViewImageWidth; |
... | ... | @@ -438,7 +439,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
438 | 439 | case "hidePinBtn": |
439 | 440 | break; |
440 | 441 | case "allPinBtn": |
441 | - | |
442 | 442 | if ($("#bodySystemList li.activeAASystemSelect a").attr("id") != undefined) { |
443 | 443 | scope.showSelectedSystemPins($("#bodySystemList li.activeAASystemSelect a").attr("id")) |
444 | 444 | setTimeout(function () { |
... | ... | @@ -516,13 +516,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
516 | 516 | $rootScope.aaPinDataArray = []; |
517 | 517 | $rootScope.isShowSelectedSystemPinsClicked = false; |
518 | 518 | $scope.showAllPins = function () { |
519 | - | |
520 | 519 | $scope.allPinDataArray = []; |
521 | 520 | var promise = ModuleService.getPinDataForImage($rootScope.imageName) |
522 | - | |
523 | 521 | .then( |
524 | 522 | function (result) { |
525 | - | |
526 | 523 | //load navigator image |
527 | 524 | if (result.data.Root._NavigatorImage != undefined) { |
528 | 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 | 530 | document.getElementById('navigatorDiv').style.visibility = 'hidden'; |
534 | 531 | |
535 | 532 | } |
536 | - | |
537 | 533 | //draw pins |
538 | 534 | $scope.aaPinData = result.data.Root.Item; |
539 | 535 | if ($scope.aaPinData != null && $scope.aaPinData.length > 0) { |
... | ... | @@ -543,7 +539,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
543 | 539 | $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY) |
544 | 540 | }) |
545 | 541 | |
546 | - | |
547 | 542 | if ($rootScope.isShowSelectedSystemPinsClicked == false) { |
548 | 543 | $rootScope.isShowSelectedSystemPinsClicked = true; |
549 | 544 | //load search/vocab data |
... | ... | @@ -553,8 +548,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
553 | 548 | $rootScope.isLoading = false; |
554 | 549 | $('#spinner').css('visibility', 'hidden'); |
555 | 550 | } |
556 | - | |
557 | - | |
558 | 551 | } |
559 | 552 | }, |
560 | 553 | function (error) { |
... | ... | @@ -775,114 +768,206 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
775 | 768 | $scope.FilterByImage(1, query); |
776 | 769 | |
777 | 770 | } |
778 | - $scope.isSelectedSystemSelected = false; | |
771 | + $scope.isBodySystemSelected = false; | |
772 | + $scope.SelectedSystemTitle = "Current Structure"; | |
779 | 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 | 888 | $scope.SelectedSystemID = event; |
783 | 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 | 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 | 966 | $scope.listMangerID = []; |
883 | 967 | $scope.activePinArray = []; |
884 | 968 | $scope.isSearchOptionClicked = false; |
885 | 969 | $scope.showAnnotation = function (selectedPinData, isCtrlPressed, isPinClicked, isItemSearched) { |
970 | + | |
886 | 971 | $scope.selectedPin = []; |
887 | 972 | var isSameTermWithMultiPin = false; |
888 | 973 | var firstPinId = selectedPinData[0]._PinId; |
... | ... | @@ -896,14 +981,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
896 | 981 | .where("_TermId == " + pinTermNumber) |
897 | 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 | 991 | $scope.isSelectedSystemSelectedAftrChange = true; |
908 | 992 | } |
909 | 993 | for (var i = 0; i <= pinDataWithFirstTermNumber.length - 1; i++) { |
... | ... | @@ -952,10 +1036,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
952 | 1036 | if (pinDataWithFirstTermNumber.length > 1) { |
953 | 1037 | isSameTermWithMultiPin = true; |
954 | 1038 | } |
955 | - | |
956 | 1039 | angular.forEach(pinDataWithFirstTermNumber, function (value, key) { |
957 | 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 | 1045 | var headX = (parseInt(value._HeadX)); |
960 | 1046 | var headY = (parseInt(value._HeadY)); |
961 | 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 | 1110 | }; |
1025 | 1111 | |
1026 | 1112 | $scope.hideSpeechBubble = function () { |
1027 | - | |
1028 | - | |
1029 | 1113 | //clear speech bubbles |
1030 | 1114 | var speechBubbles = $("div[id*='speechBubble']"); |
1031 | 1115 | if (speechBubbles != null || speechBubbles != undefined && speechBubbles.length > 0) { |
... | ... | @@ -1230,7 +1314,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1230 | 1314 | fillStyle: radial, |
1231 | 1315 | }).drawLayers(); |
1232 | 1316 | }); |
1233 | - | |
1317 | + | |
1234 | 1318 | //make the head green |
1235 | 1319 | var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ |
1236 | 1320 | x1: 50, y1: 50, |
... | ... | @@ -1242,12 +1326,20 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1242 | 1326 | var pinHeadName = 'PinArc_' + PinId; |
1243 | 1327 | var pin = $('#aaDetailViewCanvas').getLayer(pinHeadName); |
1244 | 1328 | // pin.fillStyle = radialAfterClick; |
1245 | - | |
1329 | + | |
1246 | 1330 | $('#aaDetailViewCanvas').setLayer(pinHeadName, { |
1247 | 1331 | fillStyle: radialAfterClick, |
1248 | 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 | 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 | 1384 | |
1293 | 1385 | |
1294 | 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 | 1394 | var multipliedByValue = 5; |
1303 | 1395 | var $ua = navigator.userAgent; |
1304 | 1396 | if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { |
... | ... | @@ -1337,7 +1429,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1337 | 1429 | radius: 10, |
1338 | 1430 | |
1339 | 1431 | click: function (clickedPin) { |
1340 | - | |
1432 | + | |
1341 | 1433 | if (clickedPin.event.ctrlKey == false) { |
1342 | 1434 | $scope.clickedPins = []; |
1343 | 1435 | $scope.listMangerID = []; |
... | ... | @@ -1416,6 +1508,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1416 | 1508 | } |
1417 | 1509 | |
1418 | 1510 | }).drawLayers(); |
1511 | + | |
1419 | 1512 | } |
1420 | 1513 | |
1421 | 1514 | |
... | ... | @@ -1705,7 +1798,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1705 | 1798 | } |
1706 | 1799 | |
1707 | 1800 | $scope.showAllPinsAfterHide = function (event) { |
1708 | - | |
1801 | + | |
1709 | 1802 | if ($("#dropdownMenu221").hasClass("aaSystemDisable")) { |
1710 | 1803 | $("#dropdownMenu221").removeClass("aaSystemDisable"); |
1711 | 1804 | } |
... | ... | @@ -1742,7 +1835,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1742 | 1835 | |
1743 | 1836 | |
1744 | 1837 | $scope.showSelectedPins = function () { |
1745 | - | |
1838 | + | |
1746 | 1839 | $("#listManager").css("display", "none"); |
1747 | 1840 | $("#optionsListManagerTab").removeClass("active"); |
1748 | 1841 | $("#dropdownMenu221").addClass("aaSystemDisable"); |
... | ... | @@ -1786,8 +1879,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1786 | 1879 | |
1787 | 1880 | |
1788 | 1881 | $scope.showSystemPins = function (seletedSystemPinData, isShowSelectedPins) { |
1789 | - | |
1790 | - console.log("$scope.activePinArray"+ $scope.activePinArray); | |
1882 | + | |
1791 | 1883 | if (isShowSelectedPins) { |
1792 | 1884 | |
1793 | 1885 | angular.forEach($scope.clickedPins, function (value, key) { |
... | ... | @@ -1907,10 +1999,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1907 | 1999 | } |
1908 | 2000 | |
1909 | 2001 | $scope.highlightPinBasedOnSerachItem = function (id) { |
2002 | + | |
1910 | 2003 | $scope.isSelectedSystemSelectedAftrChange = false; |
1911 | 2004 | $scope.isSearchOptionClicked = true; |
1912 | 2005 | $scope.listMangerID = []; |
1913 | 2006 | $scope.searchItemId = id; |
2007 | + | |
1914 | 2008 | $scope.searchItemText = $("#" + id).val(); |
1915 | 2009 | $rootScope.searchSelectedText = $("#" + id).val(); |
1916 | 2010 | $('#termList option[selected="selected"]').prop("selected", false); |
... | ... | @@ -1944,7 +2038,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1944 | 2038 | $('#aaDetailViewCanvas').setLayers({ |
1945 | 2039 | fillStyle: radial, |
1946 | 2040 | }).drawLayers(); |
1947 | - | |
2041 | + console.log(pinDataForTerm[0]._PinId); | |
2042 | + $scope.clickedPins = []; | |
2043 | + $scope.clickedPins.push({ 'id': pinDataForTerm[0]._PinId }); | |
1948 | 2044 | $scope.showAnnotation(pinDataForTerm, false, false, true); |
1949 | 2045 | // maintaing scroll position on selection of options in list manager. |
1950 | 2046 | var annotationTopPos = $(".common-drag").css("top").split("p"); |
... | ... | @@ -1993,25 +2089,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1993 | 2089 | } |
1994 | 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 | 2092 | for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { |
2016 | 2093 | var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ |
2017 | 2094 | x1: 50, y1: 50, |
... | ... | @@ -2026,12 +2103,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
2026 | 2103 | }).drawLayers(); |
2027 | 2104 | |
2028 | 2105 | } |
2029 | - | |
2030 | - | |
2031 | - | |
2032 | 2106 | } |
2033 | - | |
2034 | - | |
2035 | 2107 | angular.element(document).click(function () { |
2036 | 2108 | $("#bodySystemList").css("display","none"); |
2037 | 2109 | var $ua = navigator.userAgent; |
... | ... | @@ -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 | 2115 | $scope.activePinOnSliderChange = function () { |
2049 | 2116 | |
2050 | 2117 | if ($scope.activePinArray.length == 1) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... | ... | @@ -231,6 +231,8 @@ |
231 | 231 | <script> |
232 | 232 | var isSideBarBtnClicked = true; |
233 | 233 | $(document).ready(function () { |
234 | + | |
235 | + $("#bodySystemList li:nth-child(1)").addClass("activeAASystemSelect"); | |
234 | 236 | $('[data-toggle="tooltip"]').tooltip(); |
235 | 237 | $("#sideBarToggle").click(function () { |
236 | 238 | if (isSideBarBtnClicked == true) { | ... | ... |