payload: {"action":"closed","number":27,"pull_request":{"url":"https://api.github.com/repos/vasturiano/force-graph/pulls/27","id":278069524,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc4MDY5NTI0","html_url":"https://github.com/vasturiano/force-graph/pull/27","diff_url":"https://github.com/vasturiano/force-graph/pull/27.diff","patch_url":"https://github.com/vasturiano/force-graph/pull/27.patch","issue_url":"https://api.github.com/repos/vasturiano/force-graph/issues/27","number":27,"state":"closed","locked":false,"title":"Customize link and node drawing mode","user":{"login":"davidballester","id":1730892,"node_id":"MDQ6VXNlcjE3MzA4OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1730892?v=4","gravatar_id":"","url":"https://api.github.com/users/davidballester","html_url":"https://github.com/davidballester","followers_url":"https://api.github.com/users/davidballester/followers","following_url":"https://api.github.com/users/davidballester/following{/other_user}","gists_url":"https://api.github.com/users/davidballester/gists{/gist_id}","starred_url":"https://api.github.com/users/davidballester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidballester/subscriptions","organizations_url":"https://api.github.com/users/davidballester/orgs","repos_url":"https://api.github.com/users/davidballester/repos","events_url":"https://api.github.com/users/davidballester/events{/privacy}","received_events_url":"https://api.github.com/users/davidballester/received_events","type":"User","site_admin":false},"body":"**Previous behavior**\r\n\r\nIf the user specifies `linkCanvasObject` or `nodeCanvasObject`, they have to take care of all the drawing, without being able to take advantage of the built-in drawing mechanisms.\r\n\r\nFor instance, if they want to add a label to the node drawing, the only way to do it is create a `nodeCanvasObject` function that draws both the label and the node itself.\r\n\r\n**New behavior**\r\n\r\nThe user can specify if they want to replace the node or link drawing mechanism with their own or build on top of them. They can do so by specifying a string value for `linkCanvasObjectMode` and `nodeCanvasObjectMode`.\r\n\r\nThe default value is `replace`, so backward compatibility is ensured. With this option, no default drawing is applied, just `nodeCanvasObject` and `linkCanvasObject`.\r\n\r\nSetting the option to `before` will apply the custom drawing function first and then proceed with the default mechanism. \r\n\r\nSetting the option to `after` will apply the default mechanism and then the custom drawing function.\r\nIn the node + label example, the user can do it like this:\r\n\r\n```Javascript\r\nForceGraph()(elem)\r\n      .graphData(gData)\r\n      .nodeCanvasObjectMode('before')\r\n      .nodeCanvasObject((node, ctx) => {\r\n        if (highlightNodes.indexOf(node) !== -1) { // add ring\r\n          ctx.beginPath();\r\n          ctx.arc(node.x, node.y, NODE_R * 1.4, 0, 2 * Math.PI, false);\r\n          ctx.fillStyle = 'red';\r\n          ctx.fill();\r\n        }\r\n      });\r\n```\r\n\r\n**Other information**\r\n\r\nBased on issue #26.","created_at":"2019-05-12T17:50:53Z","updated_at":"2019-05-27T20:56:47Z","closed_at":"2019-05-27T20:56:47Z","merged_at":"2019-05-27T20:56:47Z","merge_commit_sha":"ea5169b01e0f392e998cb1659e2c51c788ffaf80","assignee":{"login":"vasturiano","id":6784226,"node_id":"MDQ6VXNlcjY3ODQyMjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6784226?v=4","gravatar_id":"","url":"https://api.github.com/users/vasturiano","html_url":"https://github.com/vasturiano","followers_url":"https://api.github.com/users/vasturiano/followers","following_url":"https://api.github.com/users/vasturiano/following{/other_user}","gists_url":"https://api.github.com/users/vasturiano/gists{/gist_id}","starred_url":"https://api.github.com/users/vasturiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasturiano/subscriptions","organizations_url":"https://api.github.com/users/vasturiano/orgs","repos_url":"https://api.github.com/users/vasturiano/repos","events_url":"https://api.github.com/users/vasturiano/events{/privacy}","received_events_url":"https://api.github.com/users/vasturiano/received_events","type":"User","site_admin":false},"assignees":[{"login":"vasturiano","id":6784226,"node_id":"MDQ6VXNlcjY3ODQyMjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6784226?v=4","gravatar_id":"","url":"https://api.github.com/users/vasturiano","html_url":"https://github.com/vasturiano","followers_url":"https://api.github.com/users/vasturiano/followers","following_url":"https://api.github.com/users/vasturiano/following{/other_user}","gists_url":"https://api.github.com/users/vasturiano/gists{/gist_id}","starred_url":"https://api.github.com/users/vasturiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasturiano/subscriptions","organizations_url":"https://api.github.com/users/vasturiano/orgs","repos_url":"https://api.github.com/users/vasturiano/repos","events_url":"https://api.github.com/users/vasturiano/events{/privacy}","received_events_url":"https://api.github.com/users/vasturiano/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vasturiano/force-graph/pulls/27/commits","review_comments_url":"https://api.github.com/repos/vasturiano/force-graph/pulls/27/comments","review_comment_url":"https://api.github.com/repos/vasturiano/force-graph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vasturiano/force-graph/issues/27/comments","statuses_url":"https://api.github.com/repos/vasturiano/force-graph/statuses/422a5581df0cbe7c0a66faaaa91fd54b60f403c8","head":{"label":"davidballester:customize_link_and_node_drawing_mode","ref":"customize_link_and_node_drawing_mode","sha":"422a5581df0cbe7c0a66faaaa91fd54b60f403c8","user":{"login":"davidballester","id":1730892,"node_id":"MDQ6VXNlcjE3MzA4OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1730892?v=4","gravatar_id":"","url":"https://api.github.com/users/davidballester","html_url":"https://github.com/davidballester","followers_url":"https://api.github.com/users/davidballester/followers","following_url":"https://api.github.com/users/davidballester/following{/other_user}","gists_url":"https://api.github.com/users/davidballester/gists{/gist_id}","starred_url":"https://api.github.com/users/davidballester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidballester/subscriptions","organizations_url":"https://api.github.com/users/davidballester/orgs","repos_url":"https://api.github.com/users/davidballester/repos","events_url":"https://api.github.com/users/davidballester/events{/privacy}","received_events_url":"https://api.github.com/users/davidballester/received_events","type":"User","site_admin":false},"repo":{"id":186236823,"node_id":"MDEwOlJlcG9zaXRvcnkxODYyMzY4MjM=","name":"force-graph","full_name":"davidballester/force-graph","private":false,"owner":{"login":"davidballester","id":1730892,"node_id":"MDQ6VXNlcjE3MzA4OTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1730892?v=4","gravatar_id":"","url":"https://api.github.com/users/davidballester","html_url":"https://github.com/davidballester","followers_url":"https://api.github.com/users/davidballester/followers","following_url":"https://api.github.com/users/davidballester/following{/other_user}","gists_url":"https://api.github.com/users/davidballester/gists{/gist_id}","starred_url":"https://api.github.com/users/davidballester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidballester/subscriptions","organizations_url":"https://api.github.com/users/davidballester/orgs","repos_url":"https://api.github.com/users/davidballester/repos","events_url":"https://api.github.com/users/davidballester/events{/privacy}","received_events_url":"https://api.github.com/users/davidballester/received_events","type":"User","site_admin":false},"html_url":"https://github.com/davidballester/force-graph","description":"Force-directed graph rendered on HTML5 canvas","fork":true,"url":"https://api.github.com/repos/davidballester/force-graph","forks_url":"https://api.github.com/repos/davidballester/force-graph/forks","keys_url":"https://api.github.com/repos/davidballester/force-graph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidballester/force-graph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidballester/force-graph/teams","hooks_url":"https://api.github.com/repos/davidballester/force-graph/hooks","issue_events_url":"https://api.github.com/repos/davidballester/force-graph/issues/events{/number}","events_url":"https://api.github.com/repos/davidballester/force-graph/events","assignees_url":"https://api.github.com/repos/davidballester/force-graph/assignees{/user}","branches_url":"https://api.github.com/repos/davidballester/force-graph/branches{/branch}","tags_url":"https://api.github.com/repos/davidballester/force-graph/tags","blobs_url":"https://api.github.com/repos/davidballester/force-graph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidballester/force-graph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidballester/force-graph/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidballester/force-graph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidballester/force-graph/statuses/{sha}","languages_url":"https://api.github.com/repos/davidballester/force-graph/languages","stargazers_url":"https://api.github.com/repos/davidballester/force-graph/stargazers","contributors_url":"https://api.github.com/repos/davidballester/force-graph/contributors","subscribers_url":"https://api.github.com/repos/davidballester/force-graph/subscribers","subscription_url":"https://api.github.com/repos/davidballester/force-graph/subscription","commits_url":"https://api.github.com/repos/davidballester/force-graph/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidballester/force-graph/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidballester/force-graph/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidballester/force-graph/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidballester/force-graph/contents/{+path}","compare_url":"https://api.github.com/repos/davidballester/force-graph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidballester/force-graph/merges","archive_url":"https://api.github.com/repos/davidballester/force-graph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidballester/force-graph/downloads","issues_url":"https://api.github.com/repos/davidballester/force-graph/issues{/number}","pulls_url":"https://api.github.com/repos/davidballester/force-graph/pulls{/number}","milestones_url":"https://api.github.com/repos/davidballester/force-graph/milestones{/number}","notifications_url":"https://api.github.com/repos/davidballester/force-graph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidballester/force-graph/labels{/name}","releases_url":"https://api.github.com/repos/davidballester/force-graph/releases{/id}","deployments_url":"https://api.github.com/repos/davidballester/force-graph/deployments","created_at":"2019-05-12T09:46:24Z","updated_at":"2019-05-12T09:46:26Z","pushed_at":"2019-05-27T20:54:08Z","git_url":"git://github.com/davidballester/force-graph.git","ssh_url":"git@github.com:davidballester/force-graph.git","clone_url":"https://github.com/davidballester/force-graph.git","svn_url":"https://github.com/davidballester/force-graph","homepage":"https://vasturiano.github.io/force-graph/example/directional-links-particles/","size":1706,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vasturiano:master","ref":"master","sha":"f8a6f80bd0d2bf5fe317fc63f2902c082aec4378","user":{"login":"vasturiano","id":6784226,"node_id":"MDQ6VXNlcjY3ODQyMjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6784226?v=4","gravatar_id":"","url":"https://api.github.com/users/vasturiano","html_url":"https://github.com/vasturiano","followers_url":"https://api.github.com/users/vasturiano/followers","following_url":"https://api.github.com/users/vasturiano/following{/other_user}","gists_url":"https://api.github.com/users/vasturiano/gists{/gist_id}","starred_url":"https://api.github.com/users/vasturiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasturiano/subscriptions","organizations_url":"https://api.github.com/users/vasturiano/orgs","repos_url":"https://api.github.com/users/vasturiano/repos","events_url":"https://api.github.com/users/vasturiano/events{/privacy}","received_events_url":"https://api.github.com/users/vasturiano/received_events","type":"User","site_admin":false},"repo":{"id":122945974,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI5NDU5NzQ=","name":"force-graph","full_name":"vasturiano/force-graph","private":false,"owner":{"login":"vasturiano","id":6784226,"node_id":"MDQ6VXNlcjY3ODQyMjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6784226?v=4","gravatar_id":"","url":"https://api.github.com/users/vasturiano","html_url":"https://github.com/vasturiano","followers_url":"https://api.github.com/users/vasturiano/followers","following_url":"https://api.github.com/users/vasturiano/following{/other_user}","gists_url":"https://api.github.com/users/vasturiano/gists{/gist_id}","starred_url":"https://api.github.com/users/vasturiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasturiano/subscriptions","organizations_url":"https://api.github.com/users/vasturiano/orgs","repos_url":"https://api.github.com/users/vasturiano/repos","events_url":"https://api.github.com/users/vasturiano/events{/privacy}","received_events_url":"https://api.github.com/users/vasturiano/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vasturiano/force-graph","description":"Force-directed graph rendered on HTML5 canvas","fork":false,"url":"https://api.github.com/repos/vasturiano/force-graph","forks_url":"https://api.github.com/repos/vasturiano/force-graph/forks","keys_url":"https://api.github.com/repos/vasturiano/force-graph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vasturiano/force-graph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vasturiano/force-graph/teams","hooks_url":"https://api.github.com/repos/vasturiano/force-graph/hooks","issue_events_url":"https://api.github.com/repos/vasturiano/force-graph/issues/events{/number}","events_url":"https://api.github.com/repos/vasturiano/force-graph/events","assignees_url":"https://api.github.com/repos/vasturiano/force-graph/assignees{/user}","branches_url":"https://api.github.com/repos/vasturiano/force-graph/branches{/branch}","tags_url":"https://api.github.com/repos/vasturiano/force-graph/tags","blobs_url":"https://api.github.com/repos/vasturiano/force-graph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vasturiano/force-graph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vasturiano/force-graph/git/refs{/sha}","trees_url":"https://api.github.com/repos/vasturiano/force-graph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vasturiano/force-graph/statuses/{sha}","languages_url":"https://api.github.com/repos/vasturiano/force-graph/languages","stargazers_url":"https://api.github.com/repos/vasturiano/force-graph/stargazers","contributors_url":"https://api.github.com/repos/vasturiano/force-graph/contributors","subscribers_url":"https://api.github.com/repos/vasturiano/force-graph/subscribers","subscription_url":"https://api.github.com/repos/vasturiano/force-graph/subscription","commits_url":"https://api.github.com/repos/vasturiano/force-graph/commits{/sha}","git_commits_url":"https://api.github.com/repos/vasturiano/force-graph/git/commits{/sha}","comments_url":"https://api.github.com/repos/vasturiano/force-graph/comments{/number}","issue_comment_url":"https://api.github.com/repos/vasturiano/force-graph/issues/comments{/number}","contents_url":"https://api.github.com/repos/vasturiano/force-graph/contents/{+path}","compare_url":"https://api.github.com/repos/vasturiano/force-graph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vasturiano/force-graph/merges","archive_url":"https://api.github.com/repos/vasturiano/force-graph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vasturiano/force-graph/downloads","issues_url":"https://api.github.com/repos/vasturiano/force-graph/issues{/number}","pulls_url":"https://api.github.com/repos/vasturiano/force-graph/pulls{/number}","milestones_url":"https://api.github.com/repos/vasturiano/force-graph/milestones{/number}","notifications_url":"https://api.github.com/repos/vasturiano/force-graph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vasturiano/force-graph/labels{/name}","releases_url":"https://api.github.com/repos/vasturiano/force-graph/releases{/id}","deployments_url":"https://api.github.com/repos/vasturiano/force-graph/deployments","created_at":"2018-02-26T09:29:30Z","updated_at":"2019-05-26T19:53:50Z","pushed_at":"2019-05-27T20:56:47Z","git_url":"git://github.com/vasturiano/force-graph.git","ssh_url":"git@github.com:vasturiano/force-graph.git","clone_url":"https://github.com/vasturiano/force-graph.git","svn_url":"https://github.com/vasturiano/force-graph","homepage":"https://vasturiano.github.io/force-graph/example/directional-links-particles/","size":1655,"stargazers_count":92,"watchers_count":92,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":26,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":26,"open_issues":18,"watchers":92,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vasturiano/force-graph/pulls/27"},"html":{"href":"https://github.com/vasturiano/force-graph/pull/27"},"issue":{"href":"https://api.github.com/repos/vasturiano/force-graph/issues/27"},"comments":{"href":"https://api.github.com/repos/vasturiano/force-graph/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/vasturiano/force-graph/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/vasturiano/force-graph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vasturiano/force-graph/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/vasturiano/force-graph/statuses/422a5581df0cbe7c0a66faaaa91fd54b60f403c8"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"vasturiano","id":6784226,"node_id":"MDQ6VXNlcjY3ODQyMjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6784226?v=4","gravatar_id":"","url":"https://api.github.com/users/vasturiano","html_url":"https://github.com/vasturiano","followers_url":"https://api.github.com/users/vasturiano/followers","following_url":"https://api.github.com/users/vasturiano/following{/other_user}","gists_url":"https://api.github.com/users/vasturiano/gists{/gist_id}","starred_url":"https://api.github.com/users/vasturiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasturiano/subscriptions","organizations_url":"https://api.github.com/users/vasturiano/orgs","repos_url":"https://api.github.com/users/vasturiano/repos","events_url":"https://api.github.com/users/vasturiano/events{/privacy}","received_events_url":"https://api.github.com/users/vasturiano/received_events","type":"User","site_admin":false},"comments":3,"review_comments":15,"maintainer_can_modify":false,"commits":10,"additions":95,"deletions":28,"changed_files":6}}
other: {"actor":{"display_login":"vasturiano"}}