{"action":"created","comment":{"url":"https://api.github.com/repos/komitywa/plantingjs/pulls/comments/30945147","id":30945147,"diff_hunk":"@@ -96,20 +97,37 @@ Planting.prototype.plant_objects_for_view = function () {\n     };\n };\n \n-var calc_direction = function calc_direction(objectPosition, mousePosition) {\n+function calc_direction(objectPosition, mousePosition) {\n     var calc = {};\n-\n-    if (objectPosition < mousePosition) {\n-        calc.direction = true;\n-        calc.width = mousePosition - objectPosition;\n+    if (objectPosition <= mousePosition) {\n+        calc = {\n+            direction: true,\n+            mouseObjectDiff: mousePosition - objectPosition\n+        };\n     } else if (objectPosition > mousePosition) {\n-        calc.direction = false;\n-        calc.width = objectPosition - mousePosition;\n+        calc = {\n+            direction: false,\n+            mouseObjectDiff: objectPosition - mousePosition\n+        };\n     }\n-\n     return calc;\n+}\n+\n+function calc_sides(mouseObjectDiff, projectionsLength) {\n+    var sideLength = 20;","path":"src/js/planting/planting-handlers.js","position":52,"original_position":52,"commit_id":"7d29f0ee657e1a73951120273d71f6c9ae542899","original_commit_id":"7d29f0ee657e1a73951120273d71f6c9ae542899","user":{"login":"mjaniszew","id":701365,"avatar_url":"https://avatars.githubusercontent.com/u/701365?v=3","gravatar_id":"","url":"https://api.github.com/users/mjaniszew","html_url":"https://github.com/mjaniszew","followers_url":"https://api.github.com/users/mjaniszew/followers","following_url":"https://api.github.com/users/mjaniszew/following{/other_user}","gists_url":"https://api.github.com/users/mjaniszew/gists{/gist_id}","starred_url":"https://api.github.com/users/mjaniszew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjaniszew/subscriptions","organizations_url":"https://api.github.com/users/mjaniszew/orgs","repos_url":"https://api.github.com/users/mjaniszew/repos","events_url":"https://api.github.com/users/mjaniszew/events{/privacy}","received_events_url":"https://api.github.com/users/mjaniszew/received_events","type":"User","site_admin":false},"body":"Jeżeli to jest stała wartość to w jakichś globalnych stałych powinniśmy to mieć.","created_at":"2015-05-23T14:04:00Z","updated_at":"2015-05-23T14:04:00Z","html_url":"https://github.com/komitywa/plantingjs/pull/31#discussion_r30945147","pull_request_url":"https://api.github.com/repos/komitywa/plantingjs/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/komitywa/plantingjs/pulls/comments/30945147"},"html":{"href":"https://github.com/komitywa/plantingjs/pull/31#discussion_r30945147"},"pull_request":{"href":"https://api.github.com/repos/komitywa/plantingjs/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/komitywa/plantingjs/pulls/31","id":36087866,"html_url":"https://github.com/komitywa/plantingjs/pull/31","diff_url":"https://github.com/komitywa/plantingjs/pull/31.diff","patch_url":"https://github.com/komitywa/plantingjs/pull/31.patch","issue_url":"https://api.github.com/repos/komitywa/plantingjs/issues/31","number":31,"state":"open","locked":false,"title":"#12 addons to rotate function","user":{"login":"emilekm","id":1259182,"avatar_url":"https://avatars.githubusercontent.com/u/1259182?v=3","gravatar_id":"","url":"https://api.github.com/users/emilekm","html_url":"https://github.com/emilekm","followers_url":"https://api.github.com/users/emilekm/followers","following_url":"https://api.github.com/users/emilekm/following{/other_user}","gists_url":"https://api.github.com/users/emilekm/gists{/gist_id}","starred_url":"https://api.github.com/users/emilekm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilekm/subscriptions","organizations_url":"https://api.github.com/users/emilekm/orgs","repos_url":"https://api.github.com/users/emilekm/repos","events_url":"https://api.github.com/users/emilekm/events{/privacy}","received_events_url":"https://api.github.com/users/emilekm/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-23T13:55:28Z","updated_at":"2015-05-23T14:04:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"388baf88c5522483b1948dcdf1230acd6e77eaf7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/komitywa/plantingjs/pulls/31/commits","review_comments_url":"https://api.github.com/repos/komitywa/plantingjs/pulls/31/comments","review_comment_url":"https://api.github.com/repos/komitywa/plantingjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/komitywa/plantingjs/issues/31/comments","statuses_url":"https://api.github.com/repos/komitywa/plantingjs/statuses/7d29f0ee657e1a73951120273d71f6c9ae542899","head":{"label":"emilekm:master","ref":"master","sha":"7d29f0ee657e1a73951120273d71f6c9ae542899","user":{"login":"emilekm","id":1259182,"avatar_url":"https://avatars.githubusercontent.com/u/1259182?v=3","gravatar_id":"","url":"https://api.github.com/users/emilekm","html_url":"https://github.com/emilekm","followers_url":"https://api.github.com/users/emilekm/followers","following_url":"https://api.github.com/users/emilekm/following{/other_user}","gists_url":"https://api.github.com/users/emilekm/gists{/gist_id}","starred_url":"https://api.github.com/users/emilekm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilekm/subscriptions","organizations_url":"https://api.github.com/users/emilekm/orgs","repos_url":"https://api.github.com/users/emilekm/repos","events_url":"https://api.github.com/users/emilekm/events{/privacy}","received_events_url":"https://api.github.com/users/emilekm/received_events","type":"User","site_admin":false},"repo":{"id":34206095,"name":"plantingjs","full_name":"emilekm/plantingjs","owner":{"login":"emilekm","id":1259182,"avatar_url":"https://avatars.githubusercontent.com/u/1259182?v=3","gravatar_id":"","url":"https://api.github.com/users/emilekm","html_url":"https://github.com/emilekm","followers_url":"https://api.github.com/users/emilekm/followers","following_url":"https://api.github.com/users/emilekm/following{/other_user}","gists_url":"https://api.github.com/users/emilekm/gists{/gist_id}","starred_url":"https://api.github.com/users/emilekm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilekm/subscriptions","organizations_url":"https://api.github.com/users/emilekm/orgs","repos_url":"https://api.github.com/users/emilekm/repos","events_url":"https://api.github.com/users/emilekm/events{/privacy}","received_events_url":"https://api.github.com/users/emilekm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emilekm/plantingjs","description":"","fork":true,"url":"https://api.github.com/repos/emilekm/plantingjs","forks_url":"https://api.github.com/repos/emilekm/plantingjs/forks","keys_url":"https://api.github.com/repos/emilekm/plantingjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emilekm/plantingjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emilekm/plantingjs/teams","hooks_url":"https://api.github.com/repos/emilekm/plantingjs/hooks","issue_events_url":"https://api.github.com/repos/emilekm/plantingjs/issues/events{/number}","events_url":"https://api.github.com/repos/emilekm/plantingjs/events","assignees_url":"https://api.github.com/repos/emilekm/plantingjs/assignees{/user}","branches_url":"https://api.github.com/repos/emilekm/plantingjs/branches{/branch}","tags_url":"https://api.github.com/repos/emilekm/plantingjs/tags","blobs_url":"https://api.github.com/repos/emilekm/plantingjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emilekm/plantingjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emilekm/plantingjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/emilekm/plantingjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emilekm/plantingjs/statuses/{sha}","languages_url":"https://api.github.com/repos/emilekm/plantingjs/languages","stargazers_url":"https://api.github.com/repos/emilekm/plantingjs/stargazers","contributors_url":"https://api.github.com/repos/emilekm/plantingjs/contributors","subscribers_url":"https://api.github.com/repos/emilekm/plantingjs/subscribers","subscription_url":"https://api.github.com/repos/emilekm/plantingjs/subscription","commits_url":"https://api.github.com/repos/emilekm/plantingjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/emilekm/plantingjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/emilekm/plantingjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/emilekm/plantingjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/emilekm/plantingjs/contents/{+path}","compare_url":"https://api.github.com/repos/emilekm/plantingjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emilekm/plantingjs/merges","archive_url":"https://api.github.com/repos/emilekm/plantingjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emilekm/plantingjs/downloads","issues_url":"https://api.github.com/repos/emilekm/plantingjs/issues{/number}","pulls_url":"https://api.github.com/repos/emilekm/plantingjs/pulls{/number}","milestones_url":"https://api.github.com/repos/emilekm/plantingjs/milestones{/number}","notifications_url":"https://api.github.com/repos/emilekm/plantingjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emilekm/plantingjs/labels{/name}","releases_url":"https://api.github.com/repos/emilekm/plantingjs/releases{/id}","created_at":"2015-04-19T12:41:40Z","updated_at":"2015-04-29T23:04:10Z","pushed_at":"2015-05-23T13:48:59Z","git_url":"git://github.com/emilekm/plantingjs.git","ssh_url":"git@github.com:emilekm/plantingjs.git","clone_url":"https://github.com/emilekm/plantingjs.git","svn_url":"https://github.com/emilekm/plantingjs","homepage":null,"size":351,"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":"komitywa:master","ref":"master","sha":"e72b701558768bd578ba6b09bd0f90a3050bd307","user":{"login":"komitywa","id":11490516,"avatar_url":"https://avatars.githubusercontent.com/u/11490516?v=3","gravatar_id":"","url":"https://api.github.com/users/komitywa","html_url":"https://github.com/komitywa","followers_url":"https://api.github.com/users/komitywa/followers","following_url":"https://api.github.com/users/komitywa/following{/other_user}","gists_url":"https://api.github.com/users/komitywa/gists{/gist_id}","starred_url":"https://api.github.com/users/komitywa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komitywa/subscriptions","organizations_url":"https://api.github.com/users/komitywa/orgs","repos_url":"https://api.github.com/users/komitywa/repos","events_url":"https://api.github.com/users/komitywa/events{/privacy}","received_events_url":"https://api.github.com/users/komitywa/received_events","type":"Organization","site_admin":false},"repo":{"id":22772899,"name":"plantingjs","full_name":"komitywa/plantingjs","owner":{"login":"komitywa","id":11490516,"avatar_url":"https://avatars.githubusercontent.com/u/11490516?v=3","gravatar_id":"","url":"https://api.github.com/users/komitywa","html_url":"https://github.com/komitywa","followers_url":"https://api.github.com/users/komitywa/followers","following_url":"https://api.github.com/users/komitywa/following{/other_user}","gists_url":"https://api.github.com/users/komitywa/gists{/gist_id}","starred_url":"https://api.github.com/users/komitywa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/komitywa/subscriptions","organizations_url":"https://api.github.com/users/komitywa/orgs","repos_url":"https://api.github.com/users/komitywa/repos","events_url":"https://api.github.com/users/komitywa/events{/privacy}","received_events_url":"https://api.github.com/users/komitywa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/komitywa/plantingjs","description":"","fork":false,"url":"https://api.github.com/repos/komitywa/plantingjs","forks_url":"https://api.github.com/repos/komitywa/plantingjs/forks","keys_url":"https://api.github.com/repos/komitywa/plantingjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/komitywa/plantingjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/komitywa/plantingjs/teams","hooks_url":"https://api.github.com/repos/komitywa/plantingjs/hooks","issue_events_url":"https://api.github.com/repos/komitywa/plantingjs/issues/events{/number}","events_url":"https://api.github.com/repos/komitywa/plantingjs/events","assignees_url":"https://api.github.com/repos/komitywa/plantingjs/assignees{/user}","branches_url":"https://api.github.com/repos/komitywa/plantingjs/branches{/branch}","tags_url":"https://api.github.com/repos/komitywa/plantingjs/tags","blobs_url":"https://api.github.com/repos/komitywa/plantingjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/komitywa/plantingjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/komitywa/plantingjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/komitywa/plantingjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/komitywa/plantingjs/statuses/{sha}","languages_url":"https://api.github.com/repos/komitywa/plantingjs/languages","stargazers_url":"https://api.github.com/repos/komitywa/plantingjs/stargazers","contributors_url":"https://api.github.com/repos/komitywa/plantingjs/contributors","subscribers_url":"https://api.github.com/repos/komitywa/plantingjs/subscribers","subscription_url":"https://api.github.com/repos/komitywa/plantingjs/subscription","commits_url":"https://api.github.com/repos/komitywa/plantingjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/komitywa/plantingjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/komitywa/plantingjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/komitywa/plantingjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/komitywa/plantingjs/contents/{+path}","compare_url":"https://api.github.com/repos/komitywa/plantingjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/komitywa/plantingjs/merges","archive_url":"https://api.github.com/repos/komitywa/plantingjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/komitywa/plantingjs/downloads","issues_url":"https://api.github.com/repos/komitywa/plantingjs/issues{/number}","pulls_url":"https://api.github.com/repos/komitywa/plantingjs/pulls{/number}","milestones_url":"https://api.github.com/repos/komitywa/plantingjs/milestones{/number}","notifications_url":"https://api.github.com/repos/komitywa/plantingjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/komitywa/plantingjs/labels{/name}","releases_url":"https://api.github.com/repos/komitywa/plantingjs/releases{/id}","created_at":"2014-08-08T22:08:10Z","updated_at":"2015-05-21T13:08:52Z","pushed_at":"2015-05-23T13:55:29Z","git_url":"git://github.com/komitywa/plantingjs.git","ssh_url":"git@github.com:komitywa/plantingjs.git","clone_url":"https://github.com/komitywa/plantingjs.git","svn_url":"https://github.com/komitywa/plantingjs","homepage":null,"size":557,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":13,"forks":9,"open_issues":13,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/komitywa/plantingjs/pulls/31"},"html":{"href":"https://github.com/komitywa/plantingjs/pull/31"},"issue":{"href":"https://api.github.com/repos/komitywa/plantingjs/issues/31"},"comments":{"href":"https://api.github.com/repos/komitywa/plantingjs/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/komitywa/plantingjs/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/komitywa/plantingjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/komitywa/plantingjs/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/komitywa/plantingjs/statuses/7d29f0ee657e1a73951120273d71f6c9ae542899"}}}}