Commit 5b3772c32b15cf0c1aca6640de4cdc98a257b52f

Authored by unknown
1 parent 88b77456

Pin Issue on zoom in and zoom out

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -405,15 +405,11 @@ 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   -
409 408 $("#modItemImage").css("width", relativeWidth + "px");
410 409 $("#modItemImage").css("height", relativeHeight + "px");
411 410 $("#aaDetailViewCanvas").css("width", relativeWidth + "px");
412 411 $("#modItemImage").css("height", relativeHeight + "px");
413   -
414 412 $("#modItemImage").attr('src', '');
415   -
416   -
417 413 $("#aaDetailViewCanvas").remove();
418 414 //0.5 create canvas on the top of image so that I can draw a line over the canvas.
419 415 var canvas = document.createElement('canvas');
... ... @@ -424,7 +420,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
424 420 canvas.style.left = '0px';
425 421 canvas.style.top = '0px';
426 422 canvas.style.position = "absolute";
427   -
428 423 $("#canvasDiv").append(canvas);
429 424 scope.context = canvas.getContext("2d")
430 425 $("#modItemImage").attr('src', scope.OpenItemImagePath);
... ... @@ -439,14 +434,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
439 434 });
440 435 scope.isSelectedPinBtnClickedAftrSliderCange = true;
441 436 switch (btnID) {
442   -
443 437 case "hidePinBtn":
444 438 break;
445 439 case "allPinBtn":
446   -
  440 + if ($("#bodySystemList li.activeAASystemSelect a").attr("id") != undefined) {
  441 + scope.showSelectedSystemPins($("#bodySystemList li.activeAASystemSelect a").attr("id"))
  442 + }
  443 + else
  444 + {
447 445 scope.showAllPins();
448   -
449   -
  446 + }
450 447 break;
451 448 case "selectedPin":
452 449 scope.showAllPins();
... ... @@ -454,12 +451,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
454 451 console.log(scope.allPinDataArray);
455 452 scope.activePinOnSliderChange();
456 453 }, 1000);
457   -
458   -
459 454 break;
460 455 }
461 456 }
462   -
463 457 });
464 458 }
465 459 $scope.highlightBodySystemList = function () {
... ... @@ -471,7 +465,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
471 465 for (var j = 0; j < $rootScope.bodySystemNames.length; j++) {
472 466 if ((bodySystemListObj[i].innerHTML) == ($rootScope.bodySystemNames[j])) {
473 467 $("#" + i).parent().removeClass("disabledSelectedSystem");
474   -
475 468 }
476 469 }
477 470  
... ... @@ -518,7 +511,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
518 511 $rootScope.aaPinDataArray = [];
519 512 $rootScope.isShowSelectedSystemPinsClicked = false;
520 513 $scope.showAllPins = function () {
521   -
522 514 $scope.allPinDataArray = [];
523 515 var promise = ModuleService.getPinDataForImage($rootScope.imageName)
524 516  
... ... @@ -780,7 +772,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
780 772 }
781 773 $scope.isSelectedSystemSelected = false;
782 774 $scope.showSelectedSystemPins = function (event) {
783   -
  775 + if (typeof event == "string") {
  776 + $scope.SelectedSystemID = event;
  777 + $scope.SelectedSystemTitle = $("#bodySystemList li.activeAASystemSelect a").attr("title");
  778 + $scope.typeOfEvent = typeof event;
  779 + }
  780 + else {
  781 + $scope.typeOfEvent = typeof event;
  782 + $scope.SelectedSystemID = event.currentTarget.id;
  783 + $scope.SelectedSystemTitle = event.currentTarget.title;
  784 + }
784 785 $scope.clickedPins = [];
785 786 $scope.isSelectedSystemSelected = true;
786 787 $rootScope.isShowSelectedSystemPinsClicked = true;
... ... @@ -790,18 +791,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
790 791  
791 792 $("#" + i).parent().removeClass("activeAASystemSelect");
792 793 }
793   - $("#" + event.currentTarget.id).parent().addClass("activeAASystemSelect");
  794 + $("#" + $scope.SelectedSystemID).parent().addClass("activeAASystemSelect");
794 795  
795 796 $rootScope.isLoading = true;
796 797 $('#spinner').css('visibility', 'visible');
797 798  
798 799 $scope.removeSpeechBubble();
799   - if (event.currentTarget.id == "0") {
800   -
  800 + if ($scope.SelectedSystemID == "0") {
  801 +
801 802 $scope.selectedSystemName = null;
802 803 if ($scope.isHidePinBtnClicked) {
803   -
804   - // $scope.showAllPinsAfterHide($scope.aaPinData);
805 804 $scope.showAllPinsAfterHide();
806 805 }
807 806 else {
... ... @@ -810,11 +809,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
810 809 }
811 810 else {
812 811  
813   - $scope.selectedSystemName = event.currentTarget.title;
  812 + $scope.selectedSystemName = $scope.SelectedSystemTitle;
814 813 // get termText info
815 814 var promise = ModuleService.getTermTextDataForPin($scope.moduleName)
816 815 .then(
817 816 function (response) {
  817 +
818 818 $scope.TermInfo = response.data.Terms.Term;
819 819  
820 820 //on gettng all required data, draw pins
... ... @@ -1701,6 +1701,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1701 1701 }
1702 1702  
1703 1703 $scope.showAllPinsAfterHide = function (event) {
  1704 +
1704 1705 if ($("#dropdownMenu221").hasClass("aaSystemDisable")) {
1705 1706 $("#dropdownMenu221").removeClass("aaSystemDisable");
1706 1707 }
... ... @@ -1708,6 +1709,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1708 1709 $('#spinner').css('visibility', 'visible');
1709 1710 $scope.isHidePinBtnClicked = false;
1710 1711 $rootScope.isshowAllPinsBtnAfterHideClicked = true;
  1712 +
  1713 + //if ($scope.typeOfEvent == "string") {
  1714 + // $scope.selectedSystemName = $scope.SelectedSystemTitle;
  1715 + // alert($scope.selectedSystemName);
  1716 + //}
  1717 +
1711 1718 if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) {
1712 1719  
1713 1720 $scope.showSystemPins($scope.selectedSystemPinData, false);
... ... @@ -1721,11 +1728,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1721 1728 $(".tooltip-custom").addClass("btn-black");
1722 1729 $("#allPinBtn").addClass("btn-primary");
1723 1730 $("#allPinBtn").removeClass("btn-black");
1724   - if ($scope.isSliderChange == true) {
1725   - $scope.isSliderChange = false;
1726   - $scope.showAllPins();
  1731 + if ($("#bodySystemList li.activeAASystemSelect a").attr("title") == "Current Structure" || $("#bodySystemList li.activeAASystemSelect a").attr("title") == undefined)
  1732 + {
  1733 + if ($scope.isSliderChange == true) {
  1734 + $scope.isSliderChange = false;
  1735 + $scope.showAllPins();
1727 1736  
  1737 + }
1728 1738 }
  1739 +
  1740 +
1729 1741 };
1730 1742  
1731 1743  
... ...