Commit 8059aa5ecc13980ecfdc212553db24ca57979a9a
1 parent
5bc735ae
implemented shoeSelected pins
Showing
2 changed files
with
88 additions
and
28 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -25,7 +25,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -25,7 +25,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
25 | $scope.AllImageType = []; | 25 | $scope.AllImageType = []; |
26 | $rootScope.speechBubbleDimaensions = []; | 26 | $rootScope.speechBubbleDimaensions = []; |
27 | $scope.runningSearchWorkers = []; | 27 | $scope.runningSearchWorkers = []; |
28 | - | 28 | + $scope.clickedPins = []; |
29 | $scope.query = { | 29 | $scope.query = { |
30 | selectedbodyregion: '', | 30 | selectedbodyregion: '', |
31 | selectedbodysystem: '', | 31 | selectedbodysystem: '', |
@@ -442,7 +442,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -442,7 +442,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
442 | $scope.selectedSystemName = null; | 442 | $scope.selectedSystemName = null; |
443 | if ($scope.isHidePinBtnClicked) { | 443 | if ($scope.isHidePinBtnClicked) { |
444 | 444 | ||
445 | - $scope.showAllPinsAfterHide($scope.aaPinData); | 445 | + $scope.showAllPinsAfterHide(); |
446 | } | 446 | } |
447 | else { | 447 | else { |
448 | $scope.showAllPins(); | 448 | $scope.showAllPins(); |
@@ -468,7 +468,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -468,7 +468,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
468 | .where("_BodySystemName == " + $scope.selectedSystemName) | 468 | .where("_BodySystemName == " + $scope.selectedSystemName) |
469 | .select(); | 469 | .select(); |
470 | if ($scope.isHidePinBtnClicked) { | 470 | if ($scope.isHidePinBtnClicked) { |
471 | - $scope.showAllPinsAfterHide($scope.selectedSystemPinData); | 471 | + $scope.showAllPinsAfterHide(); |
472 | 472 | ||
473 | } | 473 | } |
474 | else | 474 | else |
@@ -897,6 +897,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -897,6 +897,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
897 | 897 | ||
898 | click: function (clickedPin) { | 898 | click: function (clickedPin) { |
899 | 899 | ||
900 | + | ||
901 | + | ||
900 | //change the head color to green | 902 | //change the head color to green |
901 | var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ | 903 | var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ |
902 | x1: 50, y1: 50, | 904 | x1: 50, y1: 50, |
@@ -912,6 +914,27 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -912,6 +914,27 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
912 | // alert('pinId: ' + pinID); | 914 | // alert('pinId: ' + pinID); |
913 | //showAnnotation(); | 915 | //showAnnotation(); |
914 | var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); | 916 | var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); |
917 | + | ||
918 | + | ||
919 | + var pinData = new jinqJs() | ||
920 | + .from($scope.aaPinData) | ||
921 | + .where("_PinId == " + pinID) | ||
922 | + .select(); | ||
923 | + | ||
924 | + var pinTermNumber = pinData[0]._TermId; | ||
925 | + | ||
926 | + var pinWithSameTerm = new jinqJs() | ||
927 | + .from($scope.aaPinData) | ||
928 | + .where("_TermId == " + pinTermNumber) | ||
929 | + .select(); | ||
930 | + | ||
931 | + if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) { | ||
932 | + for (var i = 0; i < pinWithSameTerm.length; i++) { | ||
933 | + $scope.clickedPins.push({ 'id': pinWithSameTerm[i]._PinId }) | ||
934 | + } | ||
935 | + } | ||
936 | + // $scope.clickedPins.push({ 'id': pinID }); | ||
937 | + | ||
915 | var selectedPinData = new jinqJs() | 938 | var selectedPinData = new jinqJs() |
916 | .from($scope.aaPinData) | 939 | .from($scope.aaPinData) |
917 | .where("_PinId == " + pinID) | 940 | .where("_PinId == " + pinID) |
@@ -1065,46 +1088,74 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -1065,46 +1088,74 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
1065 | 1088 | ||
1066 | } | 1089 | } |
1067 | 1090 | ||
1068 | - $scope.showAllPinsAfterHide = function (selectedSystemPinData) { | 1091 | + $scope.showAllPinsAfterHide = function (event) { |
1069 | 1092 | ||
1070 | $scope.isHidePinBtnClicked = false; | 1093 | $scope.isHidePinBtnClicked = false; |
1071 | if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) { | 1094 | if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) { |
1072 | - $scope.showSystemPins($scope.selectedSystemPinData); | 1095 | + $scope.showSystemPins($scope.selectedSystemPinData, false); |
1073 | } else { | 1096 | } else { |
1074 | - $scope.showSystemPins($scope.aaPinData); | 1097 | + $scope.showSystemPins($scope.aaPinData, false); |
1075 | 1098 | ||
1076 | - //angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) { | 1099 | + } |
1100 | + $scope.showSpeechBubble(); | ||
1101 | + }; | ||
1077 | 1102 | ||
1078 | - // var pinName = 'Pin_' + aaPinDataValue._PinId; | ||
1079 | - // var pinArcName = 'PinArc_' + aaPinDataValue._PinId; | ||
1080 | 1103 | ||
1081 | - // $('#aaDetailViewCanvas').setLayer(pinName, { | ||
1082 | - // visible: true // set to true instead to show the layer again | ||
1083 | - // }).drawLayers(); | 1104 | + $scope.showSelectedPins = function () { |
1105 | + | ||
1106 | + $scope.isHidePinBtnClicked = false; | ||
1107 | + if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) { | ||
1108 | + $scope.showSystemPins($scope.selectedSystemPinData,true); | ||
1109 | + } else { | ||
1110 | + $scope.showSystemPins($scope.aaPinData,true); | ||
1084 | 1111 | ||
1085 | - // $('#aaDetailViewCanvas').setLayer(pinArcName, { | ||
1086 | - // visible: true // set to true instead to show the layer again | ||
1087 | - // }).drawLayers(); | ||
1088 | - //}) | ||
1089 | } | 1112 | } |
1090 | $scope.showSpeechBubble(); | 1113 | $scope.showSpeechBubble(); |
1091 | }; | 1114 | }; |
1092 | 1115 | ||
1093 | - $scope.showSystemPins = function (seletedSystemPinData) { | ||
1094 | 1116 | ||
1095 | - angular.forEach(seletedSystemPinData, function (aaPinDataValue, aaPinDataKey) { | 1117 | + $scope.showSystemPins = function (seletedSystemPinData, isShowSelectedPins) { |
1096 | 1118 | ||
1097 | - var pinName = 'Pin_' + aaPinDataValue._PinId; | ||
1098 | - var pinArcName = 'PinArc_' + aaPinDataValue._PinId; | 1119 | + if (isShowSelectedPins) { |
1099 | 1120 | ||
1100 | - $('#aaDetailViewCanvas').setLayer(pinName, { | ||
1101 | - visible: true // set to true instead to show the layer again | ||
1102 | - }).drawLayers(); | 1121 | + angular.forEach($scope.clickedPins, function (value, key) { |
1122 | + | ||
1103 | 1123 | ||
1104 | - $('#aaDetailViewCanvas').setLayer(pinArcName, { | ||
1105 | - visible: true // set to true instead to show the layer again | ||
1106 | - }).drawLayers(); | ||
1107 | - }) | 1124 | + angular.forEach(seletedSystemPinData, function (aaPinDataValue, aaPinDataKey) { |
1125 | + | ||
1126 | + if (aaPinDataValue._PinId != value.id) { | ||
1127 | + var pinName = 'Pin_' + aaPinDataValue._PinId; | ||
1128 | + var pinArcName = 'PinArc_' + aaPinDataValue._PinId; | ||
1129 | + | ||
1130 | + $('#aaDetailViewCanvas').setLayer(pinName, { | ||
1131 | + visible: false // set to true instead to show the layer again | ||
1132 | + }).drawLayers(); | ||
1133 | + | ||
1134 | + $('#aaDetailViewCanvas').setLayer(pinArcName, { | ||
1135 | + visible: false // set to true instead to show the layer again | ||
1136 | + }).drawLayers(); | ||
1137 | + } | ||
1138 | + }) | ||
1139 | + | ||
1140 | + }) | ||
1141 | + $scope.clickedPins = []; | ||
1142 | + } | ||
1143 | + | ||
1144 | + else { | ||
1145 | + angular.forEach(seletedSystemPinData, function (aaPinDataValue, aaPinDataKey) { | ||
1146 | + | ||
1147 | + var pinName = 'Pin_' + aaPinDataValue._PinId; | ||
1148 | + var pinArcName = 'PinArc_' + aaPinDataValue._PinId; | ||
1149 | + | ||
1150 | + $('#aaDetailViewCanvas').setLayer(pinName, { | ||
1151 | + visible: true // set to true instead to show the layer again | ||
1152 | + }).drawLayers(); | ||
1153 | + | ||
1154 | + $('#aaDetailViewCanvas').setLayer(pinArcName, { | ||
1155 | + visible: true // set to true instead to show the layer again | ||
1156 | + }).drawLayers(); | ||
1157 | + }) | ||
1158 | + } | ||
1108 | } | 1159 | } |
1109 | 1160 | ||
1110 | 1161 | ||
@@ -1258,3 +1309,12 @@ function onSearchItemSelection(event) { | @@ -1258,3 +1309,12 @@ function onSearchItemSelection(event) { | ||
1258 | scope.highlightPinBasedOnSerachItem(event); | 1309 | scope.highlightPinBasedOnSerachItem(event); |
1259 | }); | 1310 | }); |
1260 | } | 1311 | } |
1312 | + | ||
1313 | +function showSelectedPins(event) { | ||
1314 | + alert('showSelectedPins') | ||
1315 | + console.log('showSelectedPins is called') | ||
1316 | + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | ||
1317 | + scope.$apply(function () { | ||
1318 | + scope.showSelectedPins(event); | ||
1319 | + }); | ||
1320 | +} |
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | <div class="toggle-icon toggleBar toggleHeadingButton" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"></div> | 30 | <div class="toggle-icon toggleBar toggleHeadingButton" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"></div> |
31 | <div class=""> | 31 | <div class=""> |
32 | <div class="col-sm-6" title="Hide Pins"><button onclick="hidePins(event)" class="btn btn-black btn-sm" > <img src="../../../content/images/aa/LeftMenu/hide-pin.png" alt="" title=""></button> </div> | 32 | <div class="col-sm-6" title="Hide Pins"><button onclick="hidePins(event)" class="btn btn-black btn-sm" > <img src="../../../content/images/aa/LeftMenu/hide-pin.png" alt="" title=""></button> </div> |
33 | - <div class="col-sm-6" title="Show Selected Pins"><button class="btn btn-black btn-sm pull-right"><img src="../../../content/images/aa/LeftMenu/draw-pin.png" alt="" title=""></button></div> | 33 | + <div class="col-sm-6" title="Show Selected Pins"><button class="btn btn-black btn-sm pull-right" onclick="showSelectedPins(event)" ><img src="../../../content/images/aa/LeftMenu/draw-pin.png" alt="" title=""></button></div> |
34 | <div class="col-sm-6" title="Show All Pins in System(s)"><button class="btn btn-primary btn-sm marginTop5" onclick="showAllPins(event)"><img src="../../../content/images/aa/LeftMenu/all-pin.png" alt="" title=""></button></div> | 34 | <div class="col-sm-6" title="Show All Pins in System(s)"><button class="btn btn-primary btn-sm marginTop5" onclick="showAllPins(event)"><img src="../../../content/images/aa/LeftMenu/all-pin.png" alt="" title=""></button></div> |
35 | <div class="col-sm-6" title="Select System"> | 35 | <div class="col-sm-6" title="Select System"> |
36 | <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu221" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><img src="../../../content/images/aa/LeftMenu/icon-highlight.png" alt="" title=""></button> | 36 | <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu221" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><img src="../../../content/images/aa/LeftMenu/icon-highlight.png" alt="" title=""></button> |