{"action":"created","comment":{"url":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/comments/51738586","id":51738586,"diff_hunk":"@@ -226,6 +226,25 @@\n             };\n \n             /**\n+             * Update selection dimensions to new width and height.\n+             * If width and height are correct -- reset all transformations to avoid positions issues.\n+             *\n+             * @param int width\n+             * @param int height\n+             */\n+            ImageEditorFactory.prototype.updateSelectionDimensions = function(width, height) {\n+                var parentSize = this.parentSize();\n+                if (width <= parentSize.width && height <= parentSize.height) {","path":"src/js/pm-image-editor.js","position":12,"original_position":12,"commit_id":"b176af4374d8e93efb2f0b04ae2bbdaf1da71728","original_commit_id":"b176af4374d8e93efb2f0b04ae2bbdaf1da71728","user":{"login":"amyboyd","id":398210,"avatar_url":"https://avatars.githubusercontent.com/u/398210?v=3","gravatar_id":"","url":"https://api.github.com/users/amyboyd","html_url":"https://github.com/amyboyd","followers_url":"https://api.github.com/users/amyboyd/followers","following_url":"https://api.github.com/users/amyboyd/following{/other_user}","gists_url":"https://api.github.com/users/amyboyd/gists{/gist_id}","starred_url":"https://api.github.com/users/amyboyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amyboyd/subscriptions","organizations_url":"https://api.github.com/users/amyboyd/orgs","repos_url":"https://api.github.com/users/amyboyd/repos","events_url":"https://api.github.com/users/amyboyd/events{/privacy}","received_events_url":"https://api.github.com/users/amyboyd/received_events","type":"User","site_admin":false},"body":"If the given dimensions are greater than the image, this is bad, so maybe throw an error?","created_at":"2016-02-03T15:46:59Z","updated_at":"2016-02-03T15:46:59Z","html_url":"https://github.com/partnermarketing/pm-image-editor/pull/12#discussion_r51738586","pull_request_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/comments/51738586"},"html":{"href":"https://github.com/partnermarketing/pm-image-editor/pull/12#discussion_r51738586"},"pull_request":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/12","id":58154216,"html_url":"https://github.com/partnermarketing/pm-image-editor/pull/12","diff_url":"https://github.com/partnermarketing/pm-image-editor/pull/12.diff","patch_url":"https://github.com/partnermarketing/pm-image-editor/pull/12.patch","issue_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues/12","number":12,"state":"open","locked":false,"title":"Selection dimensions","user":{"login":"antonvas","id":2622169,"avatar_url":"https://avatars.githubusercontent.com/u/2622169?v=3","gravatar_id":"","url":"https://api.github.com/users/antonvas","html_url":"https://github.com/antonvas","followers_url":"https://api.github.com/users/antonvas/followers","following_url":"https://api.github.com/users/antonvas/following{/other_user}","gists_url":"https://api.github.com/users/antonvas/gists{/gist_id}","starred_url":"https://api.github.com/users/antonvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonvas/subscriptions","organizations_url":"https://api.github.com/users/antonvas/orgs","repos_url":"https://api.github.com/users/antonvas/repos","events_url":"https://api.github.com/users/antonvas/events{/privacy}","received_events_url":"https://api.github.com/users/antonvas/received_events","type":"User","site_admin":false},"body":"Update selection size for testing. \r\nFor https://github.com/partnermarketing/pm-image-editor/issues/9\r\n\r\nSample: http://partnermarketing.github.io/pm-image-editor/index.html?branch=selection-dimensions","created_at":"2016-02-03T15:38:57Z","updated_at":"2016-02-03T15:46:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cff5155724e22995a8b145e1bb345209438fd608","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/12/commits","review_comments_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/12/comments","review_comment_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues/12/comments","statuses_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/statuses/b176af4374d8e93efb2f0b04ae2bbdaf1da71728","head":{"label":"partnermarketing:selection-dimensions","ref":"selection-dimensions","sha":"b176af4374d8e93efb2f0b04ae2bbdaf1da71728","user":{"login":"partnermarketing","id":3856506,"avatar_url":"https://avatars.githubusercontent.com/u/3856506?v=3","gravatar_id":"","url":"https://api.github.com/users/partnermarketing","html_url":"https://github.com/partnermarketing","followers_url":"https://api.github.com/users/partnermarketing/followers","following_url":"https://api.github.com/users/partnermarketing/following{/other_user}","gists_url":"https://api.github.com/users/partnermarketing/gists{/gist_id}","starred_url":"https://api.github.com/users/partnermarketing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/partnermarketing/subscriptions","organizations_url":"https://api.github.com/users/partnermarketing/orgs","repos_url":"https://api.github.com/users/partnermarketing/repos","events_url":"https://api.github.com/users/partnermarketing/events{/privacy}","received_events_url":"https://api.github.com/users/partnermarketing/received_events","type":"Organization","site_admin":false},"repo":{"id":45837284,"name":"pm-image-editor","full_name":"partnermarketing/pm-image-editor","owner":{"login":"partnermarketing","id":3856506,"avatar_url":"https://avatars.githubusercontent.com/u/3856506?v=3","gravatar_id":"","url":"https://api.github.com/users/partnermarketing","html_url":"https://github.com/partnermarketing","followers_url":"https://api.github.com/users/partnermarketing/followers","following_url":"https://api.github.com/users/partnermarketing/following{/other_user}","gists_url":"https://api.github.com/users/partnermarketing/gists{/gist_id}","starred_url":"https://api.github.com/users/partnermarketing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/partnermarketing/subscriptions","organizations_url":"https://api.github.com/users/partnermarketing/orgs","repos_url":"https://api.github.com/users/partnermarketing/repos","events_url":"https://api.github.com/users/partnermarketing/events{/privacy}","received_events_url":"https://api.github.com/users/partnermarketing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/partnermarketing/pm-image-editor","description":"AngularJS directive to manipulate images like crop, resize, rotate, flip","fork":false,"url":"https://api.github.com/repos/partnermarketing/pm-image-editor","forks_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/forks","keys_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/teams","hooks_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/hooks","issue_events_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues/events{/number}","events_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/events","assignees_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/assignees{/user}","branches_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/branches{/branch}","tags_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/tags","blobs_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/refs{/sha}","trees_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/statuses/{sha}","languages_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/languages","stargazers_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/stargazers","contributors_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/contributors","subscribers_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/subscribers","subscription_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/subscription","commits_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/commits{/sha}","git_commits_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/commits{/sha}","comments_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/comments{/number}","issue_comment_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues/comments{/number}","contents_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/contents/{+path}","compare_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/merges","archive_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/downloads","issues_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues{/number}","pulls_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls{/number}","milestones_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/milestones{/number}","notifications_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/labels{/name}","releases_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/releases{/id}","deployments_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/deployments","created_at":"2015-11-09T12:42:50Z","updated_at":"2016-01-19T23:33:33Z","pushed_at":"2016-02-03T15:38:58Z","git_url":"git://github.com/partnermarketing/pm-image-editor.git","ssh_url":"git@github.com:partnermarketing/pm-image-editor.git","clone_url":"https://github.com/partnermarketing/pm-image-editor.git","svn_url":"https://github.com/partnermarketing/pm-image-editor","homepage":null,"size":1134,"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":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"partnermarketing:master","ref":"master","sha":"8b45f8c2848e20accc25db0e91e7f79b1f82f5cd","user":{"login":"partnermarketing","id":3856506,"avatar_url":"https://avatars.githubusercontent.com/u/3856506?v=3","gravatar_id":"","url":"https://api.github.com/users/partnermarketing","html_url":"https://github.com/partnermarketing","followers_url":"https://api.github.com/users/partnermarketing/followers","following_url":"https://api.github.com/users/partnermarketing/following{/other_user}","gists_url":"https://api.github.com/users/partnermarketing/gists{/gist_id}","starred_url":"https://api.github.com/users/partnermarketing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/partnermarketing/subscriptions","organizations_url":"https://api.github.com/users/partnermarketing/orgs","repos_url":"https://api.github.com/users/partnermarketing/repos","events_url":"https://api.github.com/users/partnermarketing/events{/privacy}","received_events_url":"https://api.github.com/users/partnermarketing/received_events","type":"Organization","site_admin":false},"repo":{"id":45837284,"name":"pm-image-editor","full_name":"partnermarketing/pm-image-editor","owner":{"login":"partnermarketing","id":3856506,"avatar_url":"https://avatars.githubusercontent.com/u/3856506?v=3","gravatar_id":"","url":"https://api.github.com/users/partnermarketing","html_url":"https://github.com/partnermarketing","followers_url":"https://api.github.com/users/partnermarketing/followers","following_url":"https://api.github.com/users/partnermarketing/following{/other_user}","gists_url":"https://api.github.com/users/partnermarketing/gists{/gist_id}","starred_url":"https://api.github.com/users/partnermarketing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/partnermarketing/subscriptions","organizations_url":"https://api.github.com/users/partnermarketing/orgs","repos_url":"https://api.github.com/users/partnermarketing/repos","events_url":"https://api.github.com/users/partnermarketing/events{/privacy}","received_events_url":"https://api.github.com/users/partnermarketing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/partnermarketing/pm-image-editor","description":"AngularJS directive to manipulate images like crop, resize, rotate, flip","fork":false,"url":"https://api.github.com/repos/partnermarketing/pm-image-editor","forks_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/forks","keys_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/teams","hooks_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/hooks","issue_events_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues/events{/number}","events_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/events","assignees_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/assignees{/user}","branches_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/branches{/branch}","tags_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/tags","blobs_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/refs{/sha}","trees_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/statuses/{sha}","languages_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/languages","stargazers_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/stargazers","contributors_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/contributors","subscribers_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/subscribers","subscription_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/subscription","commits_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/commits{/sha}","git_commits_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/git/commits{/sha}","comments_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/comments{/number}","issue_comment_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues/comments{/number}","contents_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/contents/{+path}","compare_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/merges","archive_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/downloads","issues_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues{/number}","pulls_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls{/number}","milestones_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/milestones{/number}","notifications_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/labels{/name}","releases_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/releases{/id}","deployments_url":"https://api.github.com/repos/partnermarketing/pm-image-editor/deployments","created_at":"2015-11-09T12:42:50Z","updated_at":"2016-01-19T23:33:33Z","pushed_at":"2016-02-03T15:38:58Z","git_url":"git://github.com/partnermarketing/pm-image-editor.git","ssh_url":"git@github.com:partnermarketing/pm-image-editor.git","clone_url":"https://github.com/partnermarketing/pm-image-editor.git","svn_url":"https://github.com/partnermarketing/pm-image-editor","homepage":null,"size":1134,"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":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/12"},"html":{"href":"https://github.com/partnermarketing/pm-image-editor/pull/12"},"issue":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues/12"},"comments":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/partnermarketing/pm-image-editor/statuses/b176af4374d8e93efb2f0b04ae2bbdaf1da71728"}}}}