{"action":"created","comment":{"url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/comments/68882897","id":68882897,"diff_hunk":"@@ -39,6 +41,14 @@ export class Scroller {\n \t\tthis.createInterval();\n \t}\n \n+  clientHeightKey() {return !this.horizontal ? 'clientHeight' : 'clientWidth'}\n+  offsetHeightKey() {return !this.horizontal ? 'offsetHeight' : 'offsetWidth'}\n+  scrollHeightKey() {return !this.horizontal ? 'scrollHeight' : 'scrollWidth'}\n+  pageYOffsetKey()  {return !this.horizontal ? 'pageYOffset'  : 'pageXOffset'}\n+  offsetTopKey()    {return !this.horizontal ? 'offsetTop'    : 'offsetLeft'}\n+  scrollTopKey()    {return !this.horizontal ? 'scrollTop'    : 'scrollLeft'}\n+  topKey()          {return !this.horizontal ? 'top'          : 'left'}\n+","path":"src/scroller.ts","position":22,"original_position":22,"commit_id":"bfa866f7a99ae636c7e9ea5513d5549420ca5e87","original_commit_id":"bfa866f7a99ae636c7e9ea5513d5549420ca5e87","user":{"login":"emeyekayee","id":990041,"avatar_url":"https://avatars.githubusercontent.com/u/990041?v=3","gravatar_id":"","url":"https://api.github.com/users/emeyekayee","html_url":"https://github.com/emeyekayee","followers_url":"https://api.github.com/users/emeyekayee/followers","following_url":"https://api.github.com/users/emeyekayee/following{/other_user}","gists_url":"https://api.github.com/users/emeyekayee/gists{/gist_id}","starred_url":"https://api.github.com/users/emeyekayee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emeyekayee/subscriptions","organizations_url":"https://api.github.com/users/emeyekayee/orgs","repos_url":"https://api.github.com/users/emeyekayee/repos","events_url":"https://api.github.com/users/emeyekayee/events{/privacy}","received_events_url":"https://api.github.com/users/emeyekayee/received_events","type":"User","site_admin":false},"body":"Good idea.  It might take a couple of days but I'll do that.","created_at":"2016-06-29T04:15:32Z","updated_at":"2016-06-29T04:15:32Z","html_url":"https://github.com/orizens/angular2-infinite-scroll/pull/42#discussion_r68882897","pull_request_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/comments/68882897"},"html":{"href":"https://github.com/orizens/angular2-infinite-scroll/pull/42#discussion_r68882897"},"pull_request":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/42","id":75198083,"html_url":"https://github.com/orizens/angular2-infinite-scroll/pull/42","diff_url":"https://github.com/orizens/angular2-infinite-scroll/pull/42.diff","patch_url":"https://github.com/orizens/angular2-infinite-scroll/pull/42.patch","issue_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/issues/42","number":42,"state":"open","locked":false,"title":"Horizontal scroll","user":{"login":"emeyekayee","id":990041,"avatar_url":"https://avatars.githubusercontent.com/u/990041?v=3","gravatar_id":"","url":"https://api.github.com/users/emeyekayee","html_url":"https://github.com/emeyekayee","followers_url":"https://api.github.com/users/emeyekayee/followers","following_url":"https://api.github.com/users/emeyekayee/following{/other_user}","gists_url":"https://api.github.com/users/emeyekayee/gists{/gist_id}","starred_url":"https://api.github.com/users/emeyekayee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emeyekayee/subscriptions","organizations_url":"https://api.github.com/users/emeyekayee/orgs","repos_url":"https://api.github.com/users/emeyekayee/repos","events_url":"https://api.github.com/users/emeyekayee/events{/privacy}","received_events_url":"https://api.github.com/users/emeyekayee/received_events","type":"User","site_admin":false},"body":"I've been working on adding horizontal scrolling.  Are you open to a PR?\r\n\r\nThere are two main issues:\r\n 1) Switching property names when accessing DOM elements (eg clientHeight vs clientWidth).  Scroller and InfiniteScroll now have an addition boolean parameter 'horizontal'\r\n\r\n 2) As far as triggering events (scrolledUp/scrolled) I needed a bit more control for what I was doing.  I needed to know the actual scroll position, so I added another parameter 'alwaysCallback' and made the callbacks include the scroll position (container.scrolledUntilNow) in the $event data.\r\n\r\n![screen shot 2016-06-24 at 10 54 44 pm](https://cloud.githubusercontent.com/assets/990041/16355297/926108f2-3a67-11e6-9d92-1fa231d0908e.png)\r\n\r\nLMK if you're interested; I can also point you to this app I'm using to test.","created_at":"2016-06-25T07:01:41Z","updated_at":"2016-06-29T04:15:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab83311fe2e8d04ee07907b1037df09e0f0f7c2b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/42/commits","review_comments_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/42/comments","review_comment_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/comments{/number}","comments_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/issues/42/comments","statuses_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/statuses/bfa866f7a99ae636c7e9ea5513d5549420ca5e87","head":{"label":"emeyekayee:HorizontalScroll","ref":"HorizontalScroll","sha":"bfa866f7a99ae636c7e9ea5513d5549420ca5e87","user":{"login":"emeyekayee","id":990041,"avatar_url":"https://avatars.githubusercontent.com/u/990041?v=3","gravatar_id":"","url":"https://api.github.com/users/emeyekayee","html_url":"https://github.com/emeyekayee","followers_url":"https://api.github.com/users/emeyekayee/followers","following_url":"https://api.github.com/users/emeyekayee/following{/other_user}","gists_url":"https://api.github.com/users/emeyekayee/gists{/gist_id}","starred_url":"https://api.github.com/users/emeyekayee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emeyekayee/subscriptions","organizations_url":"https://api.github.com/users/emeyekayee/orgs","repos_url":"https://api.github.com/users/emeyekayee/repos","events_url":"https://api.github.com/users/emeyekayee/events{/privacy}","received_events_url":"https://api.github.com/users/emeyekayee/received_events","type":"User","site_admin":false},"repo":{"id":61676266,"name":"angular2-infinite-scroll","full_name":"emeyekayee/angular2-infinite-scroll","owner":{"login":"emeyekayee","id":990041,"avatar_url":"https://avatars.githubusercontent.com/u/990041?v=3","gravatar_id":"","url":"https://api.github.com/users/emeyekayee","html_url":"https://github.com/emeyekayee","followers_url":"https://api.github.com/users/emeyekayee/followers","following_url":"https://api.github.com/users/emeyekayee/following{/other_user}","gists_url":"https://api.github.com/users/emeyekayee/gists{/gist_id}","starred_url":"https://api.github.com/users/emeyekayee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emeyekayee/subscriptions","organizations_url":"https://api.github.com/users/emeyekayee/orgs","repos_url":"https://api.github.com/users/emeyekayee/repos","events_url":"https://api.github.com/users/emeyekayee/events{/privacy}","received_events_url":"https://api.github.com/users/emeyekayee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emeyekayee/angular2-infinite-scroll","description":"Infinite Scroll Directive for angular 2","fork":true,"url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll","forks_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/forks","keys_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/teams","hooks_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/hooks","issue_events_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/issues/events{/number}","events_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/events","assignees_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/assignees{/user}","branches_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/branches{/branch}","tags_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/tags","blobs_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/git/refs{/sha}","trees_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/statuses/{sha}","languages_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/languages","stargazers_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/stargazers","contributors_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/contributors","subscribers_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/subscribers","subscription_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/subscription","commits_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/commits{/sha}","git_commits_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/git/commits{/sha}","comments_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/comments{/number}","issue_comment_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/issues/comments{/number}","contents_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/contents/{+path}","compare_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/merges","archive_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/downloads","issues_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/issues{/number}","pulls_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/pulls{/number}","milestones_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/milestones{/number}","notifications_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/labels{/name}","releases_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/releases{/id}","deployments_url":"https://api.github.com/repos/emeyekayee/angular2-infinite-scroll/deployments","created_at":"2016-06-22T00:23:26Z","updated_at":"2016-06-22T00:23:28Z","pushed_at":"2016-06-25T04:59:56Z","git_url":"git://github.com/emeyekayee/angular2-infinite-scroll.git","ssh_url":"git@github.com:emeyekayee/angular2-infinite-scroll.git","clone_url":"https://github.com/emeyekayee/angular2-infinite-scroll.git","svn_url":"https://github.com/emeyekayee/angular2-infinite-scroll","homepage":"https://www.npmjs.com/package/angular2-infinite-scroll","size":57,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"orizens:master","ref":"master","sha":"324a8ade253e2b2060c290093b2c297ec61cc17d","user":{"login":"orizens","id":878660,"avatar_url":"https://avatars.githubusercontent.com/u/878660?v=3","gravatar_id":"","url":"https://api.github.com/users/orizens","html_url":"https://github.com/orizens","followers_url":"https://api.github.com/users/orizens/followers","following_url":"https://api.github.com/users/orizens/following{/other_user}","gists_url":"https://api.github.com/users/orizens/gists{/gist_id}","starred_url":"https://api.github.com/users/orizens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orizens/subscriptions","organizations_url":"https://api.github.com/users/orizens/orgs","repos_url":"https://api.github.com/users/orizens/repos","events_url":"https://api.github.com/users/orizens/events{/privacy}","received_events_url":"https://api.github.com/users/orizens/received_events","type":"User","site_admin":false},"repo":{"id":51137166,"name":"angular2-infinite-scroll","full_name":"orizens/angular2-infinite-scroll","owner":{"login":"orizens","id":878660,"avatar_url":"https://avatars.githubusercontent.com/u/878660?v=3","gravatar_id":"","url":"https://api.github.com/users/orizens","html_url":"https://github.com/orizens","followers_url":"https://api.github.com/users/orizens/followers","following_url":"https://api.github.com/users/orizens/following{/other_user}","gists_url":"https://api.github.com/users/orizens/gists{/gist_id}","starred_url":"https://api.github.com/users/orizens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orizens/subscriptions","organizations_url":"https://api.github.com/users/orizens/orgs","repos_url":"https://api.github.com/users/orizens/repos","events_url":"https://api.github.com/users/orizens/events{/privacy}","received_events_url":"https://api.github.com/users/orizens/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/orizens/angular2-infinite-scroll","description":"Infinite Scroll Directive for angular 2","fork":false,"url":"https://api.github.com/repos/orizens/angular2-infinite-scroll","forks_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/forks","keys_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/teams","hooks_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/hooks","issue_events_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/issues/events{/number}","events_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/events","assignees_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/assignees{/user}","branches_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/branches{/branch}","tags_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/tags","blobs_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/git/refs{/sha}","trees_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/statuses/{sha}","languages_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/languages","stargazers_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/stargazers","contributors_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/contributors","subscribers_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/subscribers","subscription_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/subscription","commits_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/commits{/sha}","git_commits_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/git/commits{/sha}","comments_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/comments{/number}","issue_comment_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/issues/comments{/number}","contents_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/contents/{+path}","compare_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/merges","archive_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/downloads","issues_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/issues{/number}","pulls_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls{/number}","milestones_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/milestones{/number}","notifications_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/labels{/name}","releases_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/releases{/id}","deployments_url":"https://api.github.com/repos/orizens/angular2-infinite-scroll/deployments","created_at":"2016-02-05T09:19:39Z","updated_at":"2016-06-23T10:26:44Z","pushed_at":"2016-06-26T17:33:41Z","git_url":"git://github.com/orizens/angular2-infinite-scroll.git","ssh_url":"git@github.com:orizens/angular2-infinite-scroll.git","clone_url":"https://github.com/orizens/angular2-infinite-scroll.git","svn_url":"https://github.com/orizens/angular2-infinite-scroll","homepage":"https://www.npmjs.com/package/angular2-infinite-scroll","size":65,"stargazers_count":36,"watchers_count":36,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":6,"forks":19,"open_issues":6,"watchers":36,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/42"},"html":{"href":"https://github.com/orizens/angular2-infinite-scroll/pull/42"},"issue":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/issues/42"},"comments":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/orizens/angular2-infinite-scroll/statuses/bfa866f7a99ae636c7e9ea5513d5549420ca5e87"}}}}
{"actor":{"display_login":"emeyekayee"}}