Commit 88b7745664b039f80f226ef2f3808b087c6aab52

Authored by unknown
1 parent 4893f494

Commit Changes

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -350,9 +350,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
350 350 $("#listManager").css("display", "none");
351 351 $("#optionsListManagerTab").removeClass("active");
352 352 //make the head green
353   -
  353 +
354 354 setTimeout(function () {
355   -
  355 +
356 356 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
357 357 x1: 50, y1: 50,
358 358 x2: 50, y2: 50,
... ... @@ -405,6 +405,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
405 405 }
406 406  
407 407 if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
  408 +
408 409 $("#modItemImage").css("width", relativeWidth + "px");
409 410 $("#modItemImage").css("height", relativeHeight + "px");
410 411 $("#aaDetailViewCanvas").css("width", relativeWidth + "px");
... ... @@ -442,14 +443,19 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
442 443 case "hidePinBtn":
443 444 break;
444 445 case "allPinBtn":
445   - scope.showAllPins();
  446 +
  447 + scope.showAllPins();
  448 +
  449 +
446 450 break;
447 451 case "selectedPin":
448   - scope.showAllPins();
449   - setTimeout(function () {
450   - console.log(scope.allPinDataArray);
451   - scope.activePinOnSliderChange();
452   - }, 1000);
  452 + scope.showAllPins();
  453 + setTimeout(function () {
  454 + console.log(scope.allPinDataArray);
  455 + scope.activePinOnSliderChange();
  456 + }, 1000);
  457 +
  458 +
453 459 break;
454 460 }
455 461 }
... ... @@ -512,6 +518,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
512 518 $rootScope.aaPinDataArray = [];
513 519 $rootScope.isShowSelectedSystemPinsClicked = false;
514 520 $scope.showAllPins = function () {
  521 +
515 522 $scope.allPinDataArray = [];
516 523 var promise = ModuleService.getPinDataForImage($rootScope.imageName)
517 524  
... ... @@ -771,8 +778,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
771 778 $scope.FilterByImage(1, query);
772 779  
773 780 }
774   -
  781 + $scope.isSelectedSystemSelected = false;
775 782 $scope.showSelectedSystemPins = function (event) {
  783 +
  784 + $scope.clickedPins = [];
  785 + $scope.isSelectedSystemSelected = true;
776 786 $rootScope.isShowSelectedSystemPinsClicked = true;
777 787 var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a");
778 788 var bodySystemListlength = bodySystemListObj.length;
... ... @@ -805,7 +815,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
805 815 var promise = ModuleService.getTermTextDataForPin($scope.moduleName)
806 816 .then(
807 817 function (response) {
808   -
809 818 $scope.TermInfo = response.data.Terms.Term;
810 819  
811 820 //on gettng all required data, draw pins
... ... @@ -835,7 +844,22 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
835 844  
836 845 $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
837 846  
838   - })
  847 + });
  848 +
  849 + //make all pin heads grey
  850 + var radial = $('#aaDetailViewCanvas').createGradient({
  851 + x1: 50, y1: 50,
  852 + x2: 50, y2: 50,
  853 + r1: 10, r2: 30,
  854 + c1: 'rgba(100, 50, 0,0)',
  855 + c2: 'rgb(216, 216, 216)'
  856 + });
  857 +
  858 +
  859 + $('#aaDetailViewCanvas').setLayers({
  860 + fillStyle: radial,
  861 + }).drawLayers();
  862 +
839 863 //show annotation on first pin of the sysyem
840 864 $scope.showAnnotation($scope.selectedSystemPinData, false, false, false);
841 865 }
... ... @@ -851,9 +875,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
851 875 }
852 876 }
853 877 $scope.listMangerID = [];
  878 + $scope.activePinArray = [];
  879 + $scope.isSearchOptionClicked = false;
