{"action":"created","comment":{"url":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/comments/37735455","id":37735455,"diff_hunk":"@@ -62,15 +64,135 @@ define([\n             });\n \n             it('should allow overriding of the offset', function () {\n-                parallaxScrolling._getMargin = function (offsetTop) {\n+                parallaxScrolling._getScrollY = function (position, offsetTop) {\n                     return offsetTop;\n                 };\n \n                 var overrideWin,\n                     handler = parallaxScrolling.init(ele, container, 100, 50),\n-                    margin = handler(overrideWin, 20192);\n+                    scrollY = handler(overrideWin, 20192);\n \n-                expect(margin).toBe(20192);\n+                expect(scrollY).toBe(20192);\n+            });\n+        });\n+\n+        describe('getting the scroll y position', function () {\n+            var position,\n+                offsetTop,\n+                scrollDistance,\n+                distance,\n+                scrollTop,\n+                scrollY;\n+\n+            beforeEach(function () {\n+                offsetTop = 90;\n+                scrollDistance = 100;\n+                distance = 40;\n+                scrollTop = 10;\n+            });\n+\n+            describe('top of viewport', function () {\n+                beforeEach(function () {\n+                    position = 'top';\n+                });\n+\n+                it('should return the scroll y position as the top when normal scrolling', function () {\n+                    spyOn(ParallaxScrolling.prototype, '_positionTop').and.returnValue('topPosition');\n+\n+                    ParallaxScrolling.prototype.invert = true;\n+\n+                    scrollY = ParallaxScrolling.prototype.\n+                                _getScrollY(position, offsetTop, scrollDistance, distance, scrollTop);\n+\n+                    expect(ParallaxScrolling.prototype._positionTop).toHaveBeenCalled();\n+                    expect(scrollY).toBe('topPosition');\n+                });\n+\n+                it('should return the scroll y with content ready to view the bottom when inverted', function () {\n+                    scrollDistance = 100;\n+\n+                    spyOn(ParallaxScrolling.prototype, '_positionBottom').and.returnValue('bottomPosition');\n+\n+                    ParallaxScrolling.prototype.invert = false;\n+\n+                    scrollY = ParallaxScrolling.prototype.\n+                                _getScrollY(position, offsetTop, scrollDistance, distance, scrollTop);\n+\n+                    expect(ParallaxScrolling.prototype._positionBottom).toHaveBeenCalledWith(scrollDistance);\n+                    expect(scrollY).toBe('bottomPosition');\n+                });\n+            });\n+\n+            describe('bottom of viewport', function () {\n+                beforeEach(function () {\n+                    postion = 'bottom';","path":"tests/parallax-scrolling.spec.js","position":89,"original_position":89,"commit_id":"f274737ff2a99a5443bd01ebfdbf6920e40c8278","original_commit_id":"f274737ff2a99a5443bd01ebfdbf6920e40c8278","user":{"login":"jonman","id":2930010,"avatar_url":"https://avatars.githubusercontent.com/u/2930010?v=3","gravatar_id":"","url":"https://api.github.com/users/jonman","html_url":"https://github.com/jonman","followers_url":"https://api.github.com/users/jonman/followers","following_url":"https://api.github.com/users/jonman/following{/other_user}","gists_url":"https://api.github.com/users/jonman/gists{/gist_id}","starred_url":"https://api.github.com/users/jonman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonman/subscriptions","organizations_url":"https://api.github.com/users/jonman/orgs","repos_url":"https://api.github.com/users/jonman/repos","events_url":"https://api.github.com/users/jonman/events{/privacy}","received_events_url":"https://api.github.com/users/jonman/received_events","type":"User","site_admin":false},"body":"`position`","created_at":"2015-08-24T09:51:13Z","updated_at":"2015-08-24T09:51:13Z","html_url":"https://github.com/rockabox/Auxilium.js/pull/58#discussion_r37735455","pull_request_url":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/comments/37735455"},"html":{"href":"https://github.com/rockabox/Auxilium.js/pull/58#discussion_r37735455"},"pull_request":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/58","id":42949801,"html_url":"https://github.com/rockabox/Auxilium.js/pull/58","diff_url":"https://github.com/rockabox/Auxilium.js/pull/58.diff","patch_url":"https://github.com/rockabox/Auxilium.js/pull/58.patch","issue_url":"https://api.github.com/repos/rockabox/Auxilium.js/issues/58","number":58,"state":"open","locked":false,"title":"Trigger scroll percentages","user":{"login":"nwhite89","id":1407863,"avatar_url":"https://avatars.githubusercontent.com/u/1407863?v=3","gravatar_id":"","url":"https://api.github.com/users/nwhite89","html_url":"https://github.com/nwhite89","followers_url":"https://api.github.com/users/nwhite89/followers","following_url":"https://api.github.com/users/nwhite89/following{/other_user}","gists_url":"https://api.github.com/users/nwhite89/gists{/gist_id}","starred_url":"https://api.github.com/users/nwhite89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwhite89/subscriptions","organizations_url":"https://api.github.com/users/nwhite89/orgs","repos_url":"https://api.github.com/users/nwhite89/repos","events_url":"https://api.github.com/users/nwhite89/events{/privacy}","received_events_url":"https://api.github.com/users/nwhite89/received_events","type":"User","site_admin":false},"body":"TP: https://rockabox.tpondemand.com/entity/10273","created_at":"2015-08-20T16:28:51Z","updated_at":"2015-08-24T09:51:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aeb73810591753399eeb5b04b44b1356137fd9ff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/58/commits","review_comments_url":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/58/comments","review_comment_url":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rockabox/Auxilium.js/issues/58/comments","statuses_url":"https://api.github.com/repos/rockabox/Auxilium.js/statuses/f274737ff2a99a5443bd01ebfdbf6920e40c8278","head":{"label":"rockabox:story/10273-scroll-percentages","ref":"story/10273-scroll-percentages","sha":"f274737ff2a99a5443bd01ebfdbf6920e40c8278","user":{"login":"rockabox","id":245290,"avatar_url":"https://avatars.githubusercontent.com/u/245290?v=3","gravatar_id":"","url":"https://api.github.com/users/rockabox","html_url":"https://github.com/rockabox","followers_url":"https://api.github.com/users/rockabox/followers","following_url":"https://api.github.com/users/rockabox/following{/other_user}","gists_url":"https://api.github.com/users/rockabox/gists{/gist_id}","starred_url":"https://api.github.com/users/rockabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockabox/subscriptions","organizations_url":"https://api.github.com/users/rockabox/orgs","repos_url":"https://api.github.com/users/rockabox/repos","events_url":"https://api.github.com/users/rockabox/events{/privacy}","received_events_url":"https://api.github.com/users/rockabox/received_events","type":"Organization","site_admin":false},"repo":{"id":30257156,"name":"Auxilium.js","full_name":"rockabox/Auxilium.js","owner":{"login":"rockabox","id":245290,"avatar_url":"https://avatars.githubusercontent.com/u/245290?v=3","gravatar_id":"","url":"https://api.github.com/users/rockabox","html_url":"https://github.com/rockabox","followers_url":"https://api.github.com/users/rockabox/followers","following_url":"https://api.github.com/users/rockabox/following{/other_user}","gists_url":"https://api.github.com/users/rockabox/gists{/gist_id}","starred_url":"https://api.github.com/users/rockabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockabox/subscriptions","organizations_url":"https://api.github.com/users/rockabox/orgs","repos_url":"https://api.github.com/users/rockabox/repos","events_url":"https://api.github.com/users/rockabox/events{/privacy}","received_events_url":"https://api.github.com/users/rockabox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rockabox/Auxilium.js","description":"Rockabox's webpack utility helpers.","fork":false,"url":"https://api.github.com/repos/rockabox/Auxilium.js","forks_url":"https://api.github.com/repos/rockabox/Auxilium.js/forks","keys_url":"https://api.github.com/repos/rockabox/Auxilium.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rockabox/Auxilium.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rockabox/Auxilium.js/teams","hooks_url":"https://api.github.com/repos/rockabox/Auxilium.js/hooks","issue_events_url":"https://api.github.com/repos/rockabox/Auxilium.js/issues/events{/number}","events_url":"https://api.github.com/repos/rockabox/Auxilium.js/events","assignees_url":"https://api.github.com/repos/rockabox/Auxilium.js/assignees{/user}","branches_url":"https://api.github.com/repos/rockabox/Auxilium.js/branches{/branch}","tags_url":"https://api.github.com/repos/rockabox/Auxilium.js/tags","blobs_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rockabox/Auxilium.js/statuses/{sha}","languages_url":"https://api.github.com/repos/rockabox/Auxilium.js/languages","stargazers_url":"https://api.github.com/repos/rockabox/Auxilium.js/stargazers","contributors_url":"https://api.github.com/repos/rockabox/Auxilium.js/contributors","subscribers_url":"https://api.github.com/repos/rockabox/Auxilium.js/subscribers","subscription_url":"https://api.github.com/repos/rockabox/Auxilium.js/subscription","commits_url":"https://api.github.com/repos/rockabox/Auxilium.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/rockabox/Auxilium.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/rockabox/Auxilium.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/rockabox/Auxilium.js/contents/{+path}","compare_url":"https://api.github.com/repos/rockabox/Auxilium.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rockabox/Auxilium.js/merges","archive_url":"https://api.github.com/repos/rockabox/Auxilium.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rockabox/Auxilium.js/downloads","issues_url":"https://api.github.com/repos/rockabox/Auxilium.js/issues{/number}","pulls_url":"https://api.github.com/repos/rockabox/Auxilium.js/pulls{/number}","milestones_url":"https://api.github.com/repos/rockabox/Auxilium.js/milestones{/number}","notifications_url":"https://api.github.com/repos/rockabox/Auxilium.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rockabox/Auxilium.js/labels{/name}","releases_url":"https://api.github.com/repos/rockabox/Auxilium.js/releases{/id}","created_at":"2015-02-03T18:12:06Z","updated_at":"2015-04-29T11:26:10Z","pushed_at":"2015-08-20T16:28:52Z","git_url":"git://github.com/rockabox/Auxilium.js.git","ssh_url":"git@github.com:rockabox/Auxilium.js.git","clone_url":"https://github.com/rockabox/Auxilium.js.git","svn_url":"https://github.com/rockabox/Auxilium.js","homepage":null,"size":912,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"rockabox:master","ref":"master","sha":"3c02f5a4532f314479fd2dc38343d91d910a7859","user":{"login":"rockabox","id":245290,"avatar_url":"https://avatars.githubusercontent.com/u/245290?v=3","gravatar_id":"","url":"https://api.github.com/users/rockabox","html_url":"https://github.com/rockabox","followers_url":"https://api.github.com/users/rockabox/followers","following_url":"https://api.github.com/users/rockabox/following{/other_user}","gists_url":"https://api.github.com/users/rockabox/gists{/gist_id}","starred_url":"https://api.github.com/users/rockabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockabox/subscriptions","organizations_url":"https://api.github.com/users/rockabox/orgs","repos_url":"https://api.github.com/users/rockabox/repos","events_url":"https://api.github.com/users/rockabox/events{/privacy}","received_events_url":"https://api.github.com/users/rockabox/received_events","type":"Organization","site_admin":false},"repo":{"id":30257156,"name":"Auxilium.js","full_name":"rockabox/Auxilium.js","owner":{"login":"rockabox","id":245290,"avatar_url":"https://avatars.githubusercontent.com/u/245290?v=3","gravatar_id":"","url":"https://api.github.com/users/rockabox","html_url":"https://github.com/rockabox","followers_url":"https://api.github.com/users/rockabox/followers","following_url":"https://api.github.com/users/rockabox/following{/other_user}","gists_url":"https://api.github.com/users/rockabox/gists{/gist_id}","starred_url":"https://api.github.com/users/rockabox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockabox/subscriptions","organizations_url":"https://api.github.com/users/rockabox/orgs","repos_url":"https://api.github.com/users/rockabox/repos","events_url":"https://api.github.com/users/rockabox/events{/privacy}","received_events_url":"https://api.github.com/users/rockabox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rockabox/Auxilium.js","description":"Rockabox's webpack utility helpers.","fork":false,"url":"https://api.github.com/repos/rockabox/Auxilium.js","forks_url":"https://api.github.com/repos/rockabox/Auxilium.js/forks","keys_url":"https://api.github.com/repos/rockabox/Auxilium.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rockabox/Auxilium.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rockabox/Auxilium.js/teams","hooks_url":"https://api.github.com/repos/rockabox/Auxilium.js/hooks","issue_events_url":"https://api.github.com/repos/rockabox/Auxilium.js/issues/events{/number}","events_url":"https://api.github.com/repos/rockabox/Auxilium.js/events","assignees_url":"https://api.github.com/repos/rockabox/Auxilium.js/assignees{/user}","branches_url":"https://api.github.com/repos/rockabox/Auxilium.js/branches{/branch}","tags_url":"https://api.github.com/repos/rockabox/Auxilium.js/tags","blobs_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rockabox/Auxilium.js/statuses/{sha}","languages_url":"https://api.github.com/repos/rockabox/Auxilium.js/languages","stargazers_url":"https://api.github.com/repos/rockabox/Auxilium.js/stargazers","contributors_url":"https://api.github.com/repos/rockabox/Auxilium.js/contributors","subscribers_url":"https://api.github.com/repos/rockabox/Auxilium.js/subscribers","subscription_url":"https://api.github.com/repos/rockabox/Auxilium.js/subscription","commits_url":"https://api.github.com/repos/rockabox/Auxilium.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/rockabox/Auxilium.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/rockabox/Auxilium.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/rockabox/Auxilium.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/rockabox/Auxilium.js/contents/{+path}","compare_url":"https://api.github.com/repos/rockabox/Auxilium.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rockabox/Auxilium.js/merges","archive_url":"https://api.github.com/repos/rockabox/Auxilium.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rockabox/Auxilium.js/downloads","issues_url":"https://api.github.com/repos/rockabox/Auxilium.js/issues{/number}","pulls_url":"https://api.github.com/repos/rockabox/Auxilium.js/pulls{/number}","milestones_url":"https://api.github.com/repos/rockabox/Auxilium.js/milestones{/number}","notifications_url":"https://api.github.com/repos/rockabox/Auxilium.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rockabox/Auxilium.js/labels{/name}","releases_url":"https://api.github.com/repos/rockabox/Auxilium.js/releases{/id}","created_at":"2015-02-03T18:12:06Z","updated_at":"2015-04-29T11:26:10Z","pushed_at":"2015-08-20T16:28:52Z","git_url":"git://github.com/rockabox/Auxilium.js.git","ssh_url":"git@github.com:rockabox/Auxilium.js.git","clone_url":"https://github.com/rockabox/Auxilium.js.git","svn_url":"https://github.com/rockabox/Auxilium.js","homepage":null,"size":912,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/58"},"html":{"href":"https://github.com/rockabox/Auxilium.js/pull/58"},"issue":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/issues/58"},"comments":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/rockabox/Auxilium.js/statuses/f274737ff2a99a5443bd01ebfdbf6920e40c8278"}}}}