Commit 7923eb0355a681caf55518dacac1a85bde789717
1 parent
e5470295
Maintained Pin Selection Issue On Zoom
Showing
1 changed file
with
31 additions
and
21 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -33,7 +33,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
33 | 33 | selectedorientation: '', |
34 | 34 | selectedimagetype: '', |
35 | 35 | }; |
36 | - | |
36 | + $scope.activePinArray = []; | |
37 | 37 | $scope.showTabButton = true; |
38 | 38 | $scope.isListViewDataLoaded = true; |
39 | 39 | |
... | ... | @@ -362,6 +362,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
362 | 362 | console.log(' error in showAllPins: ' + error.statusText); |
363 | 363 | } |
364 | 364 | ) |
365 | + if ($scope.isSliderChange == true) { | |
366 | + $timeout(function () { | |
367 | + $scope.activePinOnLayerChange(); | |
368 | + }, 1000); | |
369 | + | |
370 | + } | |
371 | + | |
365 | 372 | } |
366 | 373 | |
367 | 374 | |
... | ... | @@ -1049,16 +1056,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1049 | 1056 | radius: 5 * $scope.sliderPercentValue, |
1050 | 1057 | |
1051 | 1058 | click: function (clickedPin) { |
1052 | - // alert('pin clciked = ' + clickedPin.name) | |
1053 | - | |
1054 | 1059 | if (clickedPin.event.ctrlKey == false) { |
1055 | 1060 | $scope.clickedPins = []; |
1056 | 1061 | } |
1057 | - | |
1058 | 1062 | var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); |
1059 | - // alert('pinId: ' + pinID); | |
1060 | - //showAnnotation(); | |
1061 | - | |
1062 | 1063 | var pinData = new jinqJs() |
1063 | 1064 | .from($scope.aaPinData) |
1064 | 1065 | .where("_PinId == " + pinID) |
... | ... | @@ -1088,7 +1089,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1088 | 1089 | .where("_PinId == " + pinID) |
1089 | 1090 | .select(); |
1090 | 1091 | if (clickedPin.event.ctrlKey == true) { |
1091 | - | |
1092 | + | |
1093 | + $scope.activePinArray.push(clickedPin.name); | |
1092 | 1094 | var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ |
1093 | 1095 | x1: 50, y1: 50, |
1094 | 1096 | x2: 50, y2: 50, |
... | ... | @@ -1096,12 +1098,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1096 | 1098 | c1: 'rgba(100, 50, 0,0)', |
1097 | 1099 | c2: 'rgb(126, 187, 83)' |
1098 | 1100 | }); |
1099 | - | |
1100 | 1101 | clickedPin.fillStyle = radialAfterClick; |
1101 | 1102 | $scope.showAnnotation(selectedPinData, true, true, false); |
1102 | - | |
1103 | 1103 | } |
1104 | 1104 | else { |
1105 | + $scope.activePinArray = []; | |
1106 | + $scope.activePinArray.push(clickedPin.name); | |
1105 | 1107 | var radial = $('#aaDetailViewCanvas').createGradient({ |
1106 | 1108 | x1: 50, y1: 50, |
1107 | 1109 | x2: 50, y2: 50, |
... | ... | @@ -1227,7 +1229,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1227 | 1229 | }, 500); |
1228 | 1230 | } |
1229 | 1231 | }) |
1230 | - | |
1231 | 1232 | }, |
1232 | 1233 | function (error) { |
1233 | 1234 | // handle errors here |
... | ... | @@ -1579,14 +1580,26 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1579 | 1580 | } |
1580 | 1581 | } |
1581 | 1582 | } |
1582 | - | |
1583 | - | |
1584 | - | |
1583 | + $scope.activePinOnLayerChange = function () { | |
1584 | + for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { | |
1585 | + var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ | |
1586 | + x1: 50, y1: 50, | |
1587 | + x2: 50, y2: 50, | |
1588 | + r1: 10, r2: 30, | |
1589 | + c1: 'rgba(100, 50, 0,0)', | |
1590 | + c2: 'rgb(126, 187, 83)' | |
1591 | + }); | |
1592 | + var clickedPin = $scope.activePinArray[i]; | |
1593 | + $('#aaDetailViewCanvas').setLayer(clickedPin, { | |
1594 | + fillStyle: radialAfterClick | |
1595 | + }).drawLayers(); | |
1596 | + | |
1597 | + } | |
1598 | + } | |
1585 | 1599 | }]); |
1586 | 1600 | |
1587 | 1601 | |
1588 | 1602 | function refreshTermListOnSystem(bodySystemId) { |
1589 | - // alert('refreshTermListOnSystem is called outside'); | |
1590 | 1603 | var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); |
1591 | 1604 | scope.$apply(function () { |
1592 | 1605 | scope.refreshTermListOnSystemSelection(bodySystemId); |
... | ... | @@ -1720,6 +1733,7 @@ function onZoom(scope) { |
1720 | 1733 | |
1721 | 1734 | |
1722 | 1735 | $(document).ready(function () { |
1736 | + | |
1723 | 1737 | $(".slider").slider({ |
1724 | 1738 | min: 25, |
1725 | 1739 | max: 100, |
... | ... | @@ -1727,9 +1741,6 @@ $(document).ready(function () { |
1727 | 1741 | range: "min", |
1728 | 1742 | orientation: "vertical", |
1729 | 1743 | slide: function (event, ui) { |
1730 | - | |
1731 | - | |
1732 | - | |
1733 | 1744 | var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); |
1734 | 1745 | scope.$apply(function () { |
1735 | 1746 | scope.sliderVal = ui.value; |
... | ... | @@ -1796,12 +1807,11 @@ $(document).ready(function () { |
1796 | 1807 | scope.context = canvas.getContext("2d") |
1797 | 1808 | $("#modItemImage").attr('src', scope.OpenItemImagePath); |
1798 | 1809 | scope.isSliderChange = true; |
1810 | + | |
1799 | 1811 | scope.showAllPins(); |
1812 | + | |
1800 | 1813 | } |
1801 | - | |
1802 | - | |
1803 | 1814 | |
1804 | - | |
1805 | 1815 | }); |
1806 | 1816 | } |
1807 | 1817 | }) | ... | ... |