Commit 45396a7a59ced089a12d59156de47ce578a58e3c
1 parent
db699b74
removed unused code
Showing
1 changed file
with
81 additions
and
86 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -169,11 +169,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
169 | 169 | canvas.style.left = '0px'; |
170 | 170 | canvas.style.top = '0px'; |
171 | 171 | canvas.style.position = "absolute"; |
172 | - canvas.addEventListener('click', function () { | |
173 | - alert('canvas clicked'); | |
174 | - var clickedPint = $scope.getMousePos(event); | |
175 | - alert('x: ' + clickedPint.x + ', y:' + clickedPint.y); | |
176 | - }) | |
172 | + //canvas.addEventListener('click', function () { | |
173 | + // alert('canvas clicked'); | |
174 | + // var clickedPint = $scope.getMousePos(event); | |
175 | + // alert('x: ' + clickedPint.x + ', y:' + clickedPint.y); | |
176 | + //}) | |
177 | 177 | $("#canvasDiv").append(canvas); |
178 | 178 | $scope.context = canvas.getContext("2d") |
179 | 179 | |
... | ... | @@ -903,7 +903,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
903 | 903 | |
904 | 904 | $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) { |
905 | 905 | console.log('drawStaticPinsOnImage') |
906 | - if ($scope.isSliderChange == true) { | |
906 | + // if ($scope.isSliderChange == true) { | |
907 | 907 | console.log('isSliderrChange') |
908 | 908 | var radial = $('#' + canvasId).createGradient({ |
909 | 909 | x1: 50, y1: 50, |
... | ... | @@ -992,96 +992,96 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
992 | 992 | } |
993 | 993 | |
994 | 994 | }).drawLayers(); |
995 | - } | |
996 | - else | |
997 | - { | |
998 | - var radial = $('#' + canvasId).createGradient({ | |
999 | - x1: 50, y1: 50, | |
1000 | - x2: 50, y2: 50, | |
1001 | - r1: 10, r2: 30, | |
1002 | - c1: 'rgba(100, 50, 0,0)', | |
1003 | - c2: 'rgb(216, 216, 216)' | |
1004 | - }); | |
1005 | - $('#' + canvasId).drawLine({ | |
1006 | - | |
1007 | - layer: true, | |
1008 | - name: "Pin_" + PinId, | |
1009 | - groups: ["Pin_" + PinId], | |
1010 | - strokeStyle: 'black', | |
1011 | - strokeWidth: 2, | |
1012 | - visible: true, | |
1013 | - x1: offsetX1, y1: offsetY1, | |
1014 | - x2: x, y2: y, | |
1015 | - | |
1016 | - }).drawArc({ | |
1017 | - name: "PinArc_" + PinId, | |
1018 | - layer: true, | |
1019 | - groups: ["Pin_" + PinId], | |
1020 | - strokeStyle: 'grey', | |
1021 | - strokeWidth: 2, | |
1022 | - visible: true, | |
1023 | - fillStyle: radial, | |
1024 | - x: x, y: y, | |
1025 | - radius: 5, | |
1026 | - | |
1027 | - click: function (clickedPin) { | |
1028 | - alert('pin clciked = ' + clickedPin.name) //change the head color to green | |
1029 | - var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ | |
1030 | - x1: 50, y1: 50, | |
1031 | - x2: 50, y2: 50, | |
1032 | - r1: 10, r2: 30, | |
1033 | - c1: 'rgba(100, 50, 0,0)', | |
1034 | - c2: 'rgb(126, 187, 83)' | |
1035 | - }); | |
995 | + //} | |
996 | + // else | |
997 | + // { | |
998 | + // var radial = $('#' + canvasId).createGradient({ | |
999 | + // x1: 50, y1: 50, | |
1000 | + // x2: 50, y2: 50, | |
1001 | + // r1: 10, r2: 30, | |
1002 | + // c1: 'rgba(100, 50, 0,0)', | |
1003 | + // c2: 'rgb(216, 216, 216)' | |
1004 | + // }); | |
1005 | + // $('#' + canvasId).drawLine({ | |
1036 | 1006 | |
1037 | - clickedPin.fillStyle = radialAfterClick; | |
1007 | + // layer: true, | |
1008 | + // name: "Pin_" + PinId, | |
1009 | + // groups: ["Pin_" + PinId], | |
1010 | + // strokeStyle: 'black', | |
1011 | + // strokeWidth: 2, | |
1012 | + // visible: true, | |
1013 | + // x1: offsetX1, y1: offsetY1, | |
1014 | + // x2: x, y2: y, | |
1038 | 1015 | |
1039 | - var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); | |
1040 | - // alert('pinId: ' + pinID); | |
1041 | - //showAnnotation(); | |
1016 | + // }).drawArc({ | |
1017 | + // name: "PinArc_" + PinId, | |
1018 | + // layer: true, | |
1019 | + // groups: ["Pin_" + PinId], | |
1020 | + // strokeStyle: 'grey', | |
1021 | + // strokeWidth: 2, | |
1022 | + // visible: true, | |
1023 | + // fillStyle: radial, | |
1024 | + // x: x, y: y, | |
1025 | + // radius: 5, | |
1042 | 1026 | |
1043 | - var pinData = new jinqJs() | |
1044 | - .from($scope.aaPinData) | |
1045 | - .where("_PinId == " + pinID) | |
1046 | - .select(); | |
1027 | + // click: function (clickedPin) { | |
1028 | + // alert('pin clciked = ' + clickedPin.name) //change the head color to green | |
1029 | + // var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ | |
1030 | + // x1: 50, y1: 50, | |
1031 | + // x2: 50, y2: 50, | |
1032 | + // r1: 10, r2: 30, | |
1033 | + // c1: 'rgba(100, 50, 0,0)', | |
1034 | + // c2: 'rgb(126, 187, 83)' | |
1035 | + // }); | |
1047 | 1036 | |
1037 | + // clickedPin.fillStyle = radialAfterClick; | |
1048 | 1038 | |
1049 | - var pinTermNumber = pinData[0]._TermId; | |
1039 | + // var pinID = (clickedPin.name).substring(7, (clickedPin.name).length); | |
1040 | + // // alert('pinId: ' + pinID); | |
1041 | + // //showAnnotation(); | |
1050 | 1042 | |
1051 | - var pinWithSameTerm = new jinqJs() | |
1043 | + // var pinData = new jinqJs() | |
1044 | + // .from($scope.aaPinData) | |
1045 | + // .where("_PinId == " + pinID) | |
1046 | + // .select(); | |
1052 | 1047 | |
1053 | - .from($scope.aaPinData) | |
1054 | - .where("_TermId == " + pinTermNumber) | |
1055 | - .select(); | |
1056 | 1048 | |
1049 | + // var pinTermNumber = pinData[0]._TermId; | |
1057 | 1050 | |
1058 | - if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) { | |
1051 | + // var pinWithSameTerm = new jinqJs() | |
1059 | 1052 | |
1060 | - for (var i = 0; i < pinWithSameTerm.length; i++) { | |
1053 | + // .from($scope.aaPinData) | |
1054 | + // .where("_TermId == " + pinTermNumber) | |
1055 | + // .select(); | |
1061 | 1056 | |
1062 | - $scope.clickedPins.push({ 'id': pinWithSameTerm[i]._PinId }) | |
1063 | - } | |
1064 | 1057 | |
1065 | - } | |
1058 | + // if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) { | |
1066 | 1059 | |
1067 | - var selectedPinData = new jinqJs() | |
1068 | - .from($scope.aaPinData) | |
1069 | - .where("_PinId == " + pinID) | |
1070 | - .select(); | |
1071 | - if (clickedPin.event.ctrlKey == true) { | |
1072 | - $scope.showAnnotation(selectedPinData, true, true, false); | |
1060 | + // for (var i = 0; i < pinWithSameTerm.length; i++) { | |
1073 | 1061 | |
1074 | - } | |
1075 | - else { | |
1076 | - $scope.showAnnotation(selectedPinData, false, true, false); | |
1062 | + // $scope.clickedPins.push({ 'id': pinWithSameTerm[i]._PinId }) | |
1063 | + // } | |
1077 | 1064 | |
1078 | - } | |
1065 | + // } | |
1079 | 1066 | |
1067 | + // var selectedPinData = new jinqJs() | |
1068 | + // .from($scope.aaPinData) | |
1069 | + // .where("_PinId == " + pinID) | |
1070 | + // .select(); | |
1071 | + // if (clickedPin.event.ctrlKey == true) { | |
1072 | + // $scope.showAnnotation(selectedPinData, true, true, false); | |
1080 | 1073 | |
1081 | - } | |
1074 | + // } | |
1075 | + // else { | |
1076 | + // $scope.showAnnotation(selectedPinData, false, true, false); | |
1082 | 1077 | |
1083 | - }).drawLayers(); | |
1084 | - } | |
1078 | + // } | |
1079 | + | |
1080 | + | |
1081 | + // } | |
1082 | + | |
1083 | + // }).drawLayers(); | |
1084 | + //} | |
1085 | 1085 | |
1086 | 1086 | } |
1087 | 1087 | |
... | ... | @@ -1529,11 +1529,10 @@ $(document).ready(function () { |
1529 | 1529 | |
1530 | 1530 | var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); |
1531 | 1531 | scope.$apply(function () { |
1532 | - // scope.showSelectedSystemPins(event); | |
1533 | 1532 | var relativeWidth = 0; |
1534 | 1533 | var relativeHeight = 0; |
1535 | - //scope.sliderPercentValue = 0; | |
1536 | - if (ui.value == 100) { | |
1534 | + | |
1535 | + if (ui.value == 100) { | |
1537 | 1536 | relativeWidth = scope.ViewImageWidth; |
1538 | 1537 | relativeHeight = scope.ViewImageHeight |
1539 | 1538 | scope.sliderPercentValue = 1.0; |
... | ... | @@ -1587,11 +1586,7 @@ $(document).ready(function () { |
1587 | 1586 | canvas.style.left = '0px'; |
1588 | 1587 | canvas.style.top = '0px'; |
1589 | 1588 | canvas.style.position = "absolute"; |
1590 | - //canvas.addEventListener('click', function () { | |
1591 | - // alert('canvas clicked'); | |
1592 | - // var clickedPint = scope.getMousePos(event); | |
1593 | - // alert('x: ' + clickedPint.x + ', y:' + clickedPint.y); | |
1594 | - //}) | |
1589 | + | |
1595 | 1590 | $("#canvasDiv").append(canvas); |
1596 | 1591 | scope.context = canvas.getContext("2d") |
1597 | 1592 | $("#modItemImage").attr('src', scope.OpenItemImagePath); | ... | ... |