{"action":"created","comment":{"url":"https://api.github.com/repos/Courseography/courseography/pulls/comments/65397830","id":65397830,"diff_hunk":"@@ -305,11 +311,111 @@ var Graph = React.createClass({\n         );\n     },\n \n+    incrementZoom: function(increase) {\n+        if (increase) {\n+            if (this.state.zoomFactor > 0.5) {\n+                this.setState({zoomFactor: this.state.zoomFactor - 0.05});\n+            }\n+        } else {\n+            if (this.state.zoomFactor < 1.1) {\n+                this.setState({zoomFactor: this.state.zoomFactor + 0.05});\n+            }\n+        }\n+    },\n+\n+    panDirection: function(direction) {\n+\n+        // initial calculation for poisition of each edge\n+        // bottom and right edges require further calculation performed below\n+        var topEdge = -(this.state.verticalPanFactor);\n+        var leftEdge = -(this.state.horizontalPanFactor);\n+        var bottomEdge = (this.state.height - this.state.verticalPanFactor) / this.state.zoomFactor;\n+        var rightEdge = (this.state.width - this.state.horizontalPanFactor) / this.state.zoomFactor;\n+\n+        // size of container\n+        var containerWidth = document.getElementById(\"react-graph\").clientWidth;\n+        var containerHeight = document.getElementById(\"react-graph\").clientHeight;\n+        \n+        // if the graph does not fit in it's container, it is resized by the inverse factor\n+        // of the greater of these two ratios.\n+        var autoResizeFactor;\n+        var heightToContainerRatio = this.state.height / containerHeight;\n+        var widthToContainerRatio = this.state.width /containerWidth;","path":"public/js/graph/react_graph.js","position":55,"original_position":55,"commit_id":"02f3f6478e38e5164156a0bda8c77b3dde597eb9","original_commit_id":"02f3f6478e38e5164156a0bda8c77b3dde597eb9","user":{"login":"david-yz-liu","id":3333115,"avatar_url":"https://avatars.githubusercontent.com/u/3333115?v=3","gravatar_id":"","url":"https://api.github.com/users/david-yz-liu","html_url":"https://github.com/david-yz-liu","followers_url":"https://api.github.com/users/david-yz-liu/followers","following_url":"https://api.github.com/users/david-yz-liu/following{/other_user}","gists_url":"https://api.github.com/users/david-yz-liu/gists{/gist_id}","starred_url":"https://api.github.com/users/david-yz-liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-yz-liu/subscriptions","organizations_url":"https://api.github.com/users/david-yz-liu/orgs","repos_url":"https://api.github.com/users/david-yz-liu/repos","events_url":"https://api.github.com/users/david-yz-liu/events{/privacy}","received_events_url":"https://api.github.com/users/david-yz-liu/received_events","type":"User","site_admin":false},"body":"Put a space after the `/`","created_at":"2016-06-01T16:41:43Z","updated_at":"2016-06-01T16:41:43Z","html_url":"https://github.com/Courseography/courseography/pull/837#discussion_r65397830","pull_request_url":"https://api.github.com/repos/Courseography/courseography/pulls/837","_links":{"self":{"href":"https://api.github.com/repos/Courseography/courseography/pulls/comments/65397830"},"html":{"href":"https://github.com/Courseography/courseography/pull/837#discussion_r65397830"},"pull_request":{"href":"https://api.github.com/repos/Courseography/courseography/pulls/837"}}},"pull_request":{"url":"https://api.github.com/repos/Courseography/courseography/pulls/837","id":70563179,"html_url":"https://github.com/Courseography/courseography/pull/837","diff_url":"https://github.com/Courseography/courseography/pull/837.diff","patch_url":"https://github.com/Courseography/courseography/pull/837.patch","issue_url":"https://api.github.com/repos/Courseography/courseography/issues/837","number":837,"state":"open","locked":false,"title":"Graph controls","user":{"login":"bell-kelly","id":10265877,"avatar_url":"https://avatars.githubusercontent.com/u/10265877?v=3","gravatar_id":"","url":"https://api.github.com/users/bell-kelly","html_url":"https://github.com/bell-kelly","followers_url":"https://api.github.com/users/bell-kelly/followers","following_url":"https://api.github.com/users/bell-kelly/following{/other_user}","gists_url":"https://api.github.com/users/bell-kelly/gists{/gist_id}","starred_url":"https://api.github.com/users/bell-kelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bell-kelly/subscriptions","organizations_url":"https://api.github.com/users/bell-kelly/orgs","repos_url":"https://api.github.com/users/bell-kelly/repos","events_url":"https://api.github.com/users/bell-kelly/events{/privacy}","received_events_url":"https://api.github.com/users/bell-kelly/received_events","type":"User","site_admin":false},"body":"Updating react graph with some zoom functionality.","created_at":"2016-05-18T16:53:42Z","updated_at":"2016-06-01T16:41:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6db9d7bdbbf41471e9cb36a5fc868097c92770d9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Courseography/courseography/pulls/837/commits","review_comments_url":"https://api.github.com/repos/Courseography/courseography/pulls/837/comments","review_comment_url":"https://api.github.com/repos/Courseography/courseography/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Courseography/courseography/issues/837/comments","statuses_url":"https://api.github.com/repos/Courseography/courseography/statuses/02f3f6478e38e5164156a0bda8c77b3dde597eb9","head":{"label":"bell-kelly:graph-controls","ref":"graph-controls","sha":"02f3f6478e38e5164156a0bda8c77b3dde597eb9","user":{"login":"bell-kelly","id":10265877,"avatar_url":"https://avatars.githubusercontent.com/u/10265877?v=3","gravatar_id":"","url":"https://api.github.com/users/bell-kelly","html_url":"https://github.com/bell-kelly","followers_url":"https://api.github.com/users/bell-kelly/followers","following_url":"https://api.github.com/users/bell-kelly/following{/other_user}","gists_url":"https://api.github.com/users/bell-kelly/gists{/gist_id}","starred_url":"https://api.github.com/users/bell-kelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bell-kelly/subscriptions","organizations_url":"https://api.github.com/users/bell-kelly/orgs","repos_url":"https://api.github.com/users/bell-kelly/repos","events_url":"https://api.github.com/users/bell-kelly/events{/privacy}","received_events_url":"https://api.github.com/users/bell-kelly/received_events","type":"User","site_admin":false},"repo":{"id":48758687,"name":"courseography","full_name":"bell-kelly/courseography","owner":{"login":"bell-kelly","id":10265877,"avatar_url":"https://avatars.githubusercontent.com/u/10265877?v=3","gravatar_id":"","url":"https://api.github.com/users/bell-kelly","html_url":"https://github.com/bell-kelly","followers_url":"https://api.github.com/users/bell-kelly/followers","following_url":"https://api.github.com/users/bell-kelly/following{/other_user}","gists_url":"https://api.github.com/users/bell-kelly/gists{/gist_id}","starred_url":"https://api.github.com/users/bell-kelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bell-kelly/subscriptions","organizations_url":"https://api.github.com/users/bell-kelly/orgs","repos_url":"https://api.github.com/users/bell-kelly/repos","events_url":"https://api.github.com/users/bell-kelly/events{/privacy}","received_events_url":"https://api.github.com/users/bell-kelly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bell-kelly/courseography","description":"Courseography is a tool created by David Liu and Ian Stewart-Binks to guide students through their undergraduate careers.","fork":true,"url":"https://api.github.com/repos/bell-kelly/courseography","forks_url":"https://api.github.com/repos/bell-kelly/courseography/forks","keys_url":"https://api.github.com/repos/bell-kelly/courseography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bell-kelly/courseography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bell-kelly/courseography/teams","hooks_url":"https://api.github.com/repos/bell-kelly/courseography/hooks","issue_events_url":"https://api.github.com/repos/bell-kelly/courseography/issues/events{/number}","events_url":"https://api.github.com/repos/bell-kelly/courseography/events","assignees_url":"https://api.github.com/repos/bell-kelly/courseography/assignees{/user}","branches_url":"https://api.github.com/repos/bell-kelly/courseography/branches{/branch}","tags_url":"https://api.github.com/repos/bell-kelly/courseography/tags","blobs_url":"https://api.github.com/repos/bell-kelly/courseography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bell-kelly/courseography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bell-kelly/courseography/git/refs{/sha}","trees_url":"https://api.github.com/repos/bell-kelly/courseography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bell-kelly/courseography/statuses/{sha}","languages_url":"https://api.github.com/repos/bell-kelly/courseography/languages","stargazers_url":"https://api.github.com/repos/bell-kelly/courseography/stargazers","contributors_url":"https://api.github.com/repos/bell-kelly/courseography/contributors","subscribers_url":"https://api.github.com/repos/bell-kelly/courseography/subscribers","subscription_url":"https://api.github.com/repos/bell-kelly/courseography/subscription","commits_url":"https://api.github.com/repos/bell-kelly/courseography/commits{/sha}","git_commits_url":"https://api.github.com/repos/bell-kelly/courseography/git/commits{/sha}","comments_url":"https://api.github.com/repos/bell-kelly/courseography/comments{/number}","issue_comment_url":"https://api.github.com/repos/bell-kelly/courseography/issues/comments{/number}","contents_url":"https://api.github.com/repos/bell-kelly/courseography/contents/{+path}","compare_url":"https://api.github.com/repos/bell-kelly/courseography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bell-kelly/courseography/merges","archive_url":"https://api.github.com/repos/bell-kelly/courseography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bell-kelly/courseography/downloads","issues_url":"https://api.github.com/repos/bell-kelly/courseography/issues{/number}","pulls_url":"https://api.github.com/repos/bell-kelly/courseography/pulls{/number}","milestones_url":"https://api.github.com/repos/bell-kelly/courseography/milestones{/number}","notifications_url":"https://api.github.com/repos/bell-kelly/courseography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bell-kelly/courseography/labels{/name}","releases_url":"https://api.github.com/repos/bell-kelly/courseography/releases{/id}","deployments_url":"https://api.github.com/repos/bell-kelly/courseography/deployments","created_at":"2015-12-29T17:19:28Z","updated_at":"2016-02-05T13:46:03Z","pushed_at":"2016-06-01T15:56:18Z","git_url":"git://github.com/bell-kelly/courseography.git","ssh_url":"git@github.com:bell-kelly/courseography.git","clone_url":"https://github.com/bell-kelly/courseography.git","svn_url":"https://github.com/bell-kelly/courseography","homepage":"","size":59481,"stargazers_count":0,"watchers_count":0,"language":"Haskell","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":"Courseography:master","ref":"master","sha":"4321021b5dec773694c097ba8ac06adca782b958","user":{"login":"Courseography","id":9721671,"avatar_url":"https://avatars.githubusercontent.com/u/9721671?v=3","gravatar_id":"","url":"https://api.github.com/users/Courseography","html_url":"https://github.com/Courseography","followers_url":"https://api.github.com/users/Courseography/followers","following_url":"https://api.github.com/users/Courseography/following{/other_user}","gists_url":"https://api.github.com/users/Courseography/gists{/gist_id}","starred_url":"https://api.github.com/users/Courseography/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Courseography/subscriptions","organizations_url":"https://api.github.com/users/Courseography/orgs","repos_url":"https://api.github.com/users/Courseography/repos","events_url":"https://api.github.com/users/Courseography/events{/privacy}","received_events_url":"https://api.github.com/users/Courseography/received_events","type":"Organization","site_admin":false},"repo":{"id":16873349,"name":"courseography","full_name":"Courseography/courseography","owner":{"login":"Courseography","id":9721671,"avatar_url":"https://avatars.githubusercontent.com/u/9721671?v=3","gravatar_id":"","url":"https://api.github.com/users/Courseography","html_url":"https://github.com/Courseography","followers_url":"https://api.github.com/users/Courseography/followers","following_url":"https://api.github.com/users/Courseography/following{/other_user}","gists_url":"https://api.github.com/users/Courseography/gists{/gist_id}","starred_url":"https://api.github.com/users/Courseography/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Courseography/subscriptions","organizations_url":"https://api.github.com/users/Courseography/orgs","repos_url":"https://api.github.com/users/Courseography/repos","events_url":"https://api.github.com/users/Courseography/events{/privacy}","received_events_url":"https://api.github.com/users/Courseography/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Courseography/courseography","description":"Courseography is a tool created by David Liu and Ian Stewart-Binks to guide students through their undergraduate careers.","fork":false,"url":"https://api.github.com/repos/Courseography/courseography","forks_url":"https://api.github.com/repos/Courseography/courseography/forks","keys_url":"https://api.github.com/repos/Courseography/courseography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Courseography/courseography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Courseography/courseography/teams","hooks_url":"https://api.github.com/repos/Courseography/courseography/hooks","issue_events_url":"https://api.github.com/repos/Courseography/courseography/issues/events{/number}","events_url":"https://api.github.com/repos/Courseography/courseography/events","assignees_url":"https://api.github.com/repos/Courseography/courseography/assignees{/user}","branches_url":"https://api.github.com/repos/Courseography/courseography/branches{/branch}","tags_url":"https://api.github.com/repos/Courseography/courseography/tags","blobs_url":"https://api.github.com/repos/Courseography/courseography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Courseography/courseography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Courseography/courseography/git/refs{/sha}","trees_url":"https://api.github.com/repos/Courseography/courseography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Courseography/courseography/statuses/{sha}","languages_url":"https://api.github.com/repos/Courseography/courseography/languages","stargazers_url":"https://api.github.com/repos/Courseography/courseography/stargazers","contributors_url":"https://api.github.com/repos/Courseography/courseography/contributors","subscribers_url":"https://api.github.com/repos/Courseography/courseography/subscribers","subscription_url":"https://api.github.com/repos/Courseography/courseography/subscription","commits_url":"https://api.github.com/repos/Courseography/courseography/commits{/sha}","git_commits_url":"https://api.github.com/repos/Courseography/courseography/git/commits{/sha}","comments_url":"https://api.github.com/repos/Courseography/courseography/comments{/number}","issue_comment_url":"https://api.github.com/repos/Courseography/courseography/issues/comments{/number}","contents_url":"https://api.github.com/repos/Courseography/courseography/contents/{+path}","compare_url":"https://api.github.com/repos/Courseography/courseography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Courseography/courseography/merges","archive_url":"https://api.github.com/repos/Courseography/courseography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Courseography/courseography/downloads","issues_url":"https://api.github.com/repos/Courseography/courseography/issues{/number}","pulls_url":"https://api.github.com/repos/Courseography/courseography/pulls{/number}","milestones_url":"https://api.github.com/repos/Courseography/courseography/milestones{/number}","notifications_url":"https://api.github.com/repos/Courseography/courseography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Courseography/courseography/labels{/name}","releases_url":"https://api.github.com/repos/Courseography/courseography/releases{/id}","deployments_url":"https://api.github.com/repos/Courseography/courseography/deployments","created_at":"2014-02-15T22:32:22Z","updated_at":"2016-05-11T02:58:50Z","pushed_at":"2016-06-01T15:56:18Z","git_url":"git://github.com/Courseography/courseography.git","ssh_url":"git@github.com:Courseography/courseography.git","clone_url":"https://github.com/Courseography/courseography.git","svn_url":"https://github.com/Courseography/courseography","homepage":"","size":60978,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":65,"forks":32,"open_issues":65,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Courseography/courseography/pulls/837"},"html":{"href":"https://github.com/Courseography/courseography/pull/837"},"issue":{"href":"https://api.github.com/repos/Courseography/courseography/issues/837"},"comments":{"href":"https://api.github.com/repos/Courseography/courseography/issues/837/comments"},"review_comments":{"href":"https://api.github.com/repos/Courseography/courseography/pulls/837/comments"},"review_comment":{"href":"https://api.github.com/repos/Courseography/courseography/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Courseography/courseography/pulls/837/commits"},"statuses":{"href":"https://api.github.com/repos/Courseography/courseography/statuses/02f3f6478e38e5164156a0bda8c77b3dde597eb9"}}}}
{"actor":{"display_login":"david-yz-liu"}}