{"action":"created","comment":{"url":"https://api.github.com/repos/mboom/TI2806/pulls/comments/66719341","id":66719341,"diff_hunk":"@@ -4,257 +4,260 @@\n define(['modules/moduleList'], function (dynModules) {\n \n \n-    require(dynModules[0], function(module) {\n+    require(dynModules[0], function (module) {\n         octopeerHelper.defaultModule = module;\n     });\n     /*jshint maxstatements:34*/\n     require(dynModules[1], function () {\n-    // Set global modules variable to a list of all imported modules after converting pseudo-array to array\n-    modules = Array.prototype.slice.call(arguments);\n+        // Set global modules variable to a list of all imported modules after converting pseudo-array to array\n+        modules = Array.prototype.slice.call(arguments);\n \n-    function setAxisTransition(module, axisname, axis) {\n-        d3.select(module.svg).select(\".\"+axisname+\"Axis\")\n-                .transition()\n-                .duration(500)\n-                .ease(\"sin-in-out\")\n-                .call(axis);\n-    }\n+        function setAxisTransition(module, axisname, axis) {\n+            d3.select(module.svg).select(\".\" + axisname + \"Axis\")\n+                    .transition()\n+                    .duration(500)\n+                    .ease(\"sin-in-out\")\n+                    .call(axis);\n+        }\n \n-    function setAxisLabelRotation(module,axisname){\n-        d3.select(module.svg).select(\".\"+axisname+\"Axis\")\n-                .selectAll(\"text\")\n-                .attr(\"transform\", \n-                    \"rotate(\"+octopeerHelper.getSafeModuleValue(module,axisname+\"AxisLabelRotation\")+\")\");\n-    }\n+        function setAxisLabelRotation(module, axisname) {\n+            d3.select(module.svg).select(\".\" + axisname + \"Axis\")\n+                    .selectAll(\"text\")\n+                    .attr(\"transform\",\n+                        \"rotate(\" + octopeerHelper.getSafeModuleValue(module, axisname + \"AxisLabelRotation\") + \")\");\n+        }\n \n-    function setStandardAxisValues(module,axisname,axis) {\n-        axis.scale().range([350-50-10,0]).nice();\n-        if(axisname === \"x\") {\n-            axis.orient(\"bottom\");\n-            axis.scale().range([720-50-50,0]);\n-            if(octopeerHelper.getSafeModuleValue(module,axisname+\"AxisTicks\")) {\n-                axis.tickSize(-350+50+10);\n-            }\n-        } else if (axisname === \"y\") {\n-            axis.orient(\"left\");\n-            if(octopeerHelper.getSafeModuleValue(module,axisname+\"AxisTicks\")) {\n-                axis.tickSize(-720+50+50);\n-            }\n-        } else {\n-            axis.orient(\"right\");\n-            if(octopeerHelper.getSafeModuleValue(module,axisname+\"AxisTicks\")) {\n-                axis.tickSize(720-50-50);\n+        function setStandardAxisValues(module, axisname, axis) {\n+            var svgSize = octopeerHelper.getSafeModuleValue(module, \"customSVGSize\");\n+            var margin = octopeerHelper.getSafeModuleValue(module, \"margin\");\n+\n+            axis.scale().range([svgSize.h - margin.left - margin.top, 0]).nice();\n+            if (axisname === \"x\") {\n+\n+                axis.orient(\"bottom\");\n+                axis.scale().range([svgSize.w - margin.right - margin.bottom, 0]);\n+                if (octopeerHelper.getSafeModuleValue(module, axisname + \"AxisTicks\")) {\n+                    axis.tickSize(-svgSize.h + margin.left + margin.top);\n+                }\n+            } else if (axisname === \"y\") {\n+                axis.orient(\"left\");\n+                if (octopeerHelper.getSafeModuleValue(module, axisname + \"AxisTicks\")) {\n+                    axis.tickSize(-svgSize.w + margin.right + margin.bottom);\n+                }\n+            } else {\n+                axis.orient(\"right\");\n+                if (octopeerHelper.getSafeModuleValue(module, axisname + \"AxisTicks\")) {\n+                    axis.tickSize(svgSize.w - margin.right - margin.bottom);\n+                }\n             }\n+\n+            setAxisTransition(module, axisname, axis);\n+            setAxisLabelRotation(module, axisname);\n         }\n \n-        setAxisTransition(module,axisname,axis);\n-        setAxisLabelRotation(module,axisname);            \n-    }\n+        function setOrdinalAxisValues(module, axisname, axis) {\n \n-    function setOrdinalAxisValues(module,axisname,axis) {\n-        if(axisname === \"x\") {\n-            axis.orient(\"bottom\");\n-            if(octopeerHelper.getSafeModuleValue(module,axisname+\"AxisTicks\")) {\n-                axis.tickSize(-350+50+10);\n-            }\n-        } else if (axisname === \"y\") {\n-            axis.orient(\"left\");\n-            if(octopeerHelper.getSafeModuleValue(module,axisname+\"AxisTicks\")) {\n-                axis.tickSize(-720+50+50);\n-            }\n-        } else {\n-            axis.orient(\"right\");\n-            if(octopeerHelper.getSafeModuleValue(module,axisname+\"AxisTicks\")) {\n-                axis.tickSize(720-50-50);\n+            var svgSize = octopeerHelper.getSafeModuleValue(module, \"customSVGSize\");\n+            var margin = octopeerHelper.getSafeModuleValue(module, \"margin\");\n+\n+            if (axisname === \"x\") {\n+                axis.orient(\"bottom\");\n+                if (octopeerHelper.getSafeModuleValue(module, axisname + \"AxisTicks\")) {\n+                    axis.tickSize(-svgSize.h + margin.left + margin.bottom);\n+                }\n+            } else if (axisname === \"y\") {\n+                axis.orient(\"left\");\n+                if (octopeerHelper.getSafeModuleValue(module, axisname + \"AxisTicks\")) {\n+                    axis.tickSize(-svgSize.w + margin.right + margin.top);\n+                }\n+            } else {\n+                axis.orient(\"right\");\n+                if (octopeerHelper.getSafeModuleValue(module, axisname + \"AxisTicks\")) {\n+                    axis.tickSize(svgSize.w - margin.left - margin.bottom);","path":"src/main.js","position":124,"original_position":124,"commit_id":"53551b6039555ea139e6b850794116fa9299625f","original_commit_id":"53551b6039555ea139e6b850794116fa9299625f","user":{"login":"agudek","id":5946456,"avatar_url":"https://avatars.githubusercontent.com/u/5946456?v=3","gravatar_id":"","url":"https://api.github.com/users/agudek","html_url":"https://github.com/agudek","followers_url":"https://api.github.com/users/agudek/followers","following_url":"https://api.github.com/users/agudek/following{/other_user}","gists_url":"https://api.github.com/users/agudek/gists{/gist_id}","starred_url":"https://api.github.com/users/agudek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agudek/subscriptions","organizations_url":"https://api.github.com/users/agudek/orgs","repos_url":"https://api.github.com/users/agudek/repos","events_url":"https://api.github.com/users/agudek/events{/privacy}","received_events_url":"https://api.github.com/users/agudek/received_events","type":"User","site_admin":false},"body":"this should be svgSize.w - margin.left - margin.right","created_at":"2016-06-12T10:51:24Z","updated_at":"2016-06-12T10:51:24Z","html_url":"https://github.com/mboom/TI2806/pull/234#discussion_r66719341","pull_request_url":"https://api.github.com/repos/mboom/TI2806/pulls/234","_links":{"self":{"href":"https://api.github.com/repos/mboom/TI2806/pulls/comments/66719341"},"html":{"href":"https://github.com/mboom/TI2806/pull/234#discussion_r66719341"},"pull_request":{"href":"https://api.github.com/repos/mboom/TI2806/pulls/234"}}},"pull_request":{"url":"https://api.github.com/repos/mboom/TI2806/pulls/234","id":73464722,"html_url":"https://github.com/mboom/TI2806/pull/234","diff_url":"https://github.com/mboom/TI2806/pull/234.diff","patch_url":"https://github.com/mboom/TI2806/pull/234.patch","issue_url":"https://api.github.com/repos/mboom/TI2806/issues/234","number":234,"state":"open","locked":false,"title":"Improve punch card","user":{"login":"lvdoorn","id":9806230,"avatar_url":"https://avatars.githubusercontent.com/u/9806230?v=3","gravatar_id":"","url":"https://api.github.com/users/lvdoorn","html_url":"https://github.com/lvdoorn","followers_url":"https://api.github.com/users/lvdoorn/followers","following_url":"https://api.github.com/users/lvdoorn/following{/other_user}","gists_url":"https://api.github.com/users/lvdoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/lvdoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvdoorn/subscriptions","organizations_url":"https://api.github.com/users/lvdoorn/orgs","repos_url":"https://api.github.com/users/lvdoorn/repos","events_url":"https://api.github.com/users/lvdoorn/events{/privacy}","received_events_url":"https://api.github.com/users/lvdoorn/received_events","type":"User","site_admin":false},"body":"The punch card graph is now full-width and shows informative tooltips.\r\n\r\n@agudek You may wish to check if I merged main.js correctly.","created_at":"2016-06-11T10:22:38Z","updated_at":"2016-06-12T10:51:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59575155bc90e6b05a0e941238087c4c4d3d1a88","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mboom/TI2806/pulls/234/commits","review_comments_url":"https://api.github.com/repos/mboom/TI2806/pulls/234/comments","review_comment_url":"https://api.github.com/repos/mboom/TI2806/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mboom/TI2806/issues/234/comments","statuses_url":"https://api.github.com/repos/mboom/TI2806/statuses/53551b6039555ea139e6b850794116fa9299625f","head":{"label":"mboom:improve-punch-card","ref":"improve-punch-card","sha":"53551b6039555ea139e6b850794116fa9299625f","user":{"login":"mboom","id":9715349,"avatar_url":"https://avatars.githubusercontent.com/u/9715349?v=3","gravatar_id":"","url":"https://api.github.com/users/mboom","html_url":"https://github.com/mboom","followers_url":"https://api.github.com/users/mboom/followers","following_url":"https://api.github.com/users/mboom/following{/other_user}","gists_url":"https://api.github.com/users/mboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboom/subscriptions","organizations_url":"https://api.github.com/users/mboom/orgs","repos_url":"https://api.github.com/users/mboom/repos","events_url":"https://api.github.com/users/mboom/events{/privacy}","received_events_url":"https://api.github.com/users/mboom/received_events","type":"User","site_admin":false},"repo":{"id":56750401,"name":"TI2806","full_name":"mboom/TI2806","owner":{"login":"mboom","id":9715349,"avatar_url":"https://avatars.githubusercontent.com/u/9715349?v=3","gravatar_id":"","url":"https://api.github.com/users/mboom","html_url":"https://github.com/mboom","followers_url":"https://api.github.com/users/mboom/followers","following_url":"https://api.github.com/users/mboom/following{/other_user}","gists_url":"https://api.github.com/users/mboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboom/subscriptions","organizations_url":"https://api.github.com/users/mboom/orgs","repos_url":"https://api.github.com/users/mboom/repos","events_url":"https://api.github.com/users/mboom/events{/privacy}","received_events_url":"https://api.github.com/users/mboom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mboom/TI2806","description":"Tools for Software Engineering","fork":false,"url":"https://api.github.com/repos/mboom/TI2806","forks_url":"https://api.github.com/repos/mboom/TI2806/forks","keys_url":"https://api.github.com/repos/mboom/TI2806/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mboom/TI2806/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mboom/TI2806/teams","hooks_url":"https://api.github.com/repos/mboom/TI2806/hooks","issue_events_url":"https://api.github.com/repos/mboom/TI2806/issues/events{/number}","events_url":"https://api.github.com/repos/mboom/TI2806/events","assignees_url":"https://api.github.com/repos/mboom/TI2806/assignees{/user}","branches_url":"https://api.github.com/repos/mboom/TI2806/branches{/branch}","tags_url":"https://api.github.com/repos/mboom/TI2806/tags","blobs_url":"https://api.github.com/repos/mboom/TI2806/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mboom/TI2806/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mboom/TI2806/git/refs{/sha}","trees_url":"https://api.github.com/repos/mboom/TI2806/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mboom/TI2806/statuses/{sha}","languages_url":"https://api.github.com/repos/mboom/TI2806/languages","stargazers_url":"https://api.github.com/repos/mboom/TI2806/stargazers","contributors_url":"https://api.github.com/repos/mboom/TI2806/contributors","subscribers_url":"https://api.github.com/repos/mboom/TI2806/subscribers","subscription_url":"https://api.github.com/repos/mboom/TI2806/subscription","commits_url":"https://api.github.com/repos/mboom/TI2806/commits{/sha}","git_commits_url":"https://api.github.com/repos/mboom/TI2806/git/commits{/sha}","comments_url":"https://api.github.com/repos/mboom/TI2806/comments{/number}","issue_comment_url":"https://api.github.com/repos/mboom/TI2806/issues/comments{/number}","contents_url":"https://api.github.com/repos/mboom/TI2806/contents/{+path}","compare_url":"https://api.github.com/repos/mboom/TI2806/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mboom/TI2806/merges","archive_url":"https://api.github.com/repos/mboom/TI2806/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mboom/TI2806/downloads","issues_url":"https://api.github.com/repos/mboom/TI2806/issues{/number}","pulls_url":"https://api.github.com/repos/mboom/TI2806/pulls{/number}","milestones_url":"https://api.github.com/repos/mboom/TI2806/milestones{/number}","notifications_url":"https://api.github.com/repos/mboom/TI2806/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mboom/TI2806/labels{/name}","releases_url":"https://api.github.com/repos/mboom/TI2806/releases{/id}","deployments_url":"https://api.github.com/repos/mboom/TI2806/deployments","created_at":"2016-04-21T07:03:58Z","updated_at":"2016-04-21T10:00:55Z","pushed_at":"2016-06-12T10:41:42Z","git_url":"git://github.com/mboom/TI2806.git","ssh_url":"git@github.com:mboom/TI2806.git","clone_url":"https://github.com/mboom/TI2806.git","svn_url":"https://github.com/mboom/TI2806","homepage":null,"size":7120,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":21,"forks":2,"open_issues":21,"watchers":0,"default_branch":"master"}},"base":{"label":"mboom:master","ref":"master","sha":"e8f4725af7eb93ba79a37f3729df63cafc79801f","user":{"login":"mboom","id":9715349,"avatar_url":"https://avatars.githubusercontent.com/u/9715349?v=3","gravatar_id":"","url":"https://api.github.com/users/mboom","html_url":"https://github.com/mboom","followers_url":"https://api.github.com/users/mboom/followers","following_url":"https://api.github.com/users/mboom/following{/other_user}","gists_url":"https://api.github.com/users/mboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboom/subscriptions","organizations_url":"https://api.github.com/users/mboom/orgs","repos_url":"https://api.github.com/users/mboom/repos","events_url":"https://api.github.com/users/mboom/events{/privacy}","received_events_url":"https://api.github.com/users/mboom/received_events","type":"User","site_admin":false},"repo":{"id":56750401,"name":"TI2806","full_name":"mboom/TI2806","owner":{"login":"mboom","id":9715349,"avatar_url":"https://avatars.githubusercontent.com/u/9715349?v=3","gravatar_id":"","url":"https://api.github.com/users/mboom","html_url":"https://github.com/mboom","followers_url":"https://api.github.com/users/mboom/followers","following_url":"https://api.github.com/users/mboom/following{/other_user}","gists_url":"https://api.github.com/users/mboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboom/subscriptions","organizations_url":"https://api.github.com/users/mboom/orgs","repos_url":"https://api.github.com/users/mboom/repos","events_url":"https://api.github.com/users/mboom/events{/privacy}","received_events_url":"https://api.github.com/users/mboom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mboom/TI2806","description":"Tools for Software Engineering","fork":false,"url":"https://api.github.com/repos/mboom/TI2806","forks_url":"https://api.github.com/repos/mboom/TI2806/forks","keys_url":"https://api.github.com/repos/mboom/TI2806/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mboom/TI2806/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mboom/TI2806/teams","hooks_url":"https://api.github.com/repos/mboom/TI2806/hooks","issue_events_url":"https://api.github.com/repos/mboom/TI2806/issues/events{/number}","events_url":"https://api.github.com/repos/mboom/TI2806/events","assignees_url":"https://api.github.com/repos/mboom/TI2806/assignees{/user}","branches_url":"https://api.github.com/repos/mboom/TI2806/branches{/branch}","tags_url":"https://api.github.com/repos/mboom/TI2806/tags","blobs_url":"https://api.github.com/repos/mboom/TI2806/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mboom/TI2806/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mboom/TI2806/git/refs{/sha}","trees_url":"https://api.github.com/repos/mboom/TI2806/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mboom/TI2806/statuses/{sha}","languages_url":"https://api.github.com/repos/mboom/TI2806/languages","stargazers_url":"https://api.github.com/repos/mboom/TI2806/stargazers","contributors_url":"https://api.github.com/repos/mboom/TI2806/contributors","subscribers_url":"https://api.github.com/repos/mboom/TI2806/subscribers","subscription_url":"https://api.github.com/repos/mboom/TI2806/subscription","commits_url":"https://api.github.com/repos/mboom/TI2806/commits{/sha}","git_commits_url":"https://api.github.com/repos/mboom/TI2806/git/commits{/sha}","comments_url":"https://api.github.com/repos/mboom/TI2806/comments{/number}","issue_comment_url":"https://api.github.com/repos/mboom/TI2806/issues/comments{/number}","contents_url":"https://api.github.com/repos/mboom/TI2806/contents/{+path}","compare_url":"https://api.github.com/repos/mboom/TI2806/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mboom/TI2806/merges","archive_url":"https://api.github.com/repos/mboom/TI2806/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mboom/TI2806/downloads","issues_url":"https://api.github.com/repos/mboom/TI2806/issues{/number}","pulls_url":"https://api.github.com/repos/mboom/TI2806/pulls{/number}","milestones_url":"https://api.github.com/repos/mboom/TI2806/milestones{/number}","notifications_url":"https://api.github.com/repos/mboom/TI2806/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mboom/TI2806/labels{/name}","releases_url":"https://api.github.com/repos/mboom/TI2806/releases{/id}","deployments_url":"https://api.github.com/repos/mboom/TI2806/deployments","created_at":"2016-04-21T07:03:58Z","updated_at":"2016-04-21T10:00:55Z","pushed_at":"2016-06-12T10:41:42Z","git_url":"git://github.com/mboom/TI2806.git","ssh_url":"git@github.com:mboom/TI2806.git","clone_url":"https://github.com/mboom/TI2806.git","svn_url":"https://github.com/mboom/TI2806","homepage":null,"size":7120,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":21,"forks":2,"open_issues":21,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mboom/TI2806/pulls/234"},"html":{"href":"https://github.com/mboom/TI2806/pull/234"},"issue":{"href":"https://api.github.com/repos/mboom/TI2806/issues/234"},"comments":{"href":"https://api.github.com/repos/mboom/TI2806/issues/234/comments"},"review_comments":{"href":"https://api.github.com/repos/mboom/TI2806/pulls/234/comments"},"review_comment":{"href":"https://api.github.com/repos/mboom/TI2806/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mboom/TI2806/pulls/234/commits"},"statuses":{"href":"https://api.github.com/repos/mboom/TI2806/statuses/53551b6039555ea139e6b850794116fa9299625f"}}}}
{"actor":{"display_login":"agudek"}}