{"action":"created","comment":{"url":"https://api.github.com/repos/BloamBla/Shape-class/pulls/comments/224363692","pull_request_review_id":163706143,"id":224363692,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDM2MzY5Mg==","diff_hunk":"@@ -106,31 +116,46 @@ class Shape extends DrawCanvas{\n \n class ShapeSquare extends Shape {\n   constructor(x, y, side, angle = 0, options = DEFAULT_OPTIONS) {\n-    const COORDINATES = Transformer.getCoordinatesForSquare(x, y, side, angle);\n-    super(COORDINATES, options);\n+    super([], options);\n     this.getDefaultValues = {angle, side, x, y};\n     this.x = x;\n     this.y = y;\n     this.side = side;\n     this.angle = angle;\n     this.zoom = 1;\n-    this.getDefaultCoordinates = COORDINATES;\n-    this.currentCoordinates = COORDINATES;\n+    this.currentCoordinates = [];\n+    this.getDefaultCoordinates = [];\n+    Transformer.getCoordinatesForSquare(x, y, side, angle)\n+      .then(data => {\n+        this.currentCoordinates = data;\n+        this.getDefaultCoordinates = data;\n+        this.draw(context => {\n+          for (const elem of this.currentCoordinates) {\n+            context.lineTo(elem.x, elem.y);\n+          }\n+        });\n+      }, data => console.log(data));\n   }\n \n   reDraw(newX, newY, newSide, newAngle = 0) {\n     this.x = newX;\n     this.y = newY;\n     this.side = newSide;\n     this.angle = newAngle;\n-    this.currentCoordinates = Transformer.getCoordinatesForSquare(newX, newY, newSide, newAngle);\n-    super.reDraw(this.currentCoordinates);\n+    Transformer.getCoordinatesForSquare(newX, newY, newSide, newAngle, this.zoom)\n+      .then(data => {\n+        this.currentCoordinates = data;\n+        super.reDraw(data);\n+      }, data => console.log(data));","path":"shape.js","position":97,"original_position":97,"commit_id":"44e7896774cbe833124af6837ba1291c7ec7daee","original_commit_id":"44e7896774cbe833124af6837ba1291c7ec7daee","user":{"login":"burymm","id":3627088,"node_id":"MDQ6VXNlcjM2MjcwODg=","avatar_url":"https://avatars2.githubusercontent.com/u/3627088?v=4","gravatar_id":"","url":"https://api.github.com/users/burymm","html_url":"https://github.com/burymm","followers_url":"https://api.github.com/users/burymm/followers","following_url":"https://api.github.com/users/burymm/following{/other_user}","gists_url":"https://api.github.com/users/burymm/gists{/gist_id}","starred_url":"https://api.github.com/users/burymm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burymm/subscriptions","organizations_url":"https://api.github.com/users/burymm/orgs","repos_url":"https://api.github.com/users/burymm/repos","events_url":"https://api.github.com/users/burymm/events{/privacy}","received_events_url":"https://api.github.com/users/burymm/received_events","type":"User","site_admin":false},"body":"remove","created_at":"2018-10-11T08:45:43Z","updated_at":"2018-10-11T08:46:12Z","html_url":"https://github.com/BloamBla/Shape-class/pull/3#discussion_r224363692","pull_request_url":"https://api.github.com/repos/BloamBla/Shape-class/pulls/3","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/BloamBla/Shape-class/pulls/comments/224363692"},"html":{"href":"https://github.com/BloamBla/Shape-class/pull/3#discussion_r224363692"},"pull_request":{"href":"https://api.github.com/repos/BloamBla/Shape-class/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/BloamBla/Shape-class/pulls/3","id":222046363,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMDQ2MzYz","html_url":"https://github.com/BloamBla/Shape-class/pull/3","diff_url":"https://github.com/BloamBla/Shape-class/pull/3.diff","patch_url":"https://github.com/BloamBla/Shape-class/pull/3.patch","issue_url":"https://api.github.com/repos/BloamBla/Shape-class/issues/3","number":3,"state":"open","locked":false,"title":"Promises","user":{"login":"BloamBla","id":38785016,"node_id":"MDQ6VXNlcjM4Nzg1MDE2","avatar_url":"https://avatars1.githubusercontent.com/u/38785016?v=4","gravatar_id":"","url":"https://api.github.com/users/BloamBla","html_url":"https://github.com/BloamBla","followers_url":"https://api.github.com/users/BloamBla/followers","following_url":"https://api.github.com/users/BloamBla/following{/other_user}","gists_url":"https://api.github.com/users/BloamBla/gists{/gist_id}","starred_url":"https://api.github.com/users/BloamBla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloamBla/subscriptions","organizations_url":"https://api.github.com/users/BloamBla/orgs","repos_url":"https://api.github.com/users/BloamBla/repos","events_url":"https://api.github.com/users/BloamBla/events{/privacy}","received_events_url":"https://api.github.com/users/BloamBla/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-11T08:22:48Z","updated_at":"2018-10-11T08:46:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd6c1f8503fbf0aa6f3b624fc2c2b2557a7d7564","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BloamBla/Shape-class/pulls/3/commits","review_comments_url":"https://api.github.com/repos/BloamBla/Shape-class/pulls/3/comments","review_comment_url":"https://api.github.com/repos/BloamBla/Shape-class/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BloamBla/Shape-class/issues/3/comments","statuses_url":"https://api.github.com/repos/BloamBla/Shape-class/statuses/44e7896774cbe833124af6837ba1291c7ec7daee","head":{"label":"BloamBla:feature/master-add-promisses","ref":"feature/master-add-promisses","sha":"44e7896774cbe833124af6837ba1291c7ec7daee","user":{"login":"BloamBla","id":38785016,"node_id":"MDQ6VXNlcjM4Nzg1MDE2","avatar_url":"https://avatars1.githubusercontent.com/u/38785016?v=4","gravatar_id":"","url":"https://api.github.com/users/BloamBla","html_url":"https://github.com/BloamBla","followers_url":"https://api.github.com/users/BloamBla/followers","following_url":"https://api.github.com/users/BloamBla/following{/other_user}","gists_url":"https://api.github.com/users/BloamBla/gists{/gist_id}","starred_url":"https://api.github.com/users/BloamBla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloamBla/subscriptions","organizations_url":"https://api.github.com/users/BloamBla/orgs","repos_url":"https://api.github.com/users/BloamBla/repos","events_url":"https://api.github.com/users/BloamBla/events{/privacy}","received_events_url":"https://api.github.com/users/BloamBla/received_events","type":"User","site_admin":false},"repo":{"id":151395506,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEzOTU1MDY=","name":"Shape-class","full_name":"BloamBla/Shape-class","private":false,"owner":{"login":"BloamBla","id":38785016,"node_id":"MDQ6VXNlcjM4Nzg1MDE2","avatar_url":"https://avatars1.githubusercontent.com/u/38785016?v=4","gravatar_id":"","url":"https://api.github.com/users/BloamBla","html_url":"https://github.com/BloamBla","followers_url":"https://api.github.com/users/BloamBla/followers","following_url":"https://api.github.com/users/BloamBla/following{/other_user}","gists_url":"https://api.github.com/users/BloamBla/gists{/gist_id}","starred_url":"https://api.github.com/users/BloamBla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloamBla/subscriptions","organizations_url":"https://api.github.com/users/BloamBla/orgs","repos_url":"https://api.github.com/users/BloamBla/repos","events_url":"https://api.github.com/users/BloamBla/events{/privacy}","received_events_url":"https://api.github.com/users/BloamBla/received_events","type":"User","site_admin":false},"html_url":"https://github.com/BloamBla/Shape-class","description":null,"fork":false,"url":"https://api.github.com/repos/BloamBla/Shape-class","forks_url":"https://api.github.com/repos/BloamBla/Shape-class/forks","keys_url":"https://api.github.com/repos/BloamBla/Shape-class/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BloamBla/Shape-class/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BloamBla/Shape-class/teams","hooks_url":"https://api.github.com/repos/BloamBla/Shape-class/hooks","issue_events_url":"https://api.github.com/repos/BloamBla/Shape-class/issues/events{/number}","events_url":"https://api.github.com/repos/BloamBla/Shape-class/events","assignees_url":"https://api.github.com/repos/BloamBla/Shape-class/assignees{/user}","branches_url":"https://api.github.com/repos/BloamBla/Shape-class/branches{/branch}","tags_url":"https://api.github.com/repos/BloamBla/Shape-class/tags","blobs_url":"https://api.github.com/repos/BloamBla/Shape-class/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BloamBla/Shape-class/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BloamBla/Shape-class/git/refs{/sha}","trees_url":"https://api.github.com/repos/BloamBla/Shape-class/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BloamBla/Shape-class/statuses/{sha}","languages_url":"https://api.github.com/repos/BloamBla/Shape-class/languages","stargazers_url":"https://api.github.com/repos/BloamBla/Shape-class/stargazers","contributors_url":"https://api.github.com/repos/BloamBla/Shape-class/contributors","subscribers_url":"https://api.github.com/repos/BloamBla/Shape-class/subscribers","subscription_url":"https://api.github.com/repos/BloamBla/Shape-class/subscription","commits_url":"https://api.github.com/repos/BloamBla/Shape-class/commits{/sha}","git_commits_url":"https://api.github.com/repos/BloamBla/Shape-class/git/commits{/sha}","comments_url":"https://api.github.com/repos/BloamBla/Shape-class/comments{/number}","issue_comment_url":"https://api.github.com/repos/BloamBla/Shape-class/issues/comments{/number}","contents_url":"https://api.github.com/repos/BloamBla/Shape-class/contents/{+path}","compare_url":"https://api.github.com/repos/BloamBla/Shape-class/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BloamBla/Shape-class/merges","archive_url":"https://api.github.com/repos/BloamBla/Shape-class/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BloamBla/Shape-class/downloads","issues_url":"https://api.github.com/repos/BloamBla/Shape-class/issues{/number}","pulls_url":"https://api.github.com/repos/BloamBla/Shape-class/pulls{/number}","milestones_url":"https://api.github.com/repos/BloamBla/Shape-class/milestones{/number}","notifications_url":"https://api.github.com/repos/BloamBla/Shape-class/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BloamBla/Shape-class/labels{/name}","releases_url":"https://api.github.com/repos/BloamBla/Shape-class/releases{/id}","deployments_url":"https://api.github.com/repos/BloamBla/Shape-class/deployments","created_at":"2018-10-03T10:25:29Z","updated_at":"2018-10-10T12:24:14Z","pushed_at":"2018-10-11T08:22:48Z","git_url":"git://github.com/BloamBla/Shape-class.git","ssh_url":"git@github.com:BloamBla/Shape-class.git","clone_url":"https://github.com/BloamBla/Shape-class.git","svn_url":"https://github.com/BloamBla/Shape-class","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"BloamBla:master","ref":"master","sha":"07c1fc1f08a017878a18c09704a8f61b5a1181a1","user":{"login":"BloamBla","id":38785016,"node_id":"MDQ6VXNlcjM4Nzg1MDE2","avatar_url":"https://avatars1.githubusercontent.com/u/38785016?v=4","gravatar_id":"","url":"https://api.github.com/users/BloamBla","html_url":"https://github.com/BloamBla","followers_url":"https://api.github.com/users/BloamBla/followers","following_url":"https://api.github.com/users/BloamBla/following{/other_user}","gists_url":"https://api.github.com/users/BloamBla/gists{/gist_id}","starred_url":"https://api.github.com/users/BloamBla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloamBla/subscriptions","organizations_url":"https://api.github.com/users/BloamBla/orgs","repos_url":"https://api.github.com/users/BloamBla/repos","events_url":"https://api.github.com/users/BloamBla/events{/privacy}","received_events_url":"https://api.github.com/users/BloamBla/received_events","type":"User","site_admin":false},"repo":{"id":151395506,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEzOTU1MDY=","name":"Shape-class","full_name":"BloamBla/Shape-class","private":false,"owner":{"login":"BloamBla","id":38785016,"node_id":"MDQ6VXNlcjM4Nzg1MDE2","avatar_url":"https://avatars1.githubusercontent.com/u/38785016?v=4","gravatar_id":"","url":"https://api.github.com/users/BloamBla","html_url":"https://github.com/BloamBla","followers_url":"https://api.github.com/users/BloamBla/followers","following_url":"https://api.github.com/users/BloamBla/following{/other_user}","gists_url":"https://api.github.com/users/BloamBla/gists{/gist_id}","starred_url":"https://api.github.com/users/BloamBla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BloamBla/subscriptions","organizations_url":"https://api.github.com/users/BloamBla/orgs","repos_url":"https://api.github.com/users/BloamBla/repos","events_url":"https://api.github.com/users/BloamBla/events{/privacy}","received_events_url":"https://api.github.com/users/BloamBla/received_events","type":"User","site_admin":false},"html_url":"https://github.com/BloamBla/Shape-class","description":null,"fork":false,"url":"https://api.github.com/repos/BloamBla/Shape-class","forks_url":"https://api.github.com/repos/BloamBla/Shape-class/forks","keys_url":"https://api.github.com/repos/BloamBla/Shape-class/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BloamBla/Shape-class/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BloamBla/Shape-class/teams","hooks_url":"https://api.github.com/repos/BloamBla/Shape-class/hooks","issue_events_url":"https://api.github.com/repos/BloamBla/Shape-class/issues/events{/number}","events_url":"https://api.github.com/repos/BloamBla/Shape-class/events","assignees_url":"https://api.github.com/repos/BloamBla/Shape-class/assignees{/user}","branches_url":"https://api.github.com/repos/BloamBla/Shape-class/branches{/branch}","tags_url":"https://api.github.com/repos/BloamBla/Shape-class/tags","blobs_url":"https://api.github.com/repos/BloamBla/Shape-class/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BloamBla/Shape-class/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BloamBla/Shape-class/git/refs{/sha}","trees_url":"https://api.github.com/repos/BloamBla/Shape-class/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BloamBla/Shape-class/statuses/{sha}","languages_url":"https://api.github.com/repos/BloamBla/Shape-class/languages","stargazers_url":"https://api.github.com/repos/BloamBla/Shape-class/stargazers","contributors_url":"https://api.github.com/repos/BloamBla/Shape-class/contributors","subscribers_url":"https://api.github.com/repos/BloamBla/Shape-class/subscribers","subscription_url":"https://api.github.com/repos/BloamBla/Shape-class/subscription","commits_url":"https://api.github.com/repos/BloamBla/Shape-class/commits{/sha}","git_commits_url":"https://api.github.com/repos/BloamBla/Shape-class/git/commits{/sha}","comments_url":"https://api.github.com/repos/BloamBla/Shape-class/comments{/number}","issue_comment_url":"https://api.github.com/repos/BloamBla/Shape-class/issues/comments{/number}","contents_url":"https://api.github.com/repos/BloamBla/Shape-class/contents/{+path}","compare_url":"https://api.github.com/repos/BloamBla/Shape-class/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BloamBla/Shape-class/merges","archive_url":"https://api.github.com/repos/BloamBla/Shape-class/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BloamBla/Shape-class/downloads","issues_url":"https://api.github.com/repos/BloamBla/Shape-class/issues{/number}","pulls_url":"https://api.github.com/repos/BloamBla/Shape-class/pulls{/number}","milestones_url":"https://api.github.com/repos/BloamBla/Shape-class/milestones{/number}","notifications_url":"https://api.github.com/repos/BloamBla/Shape-class/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BloamBla/Shape-class/labels{/name}","releases_url":"https://api.github.com/repos/BloamBla/Shape-class/releases{/id}","deployments_url":"https://api.github.com/repos/BloamBla/Shape-class/deployments","created_at":"2018-10-03T10:25:29Z","updated_at":"2018-10-10T12:24:14Z","pushed_at":"2018-10-11T08:22:48Z","git_url":"git://github.com/BloamBla/Shape-class.git","ssh_url":"git@github.com:BloamBla/Shape-class.git","clone_url":"https://github.com/BloamBla/Shape-class.git","svn_url":"https://github.com/BloamBla/Shape-class","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BloamBla/Shape-class/pulls/3"},"html":{"href":"https://github.com/BloamBla/Shape-class/pull/3"},"issue":{"href":"https://api.github.com/repos/BloamBla/Shape-class/issues/3"},"comments":{"href":"https://api.github.com/repos/BloamBla/Shape-class/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/BloamBla/Shape-class/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/BloamBla/Shape-class/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BloamBla/Shape-class/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/BloamBla/Shape-class/statuses/44e7896774cbe833124af6837ba1291c7ec7daee"}},"author_association":"OWNER"}}
{"actor":{"display_login":"burymm"}}