{"action":"created","comment":{"url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/comments/124956620","pull_request_review_id":47298722,"id":124956620,"diff_hunk":"@@ -19,8 +19,20 @@ module.exports = function Interface (options) {\n \n   panMapWhenInputsChange();\n \n+  function onDrag() {\n+    function changeVal(result) {\n+      $(\"#location\").val(result.results[0].formatted_address);\n+    }\n+    options.map.on('moveend', function(e) {\n+     options.getPlacenameFromCoordinates(options.getLat(), options.getLon(), changeVal)","path":"src/ui/Interface.js","position":9,"original_position":9,"commit_id":"ce61d5a7bd2a4458d659ee120b355efc7f7d94e6","original_commit_id":"ce61d5a7bd2a4458d659ee120b355efc7f7d94e6","user":{"login":"jywarren","id":24359,"avatar_url":"https://avatars2.githubusercontent.com/u/24359?v=3","gravatar_id":"","url":"https://api.github.com/users/jywarren","html_url":"https://github.com/jywarren","followers_url":"https://api.github.com/users/jywarren/followers","following_url":"https://api.github.com/users/jywarren/following{/other_user}","gists_url":"https://api.github.com/users/jywarren/gists{/gist_id}","starred_url":"https://api.github.com/users/jywarren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jywarren/subscriptions","organizations_url":"https://api.github.com/users/jywarren/orgs","repos_url":"https://api.github.com/users/jywarren/repos","events_url":"https://api.github.com/users/jywarren/events{/privacy}","received_events_url":"https://api.github.com/users/jywarren/received_events","type":"User","site_admin":false},"body":"Actually the content of this function IS onDrag, and the event listener should be set up in the construction of the class, on startup. That way you can set the behavior that runs upon dragging, as an option. The default should be what's here, but you can override it via the options. Does that make sense? So `options.onDrag = options.onDrag || function onDrag(event) { ...this line here... }`","created_at":"2017-06-30T03:07:30Z","updated_at":"2017-06-30T03:07:37Z","html_url":"https://github.com/publiclab/leaflet-blurred-location/pull/48#discussion_r124956620","pull_request_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/comments/124956620"},"html":{"href":"https://github.com/publiclab/leaflet-blurred-location/pull/48#discussion_r124956620"},"pull_request":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/48","id":128269640,"html_url":"https://github.com/publiclab/leaflet-blurred-location/pull/48","diff_url":"https://github.com/publiclab/leaflet-blurred-location/pull/48.diff","patch_url":"https://github.com/publiclab/leaflet-blurred-location/pull/48.patch","issue_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/issues/48","number":48,"state":"open","locked":false,"title":"onDrag method added","user":{"login":"mridulnagpal","id":22350740,"avatar_url":"https://avatars1.githubusercontent.com/u/22350740?v=3","gravatar_id":"","url":"https://api.github.com/users/mridulnagpal","html_url":"https://github.com/mridulnagpal","followers_url":"https://api.github.com/users/mridulnagpal/followers","following_url":"https://api.github.com/users/mridulnagpal/following{/other_user}","gists_url":"https://api.github.com/users/mridulnagpal/gists{/gist_id}","starred_url":"https://api.github.com/users/mridulnagpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mridulnagpal/subscriptions","organizations_url":"https://api.github.com/users/mridulnagpal/orgs","repos_url":"https://api.github.com/users/mridulnagpal/repos","events_url":"https://api.github.com/users/mridulnagpal/events{/privacy}","received_events_url":"https://api.github.com/users/mridulnagpal/received_events","type":"User","site_admin":false},"body":"closes #20 ","created_at":"2017-06-29T23:42:29Z","updated_at":"2017-06-30T03:07:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d096d801d7fe5702e57948de34de71439e9e3ac","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/48/commits","review_comments_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/48/comments","review_comment_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/comments{/number}","comments_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/issues/48/comments","statuses_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/statuses/ce61d5a7bd2a4458d659ee120b355efc7f7d94e6","head":{"label":"mridulnagpal:onDrag-method","ref":"onDrag-method","sha":"ce61d5a7bd2a4458d659ee120b355efc7f7d94e6","user":{"login":"mridulnagpal","id":22350740,"avatar_url":"https://avatars1.githubusercontent.com/u/22350740?v=3","gravatar_id":"","url":"https://api.github.com/users/mridulnagpal","html_url":"https://github.com/mridulnagpal","followers_url":"https://api.github.com/users/mridulnagpal/followers","following_url":"https://api.github.com/users/mridulnagpal/following{/other_user}","gists_url":"https://api.github.com/users/mridulnagpal/gists{/gist_id}","starred_url":"https://api.github.com/users/mridulnagpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mridulnagpal/subscriptions","organizations_url":"https://api.github.com/users/mridulnagpal/orgs","repos_url":"https://api.github.com/users/mridulnagpal/repos","events_url":"https://api.github.com/users/mridulnagpal/events{/privacy}","received_events_url":"https://api.github.com/users/mridulnagpal/received_events","type":"User","site_admin":false},"repo":{"id":91307135,"name":"leaflet-blurred-location","full_name":"mridulnagpal/leaflet-blurred-location","owner":{"login":"mridulnagpal","id":22350740,"avatar_url":"https://avatars1.githubusercontent.com/u/22350740?v=3","gravatar_id":"","url":"https://api.github.com/users/mridulnagpal","html_url":"https://github.com/mridulnagpal","followers_url":"https://api.github.com/users/mridulnagpal/followers","following_url":"https://api.github.com/users/mridulnagpal/following{/other_user}","gists_url":"https://api.github.com/users/mridulnagpal/gists{/gist_id}","starred_url":"https://api.github.com/users/mridulnagpal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mridulnagpal/subscriptions","organizations_url":"https://api.github.com/users/mridulnagpal/orgs","repos_url":"https://api.github.com/users/mridulnagpal/repos","events_url":"https://api.github.com/users/mridulnagpal/events{/privacy}","received_events_url":"https://api.github.com/users/mridulnagpal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mridulnagpal/leaflet-blurred-location","description":"A Leaflet-based interface for selecting a \"blurred\" or low-resolution location, to preserve privacy","fork":true,"url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location","forks_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/forks","keys_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/teams","hooks_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/hooks","issue_events_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/issues/events{/number}","events_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/events","assignees_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/assignees{/user}","branches_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/branches{/branch}","tags_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/tags","blobs_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/git/refs{/sha}","trees_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/statuses/{sha}","languages_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/languages","stargazers_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/stargazers","contributors_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/contributors","subscribers_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/subscribers","subscription_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/subscription","commits_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/commits{/sha}","git_commits_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/git/commits{/sha}","comments_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/comments{/number}","issue_comment_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/issues/comments{/number}","contents_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/contents/{+path}","compare_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/merges","archive_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/downloads","issues_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/issues{/number}","pulls_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/pulls{/number}","milestones_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/milestones{/number}","notifications_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/labels{/name}","releases_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/releases{/id}","deployments_url":"https://api.github.com/repos/mridulnagpal/leaflet-blurred-location/deployments","created_at":"2017-05-15T07:21:13Z","updated_at":"2017-05-15T07:26:33Z","pushed_at":"2017-06-29T23:53:56Z","git_url":"git://github.com/mridulnagpal/leaflet-blurred-location.git","ssh_url":"git@github.com:mridulnagpal/leaflet-blurred-location.git","clone_url":"https://github.com/mridulnagpal/leaflet-blurred-location.git","svn_url":"https://github.com/mridulnagpal/leaflet-blurred-location","homepage":null,"size":24858,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"publiclab:master","ref":"master","sha":"0f2463a95c15fa13abdc84ffb8fb994c376b98fa","user":{"login":"publiclab","id":4621650,"avatar_url":"https://avatars0.githubusercontent.com/u/4621650?v=3","gravatar_id":"","url":"https://api.github.com/users/publiclab","html_url":"https://github.com/publiclab","followers_url":"https://api.github.com/users/publiclab/followers","following_url":"https://api.github.com/users/publiclab/following{/other_user}","gists_url":"https://api.github.com/users/publiclab/gists{/gist_id}","starred_url":"https://api.github.com/users/publiclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/publiclab/subscriptions","organizations_url":"https://api.github.com/users/publiclab/orgs","repos_url":"https://api.github.com/users/publiclab/repos","events_url":"https://api.github.com/users/publiclab/events{/privacy}","received_events_url":"https://api.github.com/users/publiclab/received_events","type":"Organization","site_admin":false},"repo":{"id":91003114,"name":"leaflet-blurred-location","full_name":"publiclab/leaflet-blurred-location","owner":{"login":"publiclab","id":4621650,"avatar_url":"https://avatars0.githubusercontent.com/u/4621650?v=3","gravatar_id":"","url":"https://api.github.com/users/publiclab","html_url":"https://github.com/publiclab","followers_url":"https://api.github.com/users/publiclab/followers","following_url":"https://api.github.com/users/publiclab/following{/other_user}","gists_url":"https://api.github.com/users/publiclab/gists{/gist_id}","starred_url":"https://api.github.com/users/publiclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/publiclab/subscriptions","organizations_url":"https://api.github.com/users/publiclab/orgs","repos_url":"https://api.github.com/users/publiclab/repos","events_url":"https://api.github.com/users/publiclab/events{/privacy}","received_events_url":"https://api.github.com/users/publiclab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/publiclab/leaflet-blurred-location","description":"A Leaflet-based interface for selecting a \"blurred\" or low-resolution location, to preserve privacy","fork":false,"url":"https://api.github.com/repos/publiclab/leaflet-blurred-location","forks_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/forks","keys_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/keys{/key_id}","collaborators_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/teams","hooks_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/hooks","issue_events_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/issues/events{/number}","events_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/events","assignees_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/assignees{/user}","branches_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/branches{/branch}","tags_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/tags","blobs_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/git/refs{/sha}","trees_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/git/trees{/sha}","statuses_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/statuses/{sha}","languages_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/languages","stargazers_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/stargazers","contributors_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/contributors","subscribers_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/subscribers","subscription_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/subscription","commits_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/commits{/sha}","git_commits_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/git/commits{/sha}","comments_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/comments{/number}","issue_comment_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/issues/comments{/number}","contents_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/contents/{+path}","compare_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/compare/{base}...{head}","merges_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/merges","archive_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/downloads","issues_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/issues{/number}","pulls_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls{/number}","milestones_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/milestones{/number}","notifications_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/labels{/name}","releases_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/releases{/id}","deployments_url":"https://api.github.com/repos/publiclab/leaflet-blurred-location/deployments","created_at":"2017-05-11T16:57:00Z","updated_at":"2017-05-25T20:52:03Z","pushed_at":"2017-06-29T23:53:57Z","git_url":"git://github.com/publiclab/leaflet-blurred-location.git","ssh_url":"git@github.com:publiclab/leaflet-blurred-location.git","clone_url":"https://github.com/publiclab/leaflet-blurred-location.git","svn_url":"https://github.com/publiclab/leaflet-blurred-location","homepage":"https://publiclab.github.io/leaflet-blurred-location/examples/","size":11649,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":11,"forks":5,"open_issues":11,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/48"},"html":{"href":"https://github.com/publiclab/leaflet-blurred-location/pull/48"},"issue":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/issues/48"},"comments":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/publiclab/leaflet-blurred-location/statuses/ce61d5a7bd2a4458d659ee120b355efc7f7d94e6"}}}}
{"actor":{"display_login":"jywarren"}}