854 880 $scope.showAnnotation = function (selectedPinData, isCtrlPressed, isPinClicked, isItemSearched) {
855   -
856   - $scope.clickedPins = [];
857 881 $scope.selectedPin = [];
858 882 var isSameTermWithMultiPin = false;
859 883 var firstPinId = selectedPinData[0]._PinId;
... ... @@ -866,9 +890,17 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
866 890 .from($scope.aaPinData)
867 891 .where("_TermId == " + pinTermNumber)
868 892 .select();
869   -
870   - // $scope.listMangerID = [];
871   - $scope.activePinArray = [];
  893 +
  894 + if ($scope.isSearchOptionClicked == true) {
  895 + $scope.activePinArray = [];
  896 + $scope.clickedPins = [];
  897 + $scope.isSearchOptionClicked = false;
  898 + }
  899 + if ($scope.isSelectedSystemSelected == true) {
  900 + $scope.activePinArray = [];
  901 + $scope.isSelectedSystemSelected = false;
  902 + $scope.isSelectedSystemSelectedAftrChange = true;
  903 + }
872 904 for (var i = 0; i <= pinDataWithFirstTermNumber.length - 1; i++) {
873 905 $scope.listMangerID.push('PinArc_' + pinDataWithFirstTermNumber[i]._PinId);
874 906 $scope.activePinArray.push('PinArc_' + pinDataWithFirstTermNumber[i]._PinId);
... ... @@ -886,7 +918,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
886 918 var existingSpeechBubble = $("div[id*='speechBubble']");
887 919 for (var i = 0; i < existingSpeechBubble.length; i++) {
888 920 existingSpeechBubble[i].parentNode.removeChild(existingSpeechBubble[i]);
889   -
  921 +
890 922 //make all pin heads grey
891 923 var radial = $('#aaDetailViewCanvas').createGradient({
892 924 x1: 50, y1: 50,
... ... @@ -1251,14 +1283,17 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1251 1283 else {
1252 1284 $("#bord_annotation").css({ 'display': 'block', 'width': d + 'px', 'top': e + 'px', 'left': f + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' });
1253 1285 }
1254   -
1255   -
1256   -
  1286 +
1257 1287 }
1258 1288  
1259 1289  
1260 1290 $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) {
1261   - $scope.clickedPins = [];
  1291 +
  1292 + if ($scope.isSearchOptionClicked == true) {
  1293 + $scope.clickedPins = [];
  1294 + $scope.isSearchOptionClicked = false;
  1295 + }
  1296 +
1262 1297  
1263 1298 var multipliedByValue = 5;
1264 1299 var $ua = navigator.userAgent;
... ... @@ -1303,6 +1338,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1303 1338 $scope.clickedPins = [];
1304 1339 $scope.listMangerID = [];
1305 1340 }
  1341 + $scope.isSelectedSystemSelectedAftrChange = false;
1306 1342 var pinID = (clickedPin.name).substring(7, (clickedPin.name).length);
1307 1343 var pinData = new jinqJs()
1308 1344 .from($scope.aaPinData)
... ... @@ -1317,16 +1353,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1317 1353 .from($scope.aaPinData)
1318 1354 .where("_TermId == " + pinTermNumber)
1319 1355 .select();
1320   -
1321   -
1322 1356 if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) {
1323 1357  
1324 1358 for (var i = 0; i < pinWithSameTerm.length; i++) {
1325   -
1326 1359 $scope.clickedPins.push({ 'id': pinWithSameTerm[i]._PinId })
1327 1360 }
1328   -
1329 1361 }
  1362 +
  1363 +
1330 1364 $scope.isSelectedPinBtnClickedAftrSliderCange = false;
1331 1365 var selectedPinData = new jinqJs()
1332 1366 .from($scope.aaPinData)
... ... @@ -1696,6 +1730,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1696 1730  
1697 1731  
1698 1732 $scope.showSelectedPins = function () {
  1733 +
1699 1734 $("#listManager").css("display", "none");
1700 1735 $("#optionsListManagerTab").removeClass("active");
1701 1736 $("#dropdownMenu221").addClass("aaSystemDisable");
... ... @@ -1739,7 +1774,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1739 1774  
1740 1775  
1741 1776 $scope.showSystemPins = function (seletedSystemPinData, isShowSelectedPins) {
1742   -
  1777 +
1743 1778 if (isShowSelectedPins) {
1744 1779  
1745 1780 angular.forEach($scope.clickedPins, function (value, key) {
... ... @@ -1749,7 +1784,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1749 1784 .where('_PinId != ' + value.id)
1750 1785 .select();
1751 1786 });
1752   - console.log($scope.clickedPins);
  1787 +
1753 1788 angular.forEach($scope.clickedPins, function (value1, key1) {
1754 1789  
1755 1790 // if (aaPinDataValue._PinId != value.id) {
... ... @@ -1857,8 +1892,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1857 1892 }, 1000);
1858 1893  
1859 1894 }
1860   -
  1895 +
1861 1896 $scope.highlightPinBasedOnSerachItem = function (id) {
  1897 + $scope.isSelectedSystemSelectedAftrChange = false;
  1898 + $scope.isSearchOptionClicked = true;
  1899 + $scope.listMangerID = [];
1862 1900 $scope.searchItemId = id;
1863 1901 $scope.searchItemText = $("#" + id).val();
1864 1902 $rootScope.searchSelectedText = $("#" + id).val();
... ... @@ -1873,24 +1911,32 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1873 1911 //selectedTermName.placeholder = $("#" + id).text();
1874 1912 selectedTermName.value = $("#" + id).val();
1875 1913 selectedTermName.placeholder = "search... ";
1876   -
  1914 +
1877 1915 //get data from pindata for this trem
1878   -
  1916 +
1879 1917 var pinDataForTerm = new jinqJs()
1880 1918 .from($scope.aaPinData)
1881 1919 .where("_TermId == " + $scope.searchItemId)
1882 1920 .select();
1883   -
  1921 + //make all pin heads grey
  1922 + var radial = $('#aaDetailViewCanvas').createGradient({
  1923 + x1: 50, y1: 50,
  1924 + x2: 50, y2: 50,
  1925 + r1: 10, r2: 30,
  1926 + c1: 'rgba(100, 50, 0,0)',
  1927 + c2: 'rgb(216, 216, 216)'
  1928 + });
  1929 +
  1930 +
  1931 + $('#aaDetailViewCanvas').setLayers({
  1932 + fillStyle: radial,
  1933 + }).drawLayers();
  1934 +
1884 1935 $scope.showAnnotation(pinDataForTerm, false, false, true);
1885 1936 // maintaing scroll position on selection of options in list manager.
1886 1937 var annotationTopPos = $(".common-drag").css("top").split("p");
1887 1938 $("#canvasDiv").scrollTop(annotationTopPos[0]);
1888   -
1889 1939 $scope.IsSearchVisible = false;
1890   -
1891   -
1892   -
1893   -
1894 1940 }
1895 1941  
1896 1942 $rootScope.isShowHideButtonClicked = true;
... ... @@ -1933,6 +1979,23 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1933 1979 }
1934 1980 }
1935 1981 $scope.activePinOnLayerChange = function () {
  1982 +
  1983 + if ($scope.isSelectedSystemSelectedAftrChange == true) {
  1984 + //make all pin heads grey
  1985 + var radial = $('#aaDetailViewCanvas').createGradient({
  1986 + x1: 50, y1: 50,
  1987 + x2: 50, y2: 50,
  1988 + r1: 10, r2: 30,
  1989 + c1: 'rgba(100, 50, 0,0)',
  1990 + c2: 'rgb(216, 216, 216)'
  1991 + });
  1992 + $('#aaDetailViewCanvas').setLayers({
  1993 + fillStyle: radial,
  1994 + }).drawLayers();
  1995 +
  1996 + }
  1997 +
  1998 + console.log($scope.activePinArray);
1936 1999 for (var i = 0; i <= $scope.activePinArray.length - 1; i++) {
1937 2000 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
1938 2001 x1: 50, y1: 50,
... ... @@ -1947,6 +2010,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1947 2010 }).drawLayers();
1948 2011  
1949 2012 }
  2013 +
  2014 +
  2015 +
1950 2016 }
1951 2017  
1952 2018  
... ... @@ -1964,6 +2030,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1964 2030  
1965 2031  
1966 2032 $scope.activePinOnSliderChange = function () {
  2033 +
1967 2034 if ($scope.activePinArray.length == 1) {
1968 2035 for (var i = 0; i <= $scope.allPinDataArray.length - 1; i++) {
1969 2036 var activeArc = $scope.activePinArray[0].split("_");
... ...