From 5bc735ae0d70531d7c5cf6b6f0fb9cd35abc7e77 Mon Sep 17 00:00:00 2001 From: nikita Date: Fri, 16 Jun 2017 16:02:24 +0530 Subject: [PATCH] implemented feature in which all pins will be shown of searched item system --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+), 0 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index 6bfa5c8..2af5199 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -1170,6 +1170,39 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .where("_TermId == " + $scope.searchItemId) .select(); + + //if any system is sleleted and the searched term is of another system then show all pins of that system + var bodySystemNameOfSeletedPin = pinDataForTerm[0]._BodySystemName; + + if ($scope.selectedSystemName!=null && bodySystemNameOfSeletedPin != $scope.selectedSystemName) { + + $scope.selectedSystemPinData = new jinqJs() + .from($scope.aaPinData) + .where("_BodySystemName == " + bodySystemNameOfSeletedPin) + .select(); + + //remove other system pins + if ($scope.selectedSystemPinData != null && $scope.selectedSystemPinData.length > 0) { + + angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) { + + if (aaPinDataValue._BodySystemName != $scope.selectedSystemName) + $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId); + }) + + angular.forEach($scope.selectedSystemPinData, function (value, key) { + + + $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY) + + }) + //show annotation on first pin of the sysyem + // $scope.showAnnotation($scope.selectedSystemPinData, false, false, false); + + } + } + + $scope.showAnnotation(pinDataForTerm, false, false, true); $scope.IsSearchVisible = false; -- libgit2 0.21.4