{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/comments/83575109","pull_request_review_id":4409670,"id":83575109,"diff_hunk":"@@ -71,8 +71,43 @@\n    * Проверяет, валидны ли данные, в форме кадрирования.\n    * @return {boolean}\n    */\n+  var resizeX = document.getElementById('resize-x');\n+  var resizeY = document.getElementById('resize-y');\n+  var resizeSize = document.getElementById('resize-size');\n+  var resizeFwd = document.getElementById('resize-fwd');\n+  resizeFwd.disabled = true;\n+  resizeX.required = resizeY.required = resizeSize.required = true;\n+\n+  resizeX.min = resizeY.min = resizeSize.min = 0;\n+\n   var resizeFormIsValid = function() {\n-    return true;\n+    var x = Number(resizeX.value);\n+    var y = Number(resizeY.value);\n+    var size = Number(resizeSize.value);\n+    var imageWidth = currentResizer._image.naturalWidth;\n+    var imageHeight = currentResizer._image.naturalHeight;\n+    resizeX.max = imageWidth - parseInt(resizeSize.value, 10);","path":"src/js/upload.js","position":20,"original_position":20,"commit_id":"9dbf4883d99b72d07e0a77ac447bedb989cc9080","original_commit_id":"9dbf4883d99b72d07e0a77ac447bedb989cc9080","user":{"login":"kaineer","id":132632,"avatar_url":"https://avatars.githubusercontent.com/u/132632?v=3","gravatar_id":"","url":"https://api.github.com/users/kaineer","html_url":"https://github.com/kaineer","followers_url":"https://api.github.com/users/kaineer/followers","following_url":"https://api.github.com/users/kaineer/following{/other_user}","gists_url":"https://api.github.com/users/kaineer/gists{/gist_id}","starred_url":"https://api.github.com/users/kaineer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaineer/subscriptions","organizations_url":"https://api.github.com/users/kaineer/orgs","repos_url":"https://api.github.com/users/kaineer/repos","events_url":"https://api.github.com/users/kaineer/events{/privacy}","received_events_url":"https://api.github.com/users/kaineer/received_events","type":"User","site_admin":false},"body":"Кстати, раз уж ты выше получаешь `size`, можно использовать его вместо `parseInt(…)`?","created_at":"2016-10-17T04:04:43Z","updated_at":"2016-10-17T04:04:43Z","html_url":"https://github.com/htmlacademy-javascript/7570-kekstagram/pull/6#discussion_r83575109","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/comments/83575109"},"html":{"href":"https://github.com/htmlacademy-javascript/7570-kekstagram/pull/6#discussion_r83575109"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/6","id":89506614,"html_url":"https://github.com/htmlacademy-javascript/7570-kekstagram/pull/6","diff_url":"https://github.com/htmlacademy-javascript/7570-kekstagram/pull/6.diff","patch_url":"https://github.com/htmlacademy-javascript/7570-kekstagram/pull/6.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/issues/6","number":6,"state":"open","locked":false,"title":"#12 Валидация","user":{"login":"HardFrontend","id":22621588,"avatar_url":"https://avatars.githubusercontent.com/u/22621588?v=3","gravatar_id":"","url":"https://api.github.com/users/HardFrontend","html_url":"https://github.com/HardFrontend","followers_url":"https://api.github.com/users/HardFrontend/followers","following_url":"https://api.github.com/users/HardFrontend/following{/other_user}","gists_url":"https://api.github.com/users/HardFrontend/gists{/gist_id}","starred_url":"https://api.github.com/users/HardFrontend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HardFrontend/subscriptions","organizations_url":"https://api.github.com/users/HardFrontend/orgs","repos_url":"https://api.github.com/users/HardFrontend/repos","events_url":"https://api.github.com/users/HardFrontend/events{/privacy}","received_events_url":"https://api.github.com/users/HardFrontend/received_events","type":"User","site_admin":false},"body":"#12 Валидация","created_at":"2016-10-15T21:07:25Z","updated_at":"2016-10-17T04:04:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"203c15b8ba1ea33318b93326e9e6c554aa7f5f80","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/6/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/6/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/issues/6/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/statuses/9dbf4883d99b72d07e0a77ac447bedb989cc9080","head":{"label":"HardFrontend:module3-task1","ref":"module3-task1","sha":"9dbf4883d99b72d07e0a77ac447bedb989cc9080","user":{"login":"HardFrontend","id":22621588,"avatar_url":"https://avatars.githubusercontent.com/u/22621588?v=3","gravatar_id":"","url":"https://api.github.com/users/HardFrontend","html_url":"https://github.com/HardFrontend","followers_url":"https://api.github.com/users/HardFrontend/followers","following_url":"https://api.github.com/users/HardFrontend/following{/other_user}","gists_url":"https://api.github.com/users/HardFrontend/gists{/gist_id}","starred_url":"https://api.github.com/users/HardFrontend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HardFrontend/subscriptions","organizations_url":"https://api.github.com/users/HardFrontend/orgs","repos_url":"https://api.github.com/users/HardFrontend/repos","events_url":"https://api.github.com/users/HardFrontend/events{/privacy}","received_events_url":"https://api.github.com/users/HardFrontend/received_events","type":"User","site_admin":false},"repo":{"id":70178735,"name":"7570-kekstagram","full_name":"HardFrontend/7570-kekstagram","owner":{"login":"HardFrontend","id":22621588,"avatar_url":"https://avatars.githubusercontent.com/u/22621588?v=3","gravatar_id":"","url":"https://api.github.com/users/HardFrontend","html_url":"https://github.com/HardFrontend","followers_url":"https://api.github.com/users/HardFrontend/followers","following_url":"https://api.github.com/users/HardFrontend/following{/other_user}","gists_url":"https://api.github.com/users/HardFrontend/gists{/gist_id}","starred_url":"https://api.github.com/users/HardFrontend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HardFrontend/subscriptions","organizations_url":"https://api.github.com/users/HardFrontend/orgs","repos_url":"https://api.github.com/users/HardFrontend/repos","events_url":"https://api.github.com/users/HardFrontend/events{/privacy}","received_events_url":"https://api.github.com/users/HardFrontend/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HardFrontend/7570-kekstagram","description":"Удовенко Марина","fork":true,"url":"https://api.github.com/repos/HardFrontend/7570-kekstagram","forks_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/forks","keys_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/teams","hooks_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/hooks","issue_events_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/issues/events{/number}","events_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/events","assignees_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/assignees{/user}","branches_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/branches{/branch}","tags_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/tags","blobs_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/git/refs{/sha}","trees_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/statuses/{sha}","languages_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/languages","stargazers_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/stargazers","contributors_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/contributors","subscribers_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/subscribers","subscription_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/subscription","commits_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/commits{/sha}","git_commits_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/git/commits{/sha}","comments_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/comments{/number}","issue_comment_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/issues/comments{/number}","contents_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/contents/{+path}","compare_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/merges","archive_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/downloads","issues_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/issues{/number}","pulls_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/pulls{/number}","milestones_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/milestones{/number}","notifications_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/labels{/name}","releases_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/releases{/id}","deployments_url":"https://api.github.com/repos/HardFrontend/7570-kekstagram/deployments","created_at":"2016-10-06T17:54:01Z","updated_at":"2016-10-06T17:54:02Z","pushed_at":"2016-10-16T20:46:07Z","git_url":"git://github.com/HardFrontend/7570-kekstagram.git","ssh_url":"git@github.com:HardFrontend/7570-kekstagram.git","clone_url":"https://github.com/HardFrontend/7570-kekstagram.git","svn_url":"https://github.com/HardFrontend/7570-kekstagram","homepage":null,"size":4336,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"htmlacademy-javascript:master","ref":"master","sha":"66ef7c1061241be4c19f794d454e4126082d51d7","user":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars.githubusercontent.com/u/14179712?v=3","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":70178561,"name":"7570-kekstagram","full_name":"htmlacademy-javascript/7570-kekstagram","owner":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars.githubusercontent.com/u/14179712?v=3","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-javascript/7570-kekstagram","description":"Удовенко Марина","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram","forks_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/deployments","created_at":"2016-10-06T17:51:54Z","updated_at":"2016-10-06T18:37:49Z","pushed_at":"2016-10-16T20:46:08Z","git_url":"git://github.com/htmlacademy-javascript/7570-kekstagram.git","ssh_url":"git@github.com:htmlacademy-javascript/7570-kekstagram.git","clone_url":"https://github.com/htmlacademy-javascript/7570-kekstagram.git","svn_url":"https://github.com/htmlacademy-javascript/7570-kekstagram","homepage":"https://github.com/HardFrontend/7570-kekstagram","size":4329,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/6"},"html":{"href":"https://github.com/htmlacademy-javascript/7570-kekstagram/pull/6"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/issues/6"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/7570-kekstagram/statuses/9dbf4883d99b72d07e0a77ac447bedb989cc9080"}}}}
{"actor":{"display_login":"kaineer"}}