{"action":"created","comment":{"url":"https://api.github.com/repos/APT-project/upcoming/pulls/comments/90767613","pull_request_review_id":11286080,"id":90767613,"diff_hunk":"@@ -7,53 +7,45 @@\n \n   eventSort.$inject = ['$http'];\n \n-  // function eventSort($http) {\n-  //\n-  //     var getEvents = function() {\n-  //         return $http.get('data/mock.events.json');\n-  //     };\n-  //\n-  //     return {\n-  //         getEvents: getEvents\n-  //     };\n-  //\n-  // };\n-\n-  function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) {\n-    var R = 6371; // Radius of the earth in km\n-    var dLat = deg2rad(lat2-lat1); // deg2rad below\n-    var dLon = deg2rad(lon2-lon1);\n-    var a =\n-      Math.sin(dLat/2) * Math.sin(dLat/2) +\n-      Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *\n-      Math.sin(dLon/2) * Math.sin(dLon/2);\n-    var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n-    var d = R * c; // Distance in km\n-    return d;\n-  };\n+  function eventSort($http) {\n+\n+    var vm = this;\n+\n+    function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) {\n+      var R = 6371; // Radius of the earth in km\n+      var dLat = deg2rad(lat2-lat1); // deg2rad below\n+      var dLon = deg2rad(lon2-lon1);\n+      var a =\n+        Math.sin(dLat/2) * Math.sin(dLat/2) +\n+        Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *\n+        Math.sin(dLon/2) * Math.sin(dLon/2);\n+      var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n+      var d = R * c; // Distance in km\n+      return d;\n+    };\n \n-  function deg2rad(deg) {\n-    return deg * (Math.PI/180)\n-  };\n+    function deg2rad(deg) {\n+      return deg * (Math.PI/180)\n+    };\n \n-  llb_app.addListener('location', function(data){\n-    var latLng = {\n-      lat: data.data.latitude,\n-      lng: data.data.longitude\n+    llb_app.addListener('location', function(data){\n+      var latLng = {\n+        lat: data.data.latitude,\n+        lng: data.data.longitude\n+      };\n+      vm.latestLocation = latLng;\n+    });\n+    llb_app.request('location');\n+\n+    function proximity(userCoordinates, $http) {\n+      var events = $http.get('data/mock.events.json')","path":"app/js/event/event.sort.js","position":null,"original_position":66,"commit_id":"eff8a80eba5910b5bea328c3a7335fc990b577b2","original_commit_id":"a9178e3e4120953be1ee9e2800ecee8b8dc49134","user":{"login":"Mxdcq","id":15731144,"avatar_url":"https://avatars.githubusercontent.com/u/15731144?v=3","gravatar_id":"","url":"https://api.github.com/users/Mxdcq","html_url":"https://github.com/Mxdcq","followers_url":"https://api.github.com/users/Mxdcq/followers","following_url":"https://api.github.com/users/Mxdcq/following{/other_user}","gists_url":"https://api.github.com/users/Mxdcq/gists{/gist_id}","starred_url":"https://api.github.com/users/Mxdcq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mxdcq/subscriptions","organizations_url":"https://api.github.com/users/Mxdcq/orgs","repos_url":"https://api.github.com/users/Mxdcq/repos","events_url":"https://api.github.com/users/Mxdcq/events{/privacy}","received_events_url":"https://api.github.com/users/Mxdcq/received_events","type":"User","site_admin":false},"body":"add now","created_at":"2016-12-03T23:53:04Z","updated_at":"2016-12-03T23:53:04Z","html_url":"https://github.com/APT-project/upcoming/pull/36#discussion_r90767613","pull_request_url":"https://api.github.com/repos/APT-project/upcoming/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/APT-project/upcoming/pulls/comments/90767613"},"html":{"href":"https://github.com/APT-project/upcoming/pull/36#discussion_r90767613"},"pull_request":{"href":"https://api.github.com/repos/APT-project/upcoming/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/APT-project/upcoming/pulls/36","id":95821020,"html_url":"https://github.com/APT-project/upcoming/pull/36","diff_url":"https://github.com/APT-project/upcoming/pull/36.diff","patch_url":"https://github.com/APT-project/upcoming/pull/36.patch","issue_url":"https://api.github.com/repos/APT-project/upcoming/issues/36","number":36,"state":"open","locked":false,"title":"Sort events","user":{"login":"Mxdcq","id":15731144,"avatar_url":"https://avatars.githubusercontent.com/u/15731144?v=3","gravatar_id":"","url":"https://api.github.com/users/Mxdcq","html_url":"https://github.com/Mxdcq","followers_url":"https://api.github.com/users/Mxdcq/followers","following_url":"https://api.github.com/users/Mxdcq/following{/other_user}","gists_url":"https://api.github.com/users/Mxdcq/gists{/gist_id}","starred_url":"https://api.github.com/users/Mxdcq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mxdcq/subscriptions","organizations_url":"https://api.github.com/users/Mxdcq/orgs","repos_url":"https://api.github.com/users/Mxdcq/repos","events_url":"https://api.github.com/users/Mxdcq/events{/privacy}","received_events_url":"https://api.github.com/users/Mxdcq/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-30T03:21:12Z","updated_at":"2016-12-03T23:53:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afa90a33b27cf633f854f31529b50bae486c4250","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/APT-project/upcoming/pulls/36/commits","review_comments_url":"https://api.github.com/repos/APT-project/upcoming/pulls/36/comments","review_comment_url":"https://api.github.com/repos/APT-project/upcoming/pulls/comments{/number}","comments_url":"https://api.github.com/repos/APT-project/upcoming/issues/36/comments","statuses_url":"https://api.github.com/repos/APT-project/upcoming/statuses/eff8a80eba5910b5bea328c3a7335fc990b577b2","head":{"label":"Mxdcq:sort_events","ref":"sort_events","sha":"eff8a80eba5910b5bea328c3a7335fc990b577b2","user":{"login":"Mxdcq","id":15731144,"avatar_url":"https://avatars.githubusercontent.com/u/15731144?v=3","gravatar_id":"","url":"https://api.github.com/users/Mxdcq","html_url":"https://github.com/Mxdcq","followers_url":"https://api.github.com/users/Mxdcq/followers","following_url":"https://api.github.com/users/Mxdcq/following{/other_user}","gists_url":"https://api.github.com/users/Mxdcq/gists{/gist_id}","starred_url":"https://api.github.com/users/Mxdcq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mxdcq/subscriptions","organizations_url":"https://api.github.com/users/Mxdcq/orgs","repos_url":"https://api.github.com/users/Mxdcq/repos","events_url":"https://api.github.com/users/Mxdcq/events{/privacy}","received_events_url":"https://api.github.com/users/Mxdcq/received_events","type":"User","site_admin":false},"repo":{"id":73861451,"name":"upcoming","full_name":"Mxdcq/upcoming","owner":{"login":"Mxdcq","id":15731144,"avatar_url":"https://avatars.githubusercontent.com/u/15731144?v=3","gravatar_id":"","url":"https://api.github.com/users/Mxdcq","html_url":"https://github.com/Mxdcq","followers_url":"https://api.github.com/users/Mxdcq/followers","following_url":"https://api.github.com/users/Mxdcq/following{/other_user}","gists_url":"https://api.github.com/users/Mxdcq/gists{/gist_id}","starred_url":"https://api.github.com/users/Mxdcq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mxdcq/subscriptions","organizations_url":"https://api.github.com/users/Mxdcq/orgs","repos_url":"https://api.github.com/users/Mxdcq/repos","events_url":"https://api.github.com/users/Mxdcq/events{/privacy}","received_events_url":"https://api.github.com/users/Mxdcq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mxdcq/upcoming","description":"Upcoming Stops","fork":true,"url":"https://api.github.com/repos/Mxdcq/upcoming","forks_url":"https://api.github.com/repos/Mxdcq/upcoming/forks","keys_url":"https://api.github.com/repos/Mxdcq/upcoming/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mxdcq/upcoming/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mxdcq/upcoming/teams","hooks_url":"https://api.github.com/repos/Mxdcq/upcoming/hooks","issue_events_url":"https://api.github.com/repos/Mxdcq/upcoming/issues/events{/number}","events_url":"https://api.github.com/repos/Mxdcq/upcoming/events","assignees_url":"https://api.github.com/repos/Mxdcq/upcoming/assignees{/user}","branches_url":"https://api.github.com/repos/Mxdcq/upcoming/branches{/branch}","tags_url":"https://api.github.com/repos/Mxdcq/upcoming/tags","blobs_url":"https://api.github.com/repos/Mxdcq/upcoming/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mxdcq/upcoming/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mxdcq/upcoming/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mxdcq/upcoming/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mxdcq/upcoming/statuses/{sha}","languages_url":"https://api.github.com/repos/Mxdcq/upcoming/languages","stargazers_url":"https://api.github.com/repos/Mxdcq/upcoming/stargazers","contributors_url":"https://api.github.com/repos/Mxdcq/upcoming/contributors","subscribers_url":"https://api.github.com/repos/Mxdcq/upcoming/subscribers","subscription_url":"https://api.github.com/repos/Mxdcq/upcoming/subscription","commits_url":"https://api.github.com/repos/Mxdcq/upcoming/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mxdcq/upcoming/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mxdcq/upcoming/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mxdcq/upcoming/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mxdcq/upcoming/contents/{+path}","compare_url":"https://api.github.com/repos/Mxdcq/upcoming/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mxdcq/upcoming/merges","archive_url":"https://api.github.com/repos/Mxdcq/upcoming/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mxdcq/upcoming/downloads","issues_url":"https://api.github.com/repos/Mxdcq/upcoming/issues{/number}","pulls_url":"https://api.github.com/repos/Mxdcq/upcoming/pulls{/number}","milestones_url":"https://api.github.com/repos/Mxdcq/upcoming/milestones{/number}","notifications_url":"https://api.github.com/repos/Mxdcq/upcoming/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mxdcq/upcoming/labels{/name}","releases_url":"https://api.github.com/repos/Mxdcq/upcoming/releases{/id}","deployments_url":"https://api.github.com/repos/Mxdcq/upcoming/deployments","created_at":"2016-11-15T22:37:06Z","updated_at":"2016-11-30T02:40:56Z","pushed_at":"2016-12-03T23:52:41Z","git_url":"git://github.com/Mxdcq/upcoming.git","ssh_url":"git@github.com:Mxdcq/upcoming.git","clone_url":"https://github.com/Mxdcq/upcoming.git","svn_url":"https://github.com/Mxdcq/upcoming","homepage":"","size":744,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"APT-project:master","ref":"master","sha":"b3bc086e84065b8cf0236e66e0ea2b322d1e8f25","user":{"login":"APT-project","id":22332627,"avatar_url":"https://avatars.githubusercontent.com/u/22332627?v=3","gravatar_id":"","url":"https://api.github.com/users/APT-project","html_url":"https://github.com/APT-project","followers_url":"https://api.github.com/users/APT-project/followers","following_url":"https://api.github.com/users/APT-project/following{/other_user}","gists_url":"https://api.github.com/users/APT-project/gists{/gist_id}","starred_url":"https://api.github.com/users/APT-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/APT-project/subscriptions","organizations_url":"https://api.github.com/users/APT-project/orgs","repos_url":"https://api.github.com/users/APT-project/repos","events_url":"https://api.github.com/users/APT-project/events{/privacy}","received_events_url":"https://api.github.com/users/APT-project/received_events","type":"Organization","site_admin":false},"repo":{"id":69794173,"name":"upcoming","full_name":"APT-project/upcoming","owner":{"login":"APT-project","id":22332627,"avatar_url":"https://avatars.githubusercontent.com/u/22332627?v=3","gravatar_id":"","url":"https://api.github.com/users/APT-project","html_url":"https://github.com/APT-project","followers_url":"https://api.github.com/users/APT-project/followers","following_url":"https://api.github.com/users/APT-project/following{/other_user}","gists_url":"https://api.github.com/users/APT-project/gists{/gist_id}","starred_url":"https://api.github.com/users/APT-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/APT-project/subscriptions","organizations_url":"https://api.github.com/users/APT-project/orgs","repos_url":"https://api.github.com/users/APT-project/repos","events_url":"https://api.github.com/users/APT-project/events{/privacy}","received_events_url":"https://api.github.com/users/APT-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/APT-project/upcoming","description":"Upcoming Stops","fork":false,"url":"https://api.github.com/repos/APT-project/upcoming","forks_url":"https://api.github.com/repos/APT-project/upcoming/forks","keys_url":"https://api.github.com/repos/APT-project/upcoming/keys{/key_id}","collaborators_url":"https://api.github.com/repos/APT-project/upcoming/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/APT-project/upcoming/teams","hooks_url":"https://api.github.com/repos/APT-project/upcoming/hooks","issue_events_url":"https://api.github.com/repos/APT-project/upcoming/issues/events{/number}","events_url":"https://api.github.com/repos/APT-project/upcoming/events","assignees_url":"https://api.github.com/repos/APT-project/upcoming/assignees{/user}","branches_url":"https://api.github.com/repos/APT-project/upcoming/branches{/branch}","tags_url":"https://api.github.com/repos/APT-project/upcoming/tags","blobs_url":"https://api.github.com/repos/APT-project/upcoming/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/APT-project/upcoming/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/APT-project/upcoming/git/refs{/sha}","trees_url":"https://api.github.com/repos/APT-project/upcoming/git/trees{/sha}","statuses_url":"https://api.github.com/repos/APT-project/upcoming/statuses/{sha}","languages_url":"https://api.github.com/repos/APT-project/upcoming/languages","stargazers_url":"https://api.github.com/repos/APT-project/upcoming/stargazers","contributors_url":"https://api.github.com/repos/APT-project/upcoming/contributors","subscribers_url":"https://api.github.com/repos/APT-project/upcoming/subscribers","subscription_url":"https://api.github.com/repos/APT-project/upcoming/subscription","commits_url":"https://api.github.com/repos/APT-project/upcoming/commits{/sha}","git_commits_url":"https://api.github.com/repos/APT-project/upcoming/git/commits{/sha}","comments_url":"https://api.github.com/repos/APT-project/upcoming/comments{/number}","issue_comment_url":"https://api.github.com/repos/APT-project/upcoming/issues/comments{/number}","contents_url":"https://api.github.com/repos/APT-project/upcoming/contents/{+path}","compare_url":"https://api.github.com/repos/APT-project/upcoming/compare/{base}...{head}","merges_url":"https://api.github.com/repos/APT-project/upcoming/merges","archive_url":"https://api.github.com/repos/APT-project/upcoming/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/APT-project/upcoming/downloads","issues_url":"https://api.github.com/repos/APT-project/upcoming/issues{/number}","pulls_url":"https://api.github.com/repos/APT-project/upcoming/pulls{/number}","milestones_url":"https://api.github.com/repos/APT-project/upcoming/milestones{/number}","notifications_url":"https://api.github.com/repos/APT-project/upcoming/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/APT-project/upcoming/labels{/name}","releases_url":"https://api.github.com/repos/APT-project/upcoming/releases{/id}","deployments_url":"https://api.github.com/repos/APT-project/upcoming/deployments","created_at":"2016-10-02T11:41:21Z","updated_at":"2016-11-28T19:28:09Z","pushed_at":"2016-12-03T23:52:43Z","git_url":"git://github.com/APT-project/upcoming.git","ssh_url":"git@github.com:APT-project/upcoming.git","clone_url":"https://github.com/APT-project/upcoming.git","svn_url":"https://github.com/APT-project/upcoming","homepage":"","size":748,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/APT-project/upcoming/pulls/36"},"html":{"href":"https://github.com/APT-project/upcoming/pull/36"},"issue":{"href":"https://api.github.com/repos/APT-project/upcoming/issues/36"},"comments":{"href":"https://api.github.com/repos/APT-project/upcoming/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/APT-project/upcoming/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/APT-project/upcoming/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/APT-project/upcoming/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/APT-project/upcoming/statuses/eff8a80eba5910b5bea328c3a7335fc990b577b2"}}}}
{"actor":{"display_login":"Mxdcq"}}