diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 41d33a8..9c97b55 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -489,7 +489,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo }) //show annotation on first pin of the sysyem - $scope.showAnnotation($scope.selectedSystemPinData, false, false); + $scope.showAnnotation($scope.selectedSystemPinData, false, false, false); } } } @@ -503,7 +503,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } - $scope.showAnnotation = function (selectedPinData, isCtrlPressed, isPinClicked) { + $scope.showAnnotation = function (selectedPinData, isCtrlPressed, isPinClicked, isItemSearched) { $scope.selectedPin = []; var isSameTermWithMultiPin = false; @@ -520,30 +520,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.MultiLanguageAnnationArray = []; - // get termText info - // var promise = ModuleService.getTermTextDataForPin($scope.moduleName) - //.then( - // function (response) { - - // $scope.TermInfo = response.data.Terms.Term; - - // if ($scope.TermInfo != null && $scope.TermInfo.length > 0) { - - // var termTextdata = new jinqJs() - // .from($scope.TermInfo) - // .where("__ActualTermNumber == " + pinTermNumber) - // .select(); - - // var termText = termTextdata[0].__TermText; - // $scope.MultiLanguageAnnationArray = []; - // $scope.MultiLanguageAnnationArray.push(termText); $scope.GetAnnotationBasedOnActualTermNo(pinTermNumber); if (isCtrlPressed) { } else { - if (isPinClicked) { + if (isPinClicked || isItemSearched) { var existingSpeechBubble = $("div[id*='speechBubble']"); for (var i = 0; i < existingSpeechBubble.length; i++) { existingSpeechBubble[i].parentNode.removeChild(existingSpeechBubble[i]); @@ -777,7 +760,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo speechBubbleDims.push({ currentX: x, currentY: y }); document.getElementById('speechBubbleLine' + PinId + '').style.display = 'block'; document.getElementById('speechBubbleLine' + PinId + '').style.left = ((speechBubbleDims[0].currentX - 45)) + 'px'; - document.getElementById('speechBubbleLine' + PinId + '').style.top = ((speechBubbleDims[0].currentY) - 40) + 'px'; + document.getElementById('speechBubbleLine' + PinId + '').style.top = ((speechBubbleDims[0].currentY) - 20) + 'px'; document.getElementById('speechBubble' + PinId + '').style.display = 'block'; document.getElementById('speechBubble' + PinId + '').style.left = (speechBubbleDims[0].currentX - 70) + 'px'; document.getElementById('speechBubble' + PinId + '').style.top = (speechBubbleDims[0].currentY - 58) + 'px'; @@ -934,11 +917,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .where("_PinId == " + pinID) .select(); if (clickedPin.event.ctrlKey == true) { - $scope.showAnnotation(selectedPinData, true, true); + $scope.showAnnotation(selectedPinData, true, true, false); } else { - $scope.showAnnotation(selectedPinData, false, true); + $scope.showAnnotation(selectedPinData, false, true, false); } @@ -974,18 +957,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.loadSearchData = function () { - //var promise = ModuleService.getTermTextDataForPin($scope.moduleName) - // .then( - // function (response) { - - // $scope.TermInfo = response.data.Terms.Term; - - // }, - // function (error) { - // // handle errors here - // console.log(' error: ' + error.statusText); - // } - // ) + var imageId = $rootScope.imageId; var promise = ModuleService.getTermTextDataForAAImage(imageId) .then( @@ -1006,7 +978,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.pinTermData.push({ "LanguageId": $scope.matchedLanguageTermData[i]._LanguageId, "TermNumber": $scope.matchedLanguageTermData[i]._TermNumber, "TermTxt": $scope.matchedLanguageTermData[i]._TermText }); } - $scope.$watch('$$scope.pinTermData', function (newValue, oldValue, scope) { + $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) { if ($('#termlistfilter').html() != "") $('#termlistfilter').empty() if ($scope.pinTermData.length > 0) { @@ -1014,17 +986,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('pinTermData= ' + $scope.pinTermData.length); for (var j = 0; j < $scope.pinTermData.length; j++) { - var $el = $('