diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 2f533c3..92777e0 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -324,7 +324,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou }) $rootScope.aaPinDataArray = []; $scope.showAllPins = function () { - + $scope.allPinDataArray = []; var promise = ModuleService.getPinDataForImage($rootScope.imageName) @@ -576,7 +576,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.showSelectedSystemPins = function (event) { - var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a"); var bodySystemListlength = bodySystemListObj.length; for (var i = 0; i < bodySystemListlength; i++) { @@ -655,7 +654,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $scope.showAnnotation = function (selectedPinData, isCtrlPressed, isPinClicked, isItemSearched) { - + $scope.clickedPins = []; $scope.selectedPin = []; var isSameTermWithMultiPin = false; var firstPinId = selectedPinData[0]._PinId; @@ -713,13 +712,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou angular.forEach(pinDataWithFirstTermNumber, function (value, key) { $scope.selectedPin.push(value._PinId); + $scope.clickedPins.push({ 'id': value._PinId }); var headX = (parseInt(value._HeadX)); var headY = (parseInt(value._HeadY)); $scope.createSpeechBubble(parseInt(headX) + 10, parseInt(headY) + 10, value._PinId, isCtrlPressed, isPinClicked, isSameTermWithMultiPin); }) - - - + } $rootScope.isLoading = false; @@ -1360,7 +1358,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } $rootScope.hidePins = function () { - + $rootScope.isshowAllPinsBtnAfterHideClicked = false; $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); $scope.hideSpeechBubble(); @@ -1392,7 +1390,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); $scope.isHidePinBtnClicked = false; - + $rootScope.isshowAllPinsBtnAfterHideClicked = true; if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) { $scope.showSystemPins($scope.selectedSystemPinData, false); @@ -1415,6 +1413,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.showSelectedPins = function () { + $rootScope.isshowAllPinsBtnAfterHideClicked = false; $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -1518,8 +1517,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } - + $rootScope.isshowAllPinsBtnAfterHideClicked = true; $scope.showItemsForSearch = function () { + if($rootScope.isshowAllPinsBtnAfterHideClicked == true){ console.log('showItemsForSearch is called'); //this check is for log only because we are writing length so need to check if its not null or undefined @@ -1547,7 +1547,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } }, 500); - + } }