{"action":"created","comment":{"url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/comments/34813357","id":34813357,"diff_hunk":"@@ -44,6 +45,29 @@ module.exports = {\n     }\n };\n \n+function exitBuffer(oldValue, newValue) {\n+    if (oldValue === newValue) {\n+       // same object\n+       return true;\n+    } else if (_.isObject(oldValue) && _.isObject(newValue) && oldValue.id === newValue.id) {\n+        // Same id\n+        return true;\n+    } else if (!_.isObject(oldValue) && _.isObject(newValue)) {\n+        // Moving into a zone.\n+        return false;\n+    } else if (_.isObject(oldValue) && !_.isObject(newValue)) {\n+        // Maybe leaving a zone, first check the exit buffer to ensure\n+        // we don't leave because of a GPS glitch.\n+        if (oldValue.latLng.distanceTo(oldValue.currentPosition) <= oldValue.radius + 1) {","path":"src/js/questManager.js","position":25,"original_position":25,"commit_id":"47325427cefeaa3f7d68ea37629c069054c4f220","original_commit_id":"47325427cefeaa3f7d68ea37629c069054c4f220","user":{"login":"caseypt","id":1042475,"avatar_url":"https://avatars.githubusercontent.com/u/1042475?v=3","gravatar_id":"","url":"https://api.github.com/users/caseypt","html_url":"https://github.com/caseypt","followers_url":"https://api.github.com/users/caseypt/followers","following_url":"https://api.github.com/users/caseypt/following{/other_user}","gists_url":"https://api.github.com/users/caseypt/gists{/gist_id}","starred_url":"https://api.github.com/users/caseypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseypt/subscriptions","organizations_url":"https://api.github.com/users/caseypt/orgs","repos_url":"https://api.github.com/users/caseypt/repos","events_url":"https://api.github.com/users/caseypt/events{/privacy}","received_events_url":"https://api.github.com/users/caseypt/received_events","type":"User","site_admin":false},"body":"Consider pulling out this number to the top of the function.","created_at":"2015-07-16T17:21:48Z","updated_at":"2015-07-16T17:21:48Z","html_url":"https://github.com/azavea/pwd-waterworks-revealed/pull/122#discussion_r34813357","pull_request_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/122","_links":{"self":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/comments/34813357"},"html":{"href":"https://github.com/azavea/pwd-waterworks-revealed/pull/122#discussion_r34813357"},"pull_request":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/122"}}},"pull_request":{"url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/122","id":40152795,"html_url":"https://github.com/azavea/pwd-waterworks-revealed/pull/122","diff_url":"https://github.com/azavea/pwd-waterworks-revealed/pull/122.diff","patch_url":"https://github.com/azavea/pwd-waterworks-revealed/pull/122.patch","issue_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/issues/122","number":122,"state":"open","locked":false,"title":"Check an exit buffer when leaving zone.","user":{"login":"lliss","id":903219,"avatar_url":"https://avatars.githubusercontent.com/u/903219?v=3","gravatar_id":"","url":"https://api.github.com/users/lliss","html_url":"https://github.com/lliss","followers_url":"https://api.github.com/users/lliss/followers","following_url":"https://api.github.com/users/lliss/following{/other_user}","gists_url":"https://api.github.com/users/lliss/gists{/gist_id}","starred_url":"https://api.github.com/users/lliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lliss/subscriptions","organizations_url":"https://api.github.com/users/lliss/orgs","repos_url":"https://api.github.com/users/lliss/repos","events_url":"https://api.github.com/users/lliss/events{/privacy}","received_events_url":"https://api.github.com/users/lliss/received_events","type":"User","site_admin":false},"body":"Reduce false positives for zone change by creating an exit buffer of 1 meter\r\naround the zone radius. Don't really leave the zone unless we leave the buffer\r\nas well as the zone.","created_at":"2015-07-16T17:11:12Z","updated_at":"2015-07-16T17:21:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"deafb5ffaf796794ded936a1147fa9a7c5ad47c6","assignee":{"login":"caseypt","id":1042475,"avatar_url":"https://avatars.githubusercontent.com/u/1042475?v=3","gravatar_id":"","url":"https://api.github.com/users/caseypt","html_url":"https://github.com/caseypt","followers_url":"https://api.github.com/users/caseypt/followers","following_url":"https://api.github.com/users/caseypt/following{/other_user}","gists_url":"https://api.github.com/users/caseypt/gists{/gist_id}","starred_url":"https://api.github.com/users/caseypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseypt/subscriptions","organizations_url":"https://api.github.com/users/caseypt/orgs","repos_url":"https://api.github.com/users/caseypt/repos","events_url":"https://api.github.com/users/caseypt/events{/privacy}","received_events_url":"https://api.github.com/users/caseypt/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/122/commits","review_comments_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/122/comments","review_comment_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/issues/122/comments","statuses_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/statuses/47325427cefeaa3f7d68ea37629c069054c4f220","head":{"label":"lliss:feature/lol/zone-exit-buffer","ref":"feature/lol/zone-exit-buffer","sha":"47325427cefeaa3f7d68ea37629c069054c4f220","user":{"login":"lliss","id":903219,"avatar_url":"https://avatars.githubusercontent.com/u/903219?v=3","gravatar_id":"","url":"https://api.github.com/users/lliss","html_url":"https://github.com/lliss","followers_url":"https://api.github.com/users/lliss/followers","following_url":"https://api.github.com/users/lliss/following{/other_user}","gists_url":"https://api.github.com/users/lliss/gists{/gist_id}","starred_url":"https://api.github.com/users/lliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lliss/subscriptions","organizations_url":"https://api.github.com/users/lliss/orgs","repos_url":"https://api.github.com/users/lliss/repos","events_url":"https://api.github.com/users/lliss/events{/privacy}","received_events_url":"https://api.github.com/users/lliss/received_events","type":"User","site_admin":false},"repo":{"id":38754559,"name":"pwd-waterworks-revealed","full_name":"lliss/pwd-waterworks-revealed","owner":{"login":"lliss","id":903219,"avatar_url":"https://avatars.githubusercontent.com/u/903219?v=3","gravatar_id":"","url":"https://api.github.com/users/lliss","html_url":"https://github.com/lliss","followers_url":"https://api.github.com/users/lliss/followers","following_url":"https://api.github.com/users/lliss/following{/other_user}","gists_url":"https://api.github.com/users/lliss/gists{/gist_id}","starred_url":"https://api.github.com/users/lliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lliss/subscriptions","organizations_url":"https://api.github.com/users/lliss/orgs","repos_url":"https://api.github.com/users/lliss/repos","events_url":"https://api.github.com/users/lliss/events{/privacy}","received_events_url":"https://api.github.com/users/lliss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lliss/pwd-waterworks-revealed","description":"Prototype app to guide users on \"quests\" which reveal interesting things about the Fairmount Water Works (and perhaps ultimately other sites in Philly).","fork":true,"url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed","forks_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/forks","keys_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/teams","hooks_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/hooks","issue_events_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/issues/events{/number}","events_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/events","assignees_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/assignees{/user}","branches_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/branches{/branch}","tags_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/tags","blobs_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/git/refs{/sha}","trees_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/statuses/{sha}","languages_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/languages","stargazers_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/stargazers","contributors_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/contributors","subscribers_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/subscribers","subscription_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/subscription","commits_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/commits{/sha}","git_commits_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/git/commits{/sha}","comments_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/comments{/number}","issue_comment_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/issues/comments{/number}","contents_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/contents/{+path}","compare_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/merges","archive_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/downloads","issues_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/issues{/number}","pulls_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/pulls{/number}","milestones_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/milestones{/number}","notifications_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/labels{/name}","releases_url":"https://api.github.com/repos/lliss/pwd-waterworks-revealed/releases{/id}","created_at":"2015-07-08T13:06:44Z","updated_at":"2015-07-08T13:06:46Z","pushed_at":"2015-07-16T17:10:45Z","git_url":"git://github.com/lliss/pwd-waterworks-revealed.git","ssh_url":"git@github.com:lliss/pwd-waterworks-revealed.git","clone_url":"https://github.com/lliss/pwd-waterworks-revealed.git","svn_url":"https://github.com/lliss/pwd-waterworks-revealed","homepage":"","size":338970,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"azavea:master","ref":"master","sha":"859c381636009f1e69caaf017374cea8ba3c6dfa","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":19316316,"name":"pwd-waterworks-revealed","full_name":"azavea/pwd-waterworks-revealed","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/pwd-waterworks-revealed","description":"Prototype app to guide users on \"quests\" which reveal interesting things about the Fairmount Water Works (and perhaps ultimately other sites in Philly).","fork":false,"url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed","forks_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/forks","keys_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/teams","hooks_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/hooks","issue_events_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/events","assignees_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/tags","blobs_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/languages","stargazers_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/stargazers","contributors_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/contributors","subscribers_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/subscribers","subscription_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/subscription","commits_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/merges","archive_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/downloads","issues_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/labels{/name}","releases_url":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/releases{/id}","created_at":"2014-04-30T14:29:56Z","updated_at":"2015-06-18T15:11:45Z","pushed_at":"2015-07-16T17:11:12Z","git_url":"git://github.com/azavea/pwd-waterworks-revealed.git","ssh_url":"git@github.com:azavea/pwd-waterworks-revealed.git","clone_url":"https://github.com/azavea/pwd-waterworks-revealed.git","svn_url":"https://github.com/azavea/pwd-waterworks-revealed","homepage":"","size":388995,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/122"},"html":{"href":"https://github.com/azavea/pwd-waterworks-revealed/pull/122"},"issue":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/issues/122"},"comments":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/issues/122/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/122/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/pulls/122/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/pwd-waterworks-revealed/statuses/47325427cefeaa3f7d68ea37629c069054c4f220"}}}}