From 7923eb0355a681caf55518dacac1a85bde789717 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Aug 2017 18:10:10 +0530 Subject: [PATCH] Maintained Pin Selection Issue On Zoom --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index e13c39e..44f5f7a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -33,7 +33,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou selectedorientation: '', selectedimagetype: '', }; - + $scope.activePinArray = []; $scope.showTabButton = true; $scope.isListViewDataLoaded = true; @@ -362,6 +362,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou console.log(' error in showAllPins: ' + error.statusText); } ) + if ($scope.isSliderChange == true) { + $timeout(function () { + $scope.activePinOnLayerChange(); + }, 1000); + + } + } @@ -1049,16 +1056,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou radius: 5 * $scope.sliderPercentValue, click: function (clickedPin) { - // alert('pin clciked = ' + clickedPin.name) - if (clickedPin.event.ctrlKey == false) { $scope.clickedPins = []; } - var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); - // alert('pinId: ' + pinID); - //showAnnotation(); - var pinData = new jinqJs() .from($scope.aaPinData) .where("_PinId == " + pinID) @@ -1088,7 +1089,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou .where("_PinId == " + pinID) .select(); if (clickedPin.event.ctrlKey == true) { - + + $scope.activePinArray.push(clickedPin.name); var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ x1: 50, y1: 50, x2: 50, y2: 50, @@ -1096,12 +1098,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou c1: 'rgba(100, 50, 0,0)', c2: 'rgb(126, 187, 83)' }); - clickedPin.fillStyle = radialAfterClick; $scope.showAnnotation(selectedPinData, true, true, false); - } else { + $scope.activePinArray = []; + $scope.activePinArray.push(clickedPin.name); var radial = $('#aaDetailViewCanvas').createGradient({ x1: 50, y1: 50, x2: 50, y2: 50, @@ -1227,7 +1229,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou }, 500); } }) - }, function (error) { // handle errors here @@ -1579,14 +1580,26 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } } } - - - + $scope.activePinOnLayerChange = function () { + for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { + var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ + x1: 50, y1: 50, + x2: 50, y2: 50, + r1: 10, r2: 30, + c1: 'rgba(100, 50, 0,0)', + c2: 'rgb(126, 187, 83)' + }); + var clickedPin = $scope.activePinArray[i]; + $('#aaDetailViewCanvas').setLayer(clickedPin, { + fillStyle: radialAfterClick + }).drawLayers(); + + } + } }]); function refreshTermListOnSystem(bodySystemId) { - // alert('refreshTermListOnSystem is called outside'); var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); scope.$apply(function () { scope.refreshTermListOnSystemSelection(bodySystemId); @@ -1720,6 +1733,7 @@ function onZoom(scope) { $(document).ready(function () { + $(".slider").slider({ min: 25, max: 100, @@ -1727,9 +1741,6 @@ $(document).ready(function () { range: "min", orientation: "vertical", slide: function (event, ui) { - - - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); scope.$apply(function () { scope.sliderVal = ui.value; @@ -1796,12 +1807,11 @@ $(document).ready(function () { scope.context = canvas.getContext("2d") $("#modItemImage").attr('src', scope.OpenItemImagePath); scope.isSliderChange = true; + scope.showAllPins(); + } - - - }); } }) -- libgit2 0.21.4