{"action":"created","comment":{"url":"https://api.github.com/repos/tgdwyer/WebCola/pulls/comments/30962329","id":30962329,"diff_hunk":"@@ -37,7 +37,7 @@ module cola {\n      */\n     export class Layout {\n         private _canvasSize = [1, 1];\n-        private _linkDistance: number | ((any) => number) = 20;","path":"WebCola/src/layout.ts","position":4,"original_position":4,"commit_id":"541e66a28c23069807064d1189cd33fed5cd0f09","original_commit_id":"541e66a28c23069807064d1189cd33fed5cd0f09","user":{"login":"tgdwyer","id":2754673,"avatar_url":"https://avatars.githubusercontent.com/u/2754673?v=3","gravatar_id":"","url":"https://api.github.com/users/tgdwyer","html_url":"https://github.com/tgdwyer","followers_url":"https://api.github.com/users/tgdwyer/followers","following_url":"https://api.github.com/users/tgdwyer/following{/other_user}","gists_url":"https://api.github.com/users/tgdwyer/gists{/gist_id}","starred_url":"https://api.github.com/users/tgdwyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgdwyer/subscriptions","organizations_url":"https://api.github.com/users/tgdwyer/orgs","repos_url":"https://api.github.com/users/tgdwyer/repos","events_url":"https://api.github.com/users/tgdwyer/events{/privacy}","received_events_url":"https://api.github.com/users/tgdwyer/received_events","type":"User","site_admin":false},"body":"good catch!","created_at":"2015-05-25T05:07:16Z","updated_at":"2015-05-25T05:07:16Z","html_url":"https://github.com/tgdwyer/WebCola/pull/108#discussion_r30962329","pull_request_url":"https://api.github.com/repos/tgdwyer/WebCola/pulls/108","_links":{"self":{"href":"https://api.github.com/repos/tgdwyer/WebCola/pulls/comments/30962329"},"html":{"href":"https://github.com/tgdwyer/WebCola/pull/108#discussion_r30962329"},"pull_request":{"href":"https://api.github.com/repos/tgdwyer/WebCola/pulls/108"}}},"pull_request":{"url":"https://api.github.com/repos/tgdwyer/WebCola/pulls/108","id":36108023,"html_url":"https://github.com/tgdwyer/WebCola/pull/108","diff_url":"https://github.com/tgdwyer/WebCola/pull/108.diff","patch_url":"https://github.com/tgdwyer/WebCola/pull/108.patch","issue_url":"https://api.github.com/repos/tgdwyer/WebCola/issues/108","number":108,"state":"open","locked":false,"title":"Add CommonJS support and external TypeScript definitions.","user":{"login":"jnetterf","id":4186708,"avatar_url":"https://avatars.githubusercontent.com/u/4186708?v=3","gravatar_id":"","url":"https://api.github.com/users/jnetterf","html_url":"https://github.com/jnetterf","followers_url":"https://api.github.com/users/jnetterf/followers","following_url":"https://api.github.com/users/jnetterf/following{/other_user}","gists_url":"https://api.github.com/users/jnetterf/gists{/gist_id}","starred_url":"https://api.github.com/users/jnetterf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnetterf/subscriptions","organizations_url":"https://api.github.com/users/jnetterf/orgs","repos_url":"https://api.github.com/users/jnetterf/repos","events_url":"https://api.github.com/users/jnetterf/events{/privacy}","received_events_url":"https://api.github.com/users/jnetterf/received_events","type":"User","site_admin":false},"body":"This allows projects in environments such as Node, Webpack, Browserify, and React Native to use WebCola. In addition, TypeScript projects will be able to add WebCola type definitions to their projects by running `tsd link` (requires tsd 0.6).\r\n\r\nThe goal of this PR is to be as **non-invasive** as possible. This PR adds CommonJS support with a single-line change to existing code (`rbtree.js`). If you prefer external modules, you could revisit [this strategy](https://github.com/tgdwyer/WebCola/pull/102) later, but it seems to me that internal modules are working quite well in this project.\r\n\r\n\r\n### Test Plan:\r\n\r\nI tested WebCola in one of my own projects by adding\r\n\r\n    \"dependencies\": {\r\n      \"webcola\": \"jnetterf/WebCola#commonjs\"\r\n    }\r\n\r\nto `package.json`, running `npm link` to link to my local copy of WebCola, and running `tsd link` to register WebCola's type definitions.\r\n\r\nI then opened up a file in Visual Studio Code for Mac, and tested the simplest thing I could think of:\r\n\r\n    import Cola = require(\"webcola\");\r\n    let a = new Cola.vpsc.Rectangle(0, 20, 0, 20);\r\n    let b = new Cola.vpsc.Rectangle(0.01, 20, 0, 20);\r\n    let c = [a,b];\r\n    Cola.vpsc.removeOverlaps(c);\r\n    console.log(c);\r\n\r\nIntelliSense was available while writing the Hello World test, and the test program ran in Node.","created_at":"2015-05-24T20:34:43Z","updated_at":"2015-05-25T05:07:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3382ef46bcea916a8547de8979468c6d6a6e41aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tgdwyer/WebCola/pulls/108/commits","review_comments_url":"https://api.github.com/repos/tgdwyer/WebCola/pulls/108/comments","review_comment_url":"https://api.github.com/repos/tgdwyer/WebCola/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tgdwyer/WebCola/issues/108/comments","statuses_url":"https://api.github.com/repos/tgdwyer/WebCola/statuses/541e66a28c23069807064d1189cd33fed5cd0f09","head":{"label":"jnetterf:commonjs_noendl","ref":"commonjs_noendl","sha":"541e66a28c23069807064d1189cd33fed5cd0f09","user":{"login":"jnetterf","id":4186708,"avatar_url":"https://avatars.githubusercontent.com/u/4186708?v=3","gravatar_id":"","url":"https://api.github.com/users/jnetterf","html_url":"https://github.com/jnetterf","followers_url":"https://api.github.com/users/jnetterf/followers","following_url":"https://api.github.com/users/jnetterf/following{/other_user}","gists_url":"https://api.github.com/users/jnetterf/gists{/gist_id}","starred_url":"https://api.github.com/users/jnetterf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnetterf/subscriptions","organizations_url":"https://api.github.com/users/jnetterf/orgs","repos_url":"https://api.github.com/users/jnetterf/repos","events_url":"https://api.github.com/users/jnetterf/events{/privacy}","received_events_url":"https://api.github.com/users/jnetterf/received_events","type":"User","site_admin":false},"repo":{"id":36185165,"name":"WebCola","full_name":"jnetterf/WebCola","owner":{"login":"jnetterf","id":4186708,"avatar_url":"https://avatars.githubusercontent.com/u/4186708?v=3","gravatar_id":"","url":"https://api.github.com/users/jnetterf","html_url":"https://github.com/jnetterf","followers_url":"https://api.github.com/users/jnetterf/followers","following_url":"https://api.github.com/users/jnetterf/following{/other_user}","gists_url":"https://api.github.com/users/jnetterf/gists{/gist_id}","starred_url":"https://api.github.com/users/jnetterf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnetterf/subscriptions","organizations_url":"https://api.github.com/users/jnetterf/orgs","repos_url":"https://api.github.com/users/jnetterf/repos","events_url":"https://api.github.com/users/jnetterf/events{/privacy}","received_events_url":"https://api.github.com/users/jnetterf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnetterf/WebCola","description":"Javascript constraint-based graph layout","fork":true,"url":"https://api.github.com/repos/jnetterf/WebCola","forks_url":"https://api.github.com/repos/jnetterf/WebCola/forks","keys_url":"https://api.github.com/repos/jnetterf/WebCola/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnetterf/WebCola/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnetterf/WebCola/teams","hooks_url":"https://api.github.com/repos/jnetterf/WebCola/hooks","issue_events_url":"https://api.github.com/repos/jnetterf/WebCola/issues/events{/number}","events_url":"https://api.github.com/repos/jnetterf/WebCola/events","assignees_url":"https://api.github.com/repos/jnetterf/WebCola/assignees{/user}","branches_url":"https://api.github.com/repos/jnetterf/WebCola/branches{/branch}","tags_url":"https://api.github.com/repos/jnetterf/WebCola/tags","blobs_url":"https://api.github.com/repos/jnetterf/WebCola/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnetterf/WebCola/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnetterf/WebCola/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnetterf/WebCola/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnetterf/WebCola/statuses/{sha}","languages_url":"https://api.github.com/repos/jnetterf/WebCola/languages","stargazers_url":"https://api.github.com/repos/jnetterf/WebCola/stargazers","contributors_url":"https://api.github.com/repos/jnetterf/WebCola/contributors","subscribers_url":"https://api.github.com/repos/jnetterf/WebCola/subscribers","subscription_url":"https://api.github.com/repos/jnetterf/WebCola/subscription","commits_url":"https://api.github.com/repos/jnetterf/WebCola/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnetterf/WebCola/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnetterf/WebCola/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnetterf/WebCola/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnetterf/WebCola/contents/{+path}","compare_url":"https://api.github.com/repos/jnetterf/WebCola/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnetterf/WebCola/merges","archive_url":"https://api.github.com/repos/jnetterf/WebCola/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnetterf/WebCola/downloads","issues_url":"https://api.github.com/repos/jnetterf/WebCola/issues{/number}","pulls_url":"https://api.github.com/repos/jnetterf/WebCola/pulls{/number}","milestones_url":"https://api.github.com/repos/jnetterf/WebCola/milestones{/number}","notifications_url":"https://api.github.com/repos/jnetterf/WebCola/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnetterf/WebCola/labels{/name}","releases_url":"https://api.github.com/repos/jnetterf/WebCola/releases{/id}","created_at":"2015-05-24T17:57:44Z","updated_at":"2015-05-24T17:57:45Z","pushed_at":"2015-05-24T20:18:13Z","git_url":"git://github.com/jnetterf/WebCola.git","ssh_url":"git@github.com:jnetterf/WebCola.git","clone_url":"https://github.com/jnetterf/WebCola.git","svn_url":"https://github.com/jnetterf/WebCola","homepage":"http://marvl.infotech.monash.edu/webcola/","size":28383,"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":"tgdwyer:master","ref":"master","sha":"a9fe85dcd6b4675ebcac6b8a2a0ef6abf955ff38","user":{"login":"tgdwyer","id":2754673,"avatar_url":"https://avatars.githubusercontent.com/u/2754673?v=3","gravatar_id":"","url":"https://api.github.com/users/tgdwyer","html_url":"https://github.com/tgdwyer","followers_url":"https://api.github.com/users/tgdwyer/followers","following_url":"https://api.github.com/users/tgdwyer/following{/other_user}","gists_url":"https://api.github.com/users/tgdwyer/gists{/gist_id}","starred_url":"https://api.github.com/users/tgdwyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgdwyer/subscriptions","organizations_url":"https://api.github.com/users/tgdwyer/orgs","repos_url":"https://api.github.com/users/tgdwyer/repos","events_url":"https://api.github.com/users/tgdwyer/events{/privacy}","received_events_url":"https://api.github.com/users/tgdwyer/received_events","type":"User","site_admin":false},"repo":{"id":11303445,"name":"WebCola","full_name":"tgdwyer/WebCola","owner":{"login":"tgdwyer","id":2754673,"avatar_url":"https://avatars.githubusercontent.com/u/2754673?v=3","gravatar_id":"","url":"https://api.github.com/users/tgdwyer","html_url":"https://github.com/tgdwyer","followers_url":"https://api.github.com/users/tgdwyer/followers","following_url":"https://api.github.com/users/tgdwyer/following{/other_user}","gists_url":"https://api.github.com/users/tgdwyer/gists{/gist_id}","starred_url":"https://api.github.com/users/tgdwyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgdwyer/subscriptions","organizations_url":"https://api.github.com/users/tgdwyer/orgs","repos_url":"https://api.github.com/users/tgdwyer/repos","events_url":"https://api.github.com/users/tgdwyer/events{/privacy}","received_events_url":"https://api.github.com/users/tgdwyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tgdwyer/WebCola","description":"Javascript constraint-based graph layout","fork":false,"url":"https://api.github.com/repos/tgdwyer/WebCola","forks_url":"https://api.github.com/repos/tgdwyer/WebCola/forks","keys_url":"https://api.github.com/repos/tgdwyer/WebCola/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgdwyer/WebCola/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgdwyer/WebCola/teams","hooks_url":"https://api.github.com/repos/tgdwyer/WebCola/hooks","issue_events_url":"https://api.github.com/repos/tgdwyer/WebCola/issues/events{/number}","events_url":"https://api.github.com/repos/tgdwyer/WebCola/events","assignees_url":"https://api.github.com/repos/tgdwyer/WebCola/assignees{/user}","branches_url":"https://api.github.com/repos/tgdwyer/WebCola/branches{/branch}","tags_url":"https://api.github.com/repos/tgdwyer/WebCola/tags","blobs_url":"https://api.github.com/repos/tgdwyer/WebCola/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgdwyer/WebCola/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgdwyer/WebCola/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgdwyer/WebCola/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgdwyer/WebCola/statuses/{sha}","languages_url":"https://api.github.com/repos/tgdwyer/WebCola/languages","stargazers_url":"https://api.github.com/repos/tgdwyer/WebCola/stargazers","contributors_url":"https://api.github.com/repos/tgdwyer/WebCola/contributors","subscribers_url":"https://api.github.com/repos/tgdwyer/WebCola/subscribers","subscription_url":"https://api.github.com/repos/tgdwyer/WebCola/subscription","commits_url":"https://api.github.com/repos/tgdwyer/WebCola/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgdwyer/WebCola/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgdwyer/WebCola/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgdwyer/WebCola/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgdwyer/WebCola/contents/{+path}","compare_url":"https://api.github.com/repos/tgdwyer/WebCola/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgdwyer/WebCola/merges","archive_url":"https://api.github.com/repos/tgdwyer/WebCola/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgdwyer/WebCola/downloads","issues_url":"https://api.github.com/repos/tgdwyer/WebCola/issues{/number}","pulls_url":"https://api.github.com/repos/tgdwyer/WebCola/pulls{/number}","milestones_url":"https://api.github.com/repos/tgdwyer/WebCola/milestones{/number}","notifications_url":"https://api.github.com/repos/tgdwyer/WebCola/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgdwyer/WebCola/labels{/name}","releases_url":"https://api.github.com/repos/tgdwyer/WebCola/releases{/id}","created_at":"2013-07-10T05:42:18Z","updated_at":"2015-05-24T07:09:58Z","pushed_at":"2015-05-24T20:34:45Z","git_url":"git://github.com/tgdwyer/WebCola.git","ssh_url":"git@github.com:tgdwyer/WebCola.git","clone_url":"https://github.com/tgdwyer/WebCola.git","svn_url":"https://github.com/tgdwyer/WebCola","homepage":"http://marvl.infotech.monash.edu/webcola/","size":28383,"stargazers_count":168,"watchers_count":168,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":12,"forks":51,"open_issues":12,"watchers":168,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tgdwyer/WebCola/pulls/108"},"html":{"href":"https://github.com/tgdwyer/WebCola/pull/108"},"issue":{"href":"https://api.github.com/repos/tgdwyer/WebCola/issues/108"},"comments":{"href":"https://api.github.com/repos/tgdwyer/WebCola/issues/108/comments"},"review_comments":{"href":"https://api.github.com/repos/tgdwyer/WebCola/pulls/108/comments"},"review_comment":{"href":"https://api.github.com/repos/tgdwyer/WebCola/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tgdwyer/WebCola/pulls/108/commits"},"statuses":{"href":"https://api.github.com/repos/tgdwyer/WebCola/statuses/541e66a28c23069807064d1189cd33fed5cd0f09"}}}}