{"action":"created","comment":{"url":"https://api.github.com/repos/twosigma/goll-e/pulls/comments/25900522","id":25900522,"diff_hunk":"@@ -0,0 +1,175 @@\n+/**\n+ * forceDirectedLayout.js\n+ *\n+ * This module contains logic for performing the force-directed layout\n+ * algorithm on a graph.\n+ *\n+ * @author John O'Brien.\n+ */\n+\n+var CardinalPortPosition = require('./../model/cardinalPortPosition');\n+var change = false;\n+//ideal length\n+var iLength = 500;\n+//force strength\n+var forceStr = 1 / 3;\n+//stretching force\n+var stretchForce = 0.70;\n+var vertices;\n+var mGraph;\n+\n+\n+//Based partially on https://code.google.com/p/jung/source/browse/branches/\n+//guava/jung/jung-algorithms/src/main/java/edu/uci/ics/jung/algorithms/\n+//layout/SpringLayout.java?r=19\n+\n+function layOutGraph(graph){","path":"lib/layout/forceDirectedLayout.js","position":26,"original_position":26,"commit_id":"25579fdec22a78c13262be9c538ec6a414d6ca1a","original_commit_id":"25579fdec22a78c13262be9c538ec6a414d6ca1a","user":{"login":"jboolean","id":406931,"avatar_url":"https://avatars.githubusercontent.com/u/406931?v=3","gravatar_id":"","url":"https://api.github.com/users/jboolean","html_url":"https://github.com/jboolean","followers_url":"https://api.github.com/users/jboolean/followers","following_url":"https://api.github.com/users/jboolean/following{/other_user}","gists_url":"https://api.github.com/users/jboolean/gists{/gist_id}","starred_url":"https://api.github.com/users/jboolean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jboolean/subscriptions","organizations_url":"https://api.github.com/users/jboolean/orgs","repos_url":"https://api.github.com/users/jboolean/repos","events_url":"https://api.github.com/users/jboolean/events{/privacy}","received_events_url":"https://api.github.com/users/jboolean/received_events","type":"User","site_admin":false},"body":"missing jsdoc","created_at":"2015-03-05T20:55:33Z","updated_at":"2015-03-05T20:55:33Z","html_url":"https://github.com/twosigma/goll-e/pull/27#discussion_r25900522","pull_request_url":"https://api.github.com/repos/twosigma/goll-e/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/comments/25900522"},"html":{"href":"https://github.com/twosigma/goll-e/pull/27#discussion_r25900522"},"pull_request":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/twosigma/goll-e/pulls/27","id":30524764,"html_url":"https://github.com/twosigma/goll-e/pull/27","diff_url":"https://github.com/twosigma/goll-e/pull/27.diff","patch_url":"https://github.com/twosigma/goll-e/pull/27.patch","issue_url":"https://api.github.com/repos/twosigma/goll-e/issues/27","number":27,"state":"open","locked":false,"title":"Force Directed Layout","user":{"login":"johnwobrien","id":1377204,"avatar_url":"https://avatars.githubusercontent.com/u/1377204?v=3","gravatar_id":"","url":"https://api.github.com/users/johnwobrien","html_url":"https://github.com/johnwobrien","followers_url":"https://api.github.com/users/johnwobrien/followers","following_url":"https://api.github.com/users/johnwobrien/following{/other_user}","gists_url":"https://api.github.com/users/johnwobrien/gists{/gist_id}","starred_url":"https://api.github.com/users/johnwobrien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnwobrien/subscriptions","organizations_url":"https://api.github.com/users/johnwobrien/orgs","repos_url":"https://api.github.com/users/johnwobrien/repos","events_url":"https://api.github.com/users/johnwobrien/events{/privacy}","received_events_url":"https://api.github.com/users/johnwobrien/received_events","type":"User","site_admin":false},"body":"Adds the force directed layout algorithm ","created_at":"2015-03-05T02:20:23Z","updated_at":"2015-03-05T20:55:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d3b393c518d1badec644cf28e4b4de100e085a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twosigma/goll-e/pulls/27/commits","review_comments_url":"https://api.github.com/repos/twosigma/goll-e/pulls/27/comments","review_comment_url":"https://api.github.com/repos/twosigma/goll-e/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twosigma/goll-e/issues/27/comments","statuses_url":"https://api.github.com/repos/twosigma/goll-e/statuses/25579fdec22a78c13262be9c538ec6a414d6ca1a","head":{"label":"twosigma:Layout","ref":"Layout","sha":"25579fdec22a78c13262be9c538ec6a414d6ca1a","user":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"repo":{"id":23775641,"name":"goll-e","full_name":"twosigma/goll-e","owner":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twosigma/goll-e","description":"Graph Object Language and Layout Editor","fork":false,"url":"https://api.github.com/repos/twosigma/goll-e","forks_url":"https://api.github.com/repos/twosigma/goll-e/forks","keys_url":"https://api.github.com/repos/twosigma/goll-e/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twosigma/goll-e/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twosigma/goll-e/teams","hooks_url":"https://api.github.com/repos/twosigma/goll-e/hooks","issue_events_url":"https://api.github.com/repos/twosigma/goll-e/issues/events{/number}","events_url":"https://api.github.com/repos/twosigma/goll-e/events","assignees_url":"https://api.github.com/repos/twosigma/goll-e/assignees{/user}","branches_url":"https://api.github.com/repos/twosigma/goll-e/branches{/branch}","tags_url":"https://api.github.com/repos/twosigma/goll-e/tags","blobs_url":"https://api.github.com/repos/twosigma/goll-e/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twosigma/goll-e/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twosigma/goll-e/git/refs{/sha}","trees_url":"https://api.github.com/repos/twosigma/goll-e/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twosigma/goll-e/statuses/{sha}","languages_url":"https://api.github.com/repos/twosigma/goll-e/languages","stargazers_url":"https://api.github.com/repos/twosigma/goll-e/stargazers","contributors_url":"https://api.github.com/repos/twosigma/goll-e/contributors","subscribers_url":"https://api.github.com/repos/twosigma/goll-e/subscribers","subscription_url":"https://api.github.com/repos/twosigma/goll-e/subscription","commits_url":"https://api.github.com/repos/twosigma/goll-e/commits{/sha}","git_commits_url":"https://api.github.com/repos/twosigma/goll-e/git/commits{/sha}","comments_url":"https://api.github.com/repos/twosigma/goll-e/comments{/number}","issue_comment_url":"https://api.github.com/repos/twosigma/goll-e/issues/comments{/number}","contents_url":"https://api.github.com/repos/twosigma/goll-e/contents/{+path}","compare_url":"https://api.github.com/repos/twosigma/goll-e/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twosigma/goll-e/merges","archive_url":"https://api.github.com/repos/twosigma/goll-e/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twosigma/goll-e/downloads","issues_url":"https://api.github.com/repos/twosigma/goll-e/issues{/number}","pulls_url":"https://api.github.com/repos/twosigma/goll-e/pulls{/number}","milestones_url":"https://api.github.com/repos/twosigma/goll-e/milestones{/number}","notifications_url":"https://api.github.com/repos/twosigma/goll-e/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twosigma/goll-e/labels{/name}","releases_url":"https://api.github.com/repos/twosigma/goll-e/releases{/id}","created_at":"2014-09-08T01:19:14Z","updated_at":"2014-10-02T14:48:36Z","pushed_at":"2015-03-05T05:50:30Z","git_url":"git://github.com/twosigma/goll-e.git","ssh_url":"git@github.com:twosigma/goll-e.git","clone_url":"https://github.com/twosigma/goll-e.git","svn_url":"https://github.com/twosigma/goll-e","homepage":null,"size":1765,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"twosigma:develop","ref":"develop","sha":"d2f304a682d929a04940d5ac78a6e15e31fadca4","user":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"repo":{"id":23775641,"name":"goll-e","full_name":"twosigma/goll-e","owner":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twosigma/goll-e","description":"Graph Object Language and Layout Editor","fork":false,"url":"https://api.github.com/repos/twosigma/goll-e","forks_url":"https://api.github.com/repos/twosigma/goll-e/forks","keys_url":"https://api.github.com/repos/twosigma/goll-e/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twosigma/goll-e/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twosigma/goll-e/teams","hooks_url":"https://api.github.com/repos/twosigma/goll-e/hooks","issue_events_url":"https://api.github.com/repos/twosigma/goll-e/issues/events{/number}","events_url":"https://api.github.com/repos/twosigma/goll-e/events","assignees_url":"https://api.github.com/repos/twosigma/goll-e/assignees{/user}","branches_url":"https://api.github.com/repos/twosigma/goll-e/branches{/branch}","tags_url":"https://api.github.com/repos/twosigma/goll-e/tags","blobs_url":"https://api.github.com/repos/twosigma/goll-e/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twosigma/goll-e/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twosigma/goll-e/git/refs{/sha}","trees_url":"https://api.github.com/repos/twosigma/goll-e/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twosigma/goll-e/statuses/{sha}","languages_url":"https://api.github.com/repos/twosigma/goll-e/languages","stargazers_url":"https://api.github.com/repos/twosigma/goll-e/stargazers","contributors_url":"https://api.github.com/repos/twosigma/goll-e/contributors","subscribers_url":"https://api.github.com/repos/twosigma/goll-e/subscribers","subscription_url":"https://api.github.com/repos/twosigma/goll-e/subscription","commits_url":"https://api.github.com/repos/twosigma/goll-e/commits{/sha}","git_commits_url":"https://api.github.com/repos/twosigma/goll-e/git/commits{/sha}","comments_url":"https://api.github.com/repos/twosigma/goll-e/comments{/number}","issue_comment_url":"https://api.github.com/repos/twosigma/goll-e/issues/comments{/number}","contents_url":"https://api.github.com/repos/twosigma/goll-e/contents/{+path}","compare_url":"https://api.github.com/repos/twosigma/goll-e/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twosigma/goll-e/merges","archive_url":"https://api.github.com/repos/twosigma/goll-e/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twosigma/goll-e/downloads","issues_url":"https://api.github.com/repos/twosigma/goll-e/issues{/number}","pulls_url":"https://api.github.com/repos/twosigma/goll-e/pulls{/number}","milestones_url":"https://api.github.com/repos/twosigma/goll-e/milestones{/number}","notifications_url":"https://api.github.com/repos/twosigma/goll-e/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twosigma/goll-e/labels{/name}","releases_url":"https://api.github.com/repos/twosigma/goll-e/releases{/id}","created_at":"2014-09-08T01:19:14Z","updated_at":"2014-10-02T14:48:36Z","pushed_at":"2015-03-05T05:50:30Z","git_url":"git://github.com/twosigma/goll-e.git","ssh_url":"git@github.com:twosigma/goll-e.git","clone_url":"https://github.com/twosigma/goll-e.git","svn_url":"https://github.com/twosigma/goll-e","homepage":null,"size":1765,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/27"},"html":{"href":"https://github.com/twosigma/goll-e/pull/27"},"issue":{"href":"https://api.github.com/repos/twosigma/goll-e/issues/27"},"comments":{"href":"https://api.github.com/repos/twosigma/goll-e/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/twosigma/goll-e/statuses/25579fdec22a78c13262be9c538ec6a414d6ca1a"}}}}