{"action":"created","comment":{"url":"https://api.github.com/repos/asilvas/node-image-steam/pulls/comments/82708435","pull_request_review_id":3597199,"id":82708435,"diff_hunk":"@@ -1,20 +1,35 @@\n var helpers = require('../../helpers');\r\n+var _ = require('lodash');\r\n \r\n module.exports = function(context, stepInfo) {\r\n   var img = context.processedImage;\r\n   helpers.dimension.resolveStep(img, stepInfo);\r\n-\r\n-  var anchorX = stepInfo.anchor && stepInfo.anchor.length === 2 && stepInfo.anchor[1];\r\n-  var anchorY = stepInfo.anchor && stepInfo.anchor.length === 2 && stepInfo.anchor[0];\r\n+  var anchor = stepInfo.anchor || 'cc';\r\n+  var anchorX = anchor.length === 2 ? anchor[1] : 'c';\r\n+  var anchorY = anchor.length === 2 ? anchor[0] : 'c';\r\n \r\n   if (isNaN(stepInfo.top)) {\r\n     stepInfo.top = 0;\r\n+\r\n+    if (stepInfo.anchorY) {\r","path":"lib/processor/steps/crop.js","position":null,"original_position":17,"commit_id":"9686a632f3f6829af8e8360963f2b1b16f6b00aa","original_commit_id":"9e2f45598ea428fd886341400336b7704144619a","user":{"login":"chrishinrichs","id":7255994,"avatar_url":"https://avatars.githubusercontent.com/u/7255994?v=3","gravatar_id":"","url":"https://api.github.com/users/chrishinrichs","html_url":"https://github.com/chrishinrichs","followers_url":"https://api.github.com/users/chrishinrichs/followers","following_url":"https://api.github.com/users/chrishinrichs/following{/other_user}","gists_url":"https://api.github.com/users/chrishinrichs/gists{/gist_id}","starred_url":"https://api.github.com/users/chrishinrichs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrishinrichs/subscriptions","organizations_url":"https://api.github.com/users/chrishinrichs/orgs","repos_url":"https://api.github.com/users/chrishinrichs/repos","events_url":"https://api.github.com/users/chrishinrichs/events{/privacy}","received_events_url":"https://api.github.com/users/chrishinrichs/received_events","type":"User","site_admin":false},"body":"I moved all the logic to `dimension.js` and added support for offsets - take a look and see if everything looks right ","created_at":"2016-10-11T00:49:48Z","updated_at":"2016-10-11T00:49:48Z","html_url":"https://github.com/asilvas/node-image-steam/pull/40#discussion_r82708435","pull_request_url":"https://api.github.com/repos/asilvas/node-image-steam/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/asilvas/node-image-steam/pulls/comments/82708435"},"html":{"href":"https://github.com/asilvas/node-image-steam/pull/40#discussion_r82708435"},"pull_request":{"href":"https://api.github.com/repos/asilvas/node-image-steam/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/asilvas/node-image-steam/pulls/40","id":88360086,"html_url":"https://github.com/asilvas/node-image-steam/pull/40","diff_url":"https://github.com/asilvas/node-image-steam/pull/40.diff","patch_url":"https://github.com/asilvas/node-image-steam/pull/40.patch","issue_url":"https://api.github.com/repos/asilvas/node-image-steam/issues/40","number":40,"state":"open","locked":false,"title":"Add support for absolutely positioning the anchor for a crop operation","user":{"login":"chrishinrichs","id":7255994,"avatar_url":"https://avatars.githubusercontent.com/u/7255994?v=3","gravatar_id":"","url":"https://api.github.com/users/chrishinrichs","html_url":"https://github.com/chrishinrichs","followers_url":"https://api.github.com/users/chrishinrichs/followers","following_url":"https://api.github.com/users/chrishinrichs/following{/other_user}","gists_url":"https://api.github.com/users/chrishinrichs/gists{/gist_id}","starred_url":"https://api.github.com/users/chrishinrichs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrishinrichs/subscriptions","organizations_url":"https://api.github.com/users/chrishinrichs/orgs","repos_url":"https://api.github.com/users/chrishinrichs/repos","events_url":"https://api.github.com/users/chrishinrichs/events{/privacy}","received_events_url":"https://api.github.com/users/chrishinrichs/received_events","type":"User","site_admin":false},"body":"This adds support for specifying `ay` and `ax` for anchorY and anchorX during a crop operation. Cropping is thus more flexible than limiting it to the currently supported 9 quadrants (tl, tc, tr, cl, cc, cr, bl, bc, br).","created_at":"2016-10-06T23:37:24Z","updated_at":"2016-10-11T00:49:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"680b673e51030112b594bbe02948855c9211c71a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/asilvas/node-image-steam/pulls/40/commits","review_comments_url":"https://api.github.com/repos/asilvas/node-image-steam/pulls/40/comments","review_comment_url":"https://api.github.com/repos/asilvas/node-image-steam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/asilvas/node-image-steam/issues/40/comments","statuses_url":"https://api.github.com/repos/asilvas/node-image-steam/statuses/9686a632f3f6829af8e8360963f2b1b16f6b00aa","head":{"label":"chrishinrichs:enhance-anchors","ref":"enhance-anchors","sha":"9686a632f3f6829af8e8360963f2b1b16f6b00aa","user":{"login":"chrishinrichs","id":7255994,"avatar_url":"https://avatars.githubusercontent.com/u/7255994?v=3","gravatar_id":"","url":"https://api.github.com/users/chrishinrichs","html_url":"https://github.com/chrishinrichs","followers_url":"https://api.github.com/users/chrishinrichs/followers","following_url":"https://api.github.com/users/chrishinrichs/following{/other_user}","gists_url":"https://api.github.com/users/chrishinrichs/gists{/gist_id}","starred_url":"https://api.github.com/users/chrishinrichs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrishinrichs/subscriptions","organizations_url":"https://api.github.com/users/chrishinrichs/orgs","repos_url":"https://api.github.com/users/chrishinrichs/repos","events_url":"https://api.github.com/users/chrishinrichs/events{/privacy}","received_events_url":"https://api.github.com/users/chrishinrichs/received_events","type":"User","site_admin":false},"repo":{"id":58877601,"name":"node-image-steam","full_name":"chrishinrichs/node-image-steam","owner":{"login":"chrishinrichs","id":7255994,"avatar_url":"https://avatars.githubusercontent.com/u/7255994?v=3","gravatar_id":"","url":"https://api.github.com/users/chrishinrichs","html_url":"https://github.com/chrishinrichs","followers_url":"https://api.github.com/users/chrishinrichs/followers","following_url":"https://api.github.com/users/chrishinrichs/following{/other_user}","gists_url":"https://api.github.com/users/chrishinrichs/gists{/gist_id}","starred_url":"https://api.github.com/users/chrishinrichs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrishinrichs/subscriptions","organizations_url":"https://api.github.com/users/chrishinrichs/orgs","repos_url":"https://api.github.com/users/chrishinrichs/repos","events_url":"https://api.github.com/users/chrishinrichs/events{/privacy}","received_events_url":"https://api.github.com/users/chrishinrichs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chrishinrichs/node-image-steam","description":"A simple, fast, and highly customizable on-the-fly image manipulation web server built atop Node.js","fork":true,"url":"https://api.github.com/repos/chrishinrichs/node-image-steam","forks_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/forks","keys_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/teams","hooks_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/hooks","issue_events_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/issues/events{/number}","events_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/events","assignees_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/assignees{/user}","branches_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/branches{/branch}","tags_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/tags","blobs_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/git/refs{/sha}","trees_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/statuses/{sha}","languages_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/languages","stargazers_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/stargazers","contributors_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/contributors","subscribers_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/subscribers","subscription_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/subscription","commits_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/commits{/sha}","git_commits_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/git/commits{/sha}","comments_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/comments{/number}","issue_comment_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/issues/comments{/number}","contents_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/contents/{+path}","compare_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/merges","archive_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/downloads","issues_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/issues{/number}","pulls_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/pulls{/number}","milestones_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/milestones{/number}","notifications_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/labels{/name}","releases_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/releases{/id}","deployments_url":"https://api.github.com/repos/chrishinrichs/node-image-steam/deployments","created_at":"2016-05-15T18:32:32Z","updated_at":"2016-05-15T18:32:33Z","pushed_at":"2016-10-11T00:47:59Z","git_url":"git://github.com/chrishinrichs/node-image-steam.git","ssh_url":"git@github.com:chrishinrichs/node-image-steam.git","clone_url":"https://github.com/chrishinrichs/node-image-steam.git","svn_url":"https://github.com/chrishinrichs/node-image-steam","homepage":"","size":6449,"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":"asilvas:master","ref":"master","sha":"07cf3491c6be892b0ca2db4a123b874f8209a425","user":{"login":"asilvas","id":981007,"avatar_url":"https://avatars.githubusercontent.com/u/981007?v=3","gravatar_id":"","url":"https://api.github.com/users/asilvas","html_url":"https://github.com/asilvas","followers_url":"https://api.github.com/users/asilvas/followers","following_url":"https://api.github.com/users/asilvas/following{/other_user}","gists_url":"https://api.github.com/users/asilvas/gists{/gist_id}","starred_url":"https://api.github.com/users/asilvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asilvas/subscriptions","organizations_url":"https://api.github.com/users/asilvas/orgs","repos_url":"https://api.github.com/users/asilvas/repos","events_url":"https://api.github.com/users/asilvas/events{/privacy}","received_events_url":"https://api.github.com/users/asilvas/received_events","type":"User","site_admin":false},"repo":{"id":39019649,"name":"node-image-steam","full_name":"asilvas/node-image-steam","owner":{"login":"asilvas","id":981007,"avatar_url":"https://avatars.githubusercontent.com/u/981007?v=3","gravatar_id":"","url":"https://api.github.com/users/asilvas","html_url":"https://github.com/asilvas","followers_url":"https://api.github.com/users/asilvas/followers","following_url":"https://api.github.com/users/asilvas/following{/other_user}","gists_url":"https://api.github.com/users/asilvas/gists{/gist_id}","starred_url":"https://api.github.com/users/asilvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asilvas/subscriptions","organizations_url":"https://api.github.com/users/asilvas/orgs","repos_url":"https://api.github.com/users/asilvas/repos","events_url":"https://api.github.com/users/asilvas/events{/privacy}","received_events_url":"https://api.github.com/users/asilvas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asilvas/node-image-steam","description":"A simple, fast, and highly customizable on-the-fly image manipulation web server built atop Node.js","fork":false,"url":"https://api.github.com/repos/asilvas/node-image-steam","forks_url":"https://api.github.com/repos/asilvas/node-image-steam/forks","keys_url":"https://api.github.com/repos/asilvas/node-image-steam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asilvas/node-image-steam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asilvas/node-image-steam/teams","hooks_url":"https://api.github.com/repos/asilvas/node-image-steam/hooks","issue_events_url":"https://api.github.com/repos/asilvas/node-image-steam/issues/events{/number}","events_url":"https://api.github.com/repos/asilvas/node-image-steam/events","assignees_url":"https://api.github.com/repos/asilvas/node-image-steam/assignees{/user}","branches_url":"https://api.github.com/repos/asilvas/node-image-steam/branches{/branch}","tags_url":"https://api.github.com/repos/asilvas/node-image-steam/tags","blobs_url":"https://api.github.com/repos/asilvas/node-image-steam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asilvas/node-image-steam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asilvas/node-image-steam/git/refs{/sha}","trees_url":"https://api.github.com/repos/asilvas/node-image-steam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asilvas/node-image-steam/statuses/{sha}","languages_url":"https://api.github.com/repos/asilvas/node-image-steam/languages","stargazers_url":"https://api.github.com/repos/asilvas/node-image-steam/stargazers","contributors_url":"https://api.github.com/repos/asilvas/node-image-steam/contributors","subscribers_url":"https://api.github.com/repos/asilvas/node-image-steam/subscribers","subscription_url":"https://api.github.com/repos/asilvas/node-image-steam/subscription","commits_url":"https://api.github.com/repos/asilvas/node-image-steam/commits{/sha}","git_commits_url":"https://api.github.com/repos/asilvas/node-image-steam/git/commits{/sha}","comments_url":"https://api.github.com/repos/asilvas/node-image-steam/comments{/number}","issue_comment_url":"https://api.github.com/repos/asilvas/node-image-steam/issues/comments{/number}","contents_url":"https://api.github.com/repos/asilvas/node-image-steam/contents/{+path}","compare_url":"https://api.github.com/repos/asilvas/node-image-steam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asilvas/node-image-steam/merges","archive_url":"https://api.github.com/repos/asilvas/node-image-steam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asilvas/node-image-steam/downloads","issues_url":"https://api.github.com/repos/asilvas/node-image-steam/issues{/number}","pulls_url":"https://api.github.com/repos/asilvas/node-image-steam/pulls{/number}","milestones_url":"https://api.github.com/repos/asilvas/node-image-steam/milestones{/number}","notifications_url":"https://api.github.com/repos/asilvas/node-image-steam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asilvas/node-image-steam/labels{/name}","releases_url":"https://api.github.com/repos/asilvas/node-image-steam/releases{/id}","deployments_url":"https://api.github.com/repos/asilvas/node-image-steam/deployments","created_at":"2015-07-13T15:11:18Z","updated_at":"2016-09-29T17:06:55Z","pushed_at":"2016-10-11T00:48:00Z","git_url":"git://github.com/asilvas/node-image-steam.git","ssh_url":"git@github.com:asilvas/node-image-steam.git","clone_url":"https://github.com/asilvas/node-image-steam.git","svn_url":"https://github.com/asilvas/node-image-steam","homepage":"","size":6449,"stargazers_count":36,"watchers_count":36,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":10,"forks":4,"open_issues":10,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/asilvas/node-image-steam/pulls/40"},"html":{"href":"https://github.com/asilvas/node-image-steam/pull/40"},"issue":{"href":"https://api.github.com/repos/asilvas/node-image-steam/issues/40"},"comments":{"href":"https://api.github.com/repos/asilvas/node-image-steam/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/asilvas/node-image-steam/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/asilvas/node-image-steam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/asilvas/node-image-steam/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/asilvas/node-image-steam/statuses/9686a632f3f6829af8e8360963f2b1b16f6b00aa"}}}}
{"actor":{"display_login":"chrishinrichs"}}