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,7 +33,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
33 | selectedorientation: '', | 33 | selectedorientation: '', |
34 | selectedimagetype: '', | 34 | selectedimagetype: '', |
35 | }; | 35 | }; |
36 | - | 36 | + $scope.activePinArray = []; |
37 | $scope.showTabButton = true; | 37 | $scope.showTabButton = true; |
38 | $scope.isListViewDataLoaded = true; | 38 | $scope.isListViewDataLoaded = true; |
39 | 39 | ||
@@ -362,6 +362,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -362,6 +362,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
362 | console.log(' error in showAllPins: ' + error.statusText); | 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,16 +1056,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1049 | radius: 5 * $scope.sliderPercentValue, | 1056 | radius: 5 * $scope.sliderPercentValue, |
1050 | 1057 | ||
1051 | click: function (clickedPin) { | 1058 | click: function (clickedPin) { |
1052 | - // alert('pin clciked = ' + clickedPin.name) | ||
1053 | - | ||
1054 | if (clickedPin.event.ctrlKey == false) { | 1059 | if (clickedPin.event.ctrlKey == false) { |
1055 | $scope.clickedPins = []; | 1060 | $scope.clickedPins = []; |
1056 | } | 1061 | } |
1057 | - | ||
1058 | var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); | 1062 | var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); |
1059 | - // alert('pinId: ' + pinID); | ||
1060 | - //showAnnotation(); | ||
1061 | - | ||
1062 | var pinData = new jinqJs() | 1063 | var pinData = new jinqJs() |
1063 | .from($scope.aaPinData) | 1064 | .from($scope.aaPinData) |
1064 | .where("_PinId == " + pinID) | 1065 | .where("_PinId == " + pinID) |
@@ -1088,7 +1089,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1088,7 +1089,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1088 | .where("_PinId == " + pinID) | 1089 | .where("_PinId == " + pinID) |
1089 | .select(); | 1090 | .select(); |
1090 | if (clickedPin.event.ctrlKey == true) { | 1091 | if (clickedPin.event.ctrlKey == true) { |
1091 | - | 1092 | + |
1093 | + $scope.activePinArray.push(clickedPin.name); | ||
1092 | var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ | 1094 | var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ |
1093 | x1: 50, y1: 50, | 1095 | x1: 50, y1: 50, |
1094 | x2: 50, y2: 50, | 1096 | x2: 50, y2: 50, |
@@ -1096,12 +1098,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1096,12 +1098,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1096 | c1: 'rgba(100, 50, 0,0)', | 1098 | c1: 'rgba(100, 50, 0,0)', |
1097 | c2: 'rgb(126, 187, 83)' | 1099 | c2: 'rgb(126, 187, 83)' |
1098 | }); | 1100 | }); |
1099 | - | ||
1100 | clickedPin.fillStyle = radialAfterClick; | 1101 | clickedPin.fillStyle = radialAfterClick; |
1101 | $scope.showAnnotation(selectedPinData, true, true, false); | 1102 | $scope.showAnnotation(selectedPinData, true, true, false); |
1102 | - | ||
1103 | } | 1103 | } |
1104 | else { | 1104 | else { |
1105 | + $scope.activePinArray = []; | ||
1106 | + $scope.activePinArray.push(clickedPin.name); | ||
1105 | var radial = $('#aaDetailViewCanvas').createGradient({ | 1107 | var radial = $('#aaDetailViewCanvas').createGradient({ |
1106 | x1: 50, y1: 50, | 1108 | x1: 50, y1: 50, |
1107 | x2: 50, y2: 50, | 1109 | x2: 50, y2: 50, |
@@ -1227,7 +1229,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -1227,7 +1229,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | ||
1227 | }, 500); | 1229 | }, 500); |
1228 | } | 1230 | } |
1229 | }) | 1231 | }) |
1230 | - | ||
1231 | }, | 1232 | }, |
1232 | function (error) { | 1233 | function (error) { |
1233 | // handle errors here | 1234 | // handle errors here |
@@ -1579,14 +1580,26 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou | @@ -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 | function refreshTermListOnSystem(bodySystemId) { | 1602 | function refreshTermListOnSystem(bodySystemId) { |
1589 | - // alert('refreshTermListOnSystem is called outside'); | ||
1590 | var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | 1603 | var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); |
1591 | scope.$apply(function () { | 1604 | scope.$apply(function () { |
1592 | scope.refreshTermListOnSystemSelection(bodySystemId); | 1605 | scope.refreshTermListOnSystemSelection(bodySystemId); |
@@ -1720,6 +1733,7 @@ function onZoom(scope) { | @@ -1720,6 +1733,7 @@ function onZoom(scope) { | ||
1720 | 1733 | ||
1721 | 1734 | ||
1722 | $(document).ready(function () { | 1735 | $(document).ready(function () { |
1736 | + | ||
1723 | $(".slider").slider({ | 1737 | $(".slider").slider({ |
1724 | min: 25, | 1738 | min: 25, |
1725 | max: 100, | 1739 | max: 100, |
@@ -1727,9 +1741,6 @@ $(document).ready(function () { | @@ -1727,9 +1741,6 @@ $(document).ready(function () { | ||
1727 | range: "min", | 1741 | range: "min", |
1728 | orientation: "vertical", | 1742 | orientation: "vertical", |
1729 | slide: function (event, ui) { | 1743 | slide: function (event, ui) { |
1730 | - | ||
1731 | - | ||
1732 | - | ||
1733 | var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | 1744 | var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); |
1734 | scope.$apply(function () { | 1745 | scope.$apply(function () { |
1735 | scope.sliderVal = ui.value; | 1746 | scope.sliderVal = ui.value; |
@@ -1796,12 +1807,11 @@ $(document).ready(function () { | @@ -1796,12 +1807,11 @@ $(document).ready(function () { | ||
1796 | scope.context = canvas.getContext("2d") | 1807 | scope.context = canvas.getContext("2d") |
1797 | $("#modItemImage").attr('src', scope.OpenItemImagePath); | 1808 | $("#modItemImage").attr('src', scope.OpenItemImagePath); |
1798 | scope.isSliderChange = true; | 1809 | scope.isSliderChange = true; |
1810 | + | ||
1799 | scope.showAllPins(); | 1811 | scope.showAllPins(); |
1812 | + | ||
1800 | } | 1813 | } |
1801 | - | ||
1802 | - | ||
1803 | 1814 | ||
1804 | - | ||
1805 | }); | 1815 | }); |
1806 | } | 1816 | } |
1807 | }) | 1817 | }) |