{"action":"created","comment":{"url":"https://api.github.com/repos/michalsnik/aos/pulls/comments/77167255","id":77167255,"diff_hunk":"@@ -1,11 +1,22 @@\n /* Clearing variables */\n \n import calculateOffset from './calculateOffset';\n+import getInlineOption from './getInlineOption';\n \n const prepare = function ($elements, options) {\n   $elements.forEach((el, i) => {\n+    const positionIn = calculateOffset(el.node, options.offset);\n+    const positionOut = positionIn + window.innerHeight;","path":"src/js/helpers/prepare.js","position":9,"original_position":9,"commit_id":"df120d20c81866825da6f02067ba90d319dc76a0","original_commit_id":"df120d20c81866825da6f02067ba90d319dc76a0","user":{"login":"LucaRosaldi","id":1115658,"avatar_url":"https://avatars.githubusercontent.com/u/1115658?v=3","gravatar_id":"","url":"https://api.github.com/users/LucaRosaldi","html_url":"https://github.com/LucaRosaldi","followers_url":"https://api.github.com/users/LucaRosaldi/followers","following_url":"https://api.github.com/users/LucaRosaldi/following{/other_user}","gists_url":"https://api.github.com/users/LucaRosaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/LucaRosaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucaRosaldi/subscriptions","organizations_url":"https://api.github.com/users/LucaRosaldi/orgs","repos_url":"https://api.github.com/users/LucaRosaldi/repos","events_url":"https://api.github.com/users/LucaRosaldi/events{/privacy}","received_events_url":"https://api.github.com/users/LucaRosaldi/received_events","type":"User","site_admin":false},"body":"Yes, I tested this in a website I’m building, and I encountered the same problem you mentioned.\r\n\r\nI guess the solution you proposed it simple and effective.","created_at":"2016-09-01T12:54:16Z","updated_at":"2016-09-01T12:54:16Z","html_url":"https://github.com/michalsnik/aos/pull/41#discussion_r77167255","pull_request_url":"https://api.github.com/repos/michalsnik/aos/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/michalsnik/aos/pulls/comments/77167255"},"html":{"href":"https://github.com/michalsnik/aos/pull/41#discussion_r77167255"},"pull_request":{"href":"https://api.github.com/repos/michalsnik/aos/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/michalsnik/aos/pulls/41","id":80961513,"html_url":"https://github.com/michalsnik/aos/pull/41","diff_url":"https://github.com/michalsnik/aos/pull/41.diff","patch_url":"https://github.com/michalsnik/aos/pull/41.patch","issue_url":"https://api.github.com/repos/michalsnik/aos/issues/41","number":41,"state":"open","locked":false,"title":"add ‘mirror’ option","user":{"login":"LucaRosaldi","id":1115658,"avatar_url":"https://avatars.githubusercontent.com/u/1115658?v=3","gravatar_id":"","url":"https://api.github.com/users/LucaRosaldi","html_url":"https://github.com/LucaRosaldi","followers_url":"https://api.github.com/users/LucaRosaldi/followers","following_url":"https://api.github.com/users/LucaRosaldi/following{/other_user}","gists_url":"https://api.github.com/users/LucaRosaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/LucaRosaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucaRosaldi/subscriptions","organizations_url":"https://api.github.com/users/LucaRosaldi/orgs","repos_url":"https://api.github.com/users/LucaRosaldi/repos","events_url":"https://api.github.com/users/LucaRosaldi/events{/privacy}","received_events_url":"https://api.github.com/users/LucaRosaldi/received_events","type":"User","site_admin":false},"body":"Added an option to remove the animation class when the element is scrolled past the viewport, basically mirroring the animation from when it enters the viewport. The option name `mirror` sounded good to me, but feel free to rename it if you find it confusing.\r\n\r\nCan also be set on single elements with `data-aos-mirror` attribute, and is set to `false` in global defaults, so that the original functionality is unaffected.\r\n\r\nMore details on changes:\r\n\r\n- added a utility function to parse inline attributes;\r\n- moved the getAttribute logic to the 'prepare' function; it made sense to me as per-element options are set just once, when all elements are parsed.\r\n\r\nLooking forward to hear from you. KUTGW.\r\n","created_at":"2016-08-11T13:54:44Z","updated_at":"2016-09-01T12:54:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6f0206a9c37ee7f316b0e83f6099ededb7fce27","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/michalsnik/aos/pulls/41/commits","review_comments_url":"https://api.github.com/repos/michalsnik/aos/pulls/41/comments","review_comment_url":"https://api.github.com/repos/michalsnik/aos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/michalsnik/aos/issues/41/comments","statuses_url":"https://api.github.com/repos/michalsnik/aos/statuses/df120d20c81866825da6f02067ba90d319dc76a0","head":{"label":"LucaRosaldi:feature_issue_n40","ref":"feature_issue_n40","sha":"df120d20c81866825da6f02067ba90d319dc76a0","user":{"login":"LucaRosaldi","id":1115658,"avatar_url":"https://avatars.githubusercontent.com/u/1115658?v=3","gravatar_id":"","url":"https://api.github.com/users/LucaRosaldi","html_url":"https://github.com/LucaRosaldi","followers_url":"https://api.github.com/users/LucaRosaldi/followers","following_url":"https://api.github.com/users/LucaRosaldi/following{/other_user}","gists_url":"https://api.github.com/users/LucaRosaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/LucaRosaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucaRosaldi/subscriptions","organizations_url":"https://api.github.com/users/LucaRosaldi/orgs","repos_url":"https://api.github.com/users/LucaRosaldi/repos","events_url":"https://api.github.com/users/LucaRosaldi/events{/privacy}","received_events_url":"https://api.github.com/users/LucaRosaldi/received_events","type":"User","site_admin":false},"repo":{"id":65450496,"name":"aos","full_name":"LucaRosaldi/aos","owner":{"login":"LucaRosaldi","id":1115658,"avatar_url":"https://avatars.githubusercontent.com/u/1115658?v=3","gravatar_id":"","url":"https://api.github.com/users/LucaRosaldi","html_url":"https://github.com/LucaRosaldi","followers_url":"https://api.github.com/users/LucaRosaldi/followers","following_url":"https://api.github.com/users/LucaRosaldi/following{/other_user}","gists_url":"https://api.github.com/users/LucaRosaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/LucaRosaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucaRosaldi/subscriptions","organizations_url":"https://api.github.com/users/LucaRosaldi/orgs","repos_url":"https://api.github.com/users/LucaRosaldi/repos","events_url":"https://api.github.com/users/LucaRosaldi/events{/privacy}","received_events_url":"https://api.github.com/users/LucaRosaldi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LucaRosaldi/aos","description":"Animate on scroll library","fork":true,"url":"https://api.github.com/repos/LucaRosaldi/aos","forks_url":"https://api.github.com/repos/LucaRosaldi/aos/forks","keys_url":"https://api.github.com/repos/LucaRosaldi/aos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LucaRosaldi/aos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LucaRosaldi/aos/teams","hooks_url":"https://api.github.com/repos/LucaRosaldi/aos/hooks","issue_events_url":"https://api.github.com/repos/LucaRosaldi/aos/issues/events{/number}","events_url":"https://api.github.com/repos/LucaRosaldi/aos/events","assignees_url":"https://api.github.com/repos/LucaRosaldi/aos/assignees{/user}","branches_url":"https://api.github.com/repos/LucaRosaldi/aos/branches{/branch}","tags_url":"https://api.github.com/repos/LucaRosaldi/aos/tags","blobs_url":"https://api.github.com/repos/LucaRosaldi/aos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LucaRosaldi/aos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LucaRosaldi/aos/git/refs{/sha}","trees_url":"https://api.github.com/repos/LucaRosaldi/aos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LucaRosaldi/aos/statuses/{sha}","languages_url":"https://api.github.com/repos/LucaRosaldi/aos/languages","stargazers_url":"https://api.github.com/repos/LucaRosaldi/aos/stargazers","contributors_url":"https://api.github.com/repos/LucaRosaldi/aos/contributors","subscribers_url":"https://api.github.com/repos/LucaRosaldi/aos/subscribers","subscription_url":"https://api.github.com/repos/LucaRosaldi/aos/subscription","commits_url":"https://api.github.com/repos/LucaRosaldi/aos/commits{/sha}","git_commits_url":"https://api.github.com/repos/LucaRosaldi/aos/git/commits{/sha}","comments_url":"https://api.github.com/repos/LucaRosaldi/aos/comments{/number}","issue_comment_url":"https://api.github.com/repos/LucaRosaldi/aos/issues/comments{/number}","contents_url":"https://api.github.com/repos/LucaRosaldi/aos/contents/{+path}","compare_url":"https://api.github.com/repos/LucaRosaldi/aos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LucaRosaldi/aos/merges","archive_url":"https://api.github.com/repos/LucaRosaldi/aos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LucaRosaldi/aos/downloads","issues_url":"https://api.github.com/repos/LucaRosaldi/aos/issues{/number}","pulls_url":"https://api.github.com/repos/LucaRosaldi/aos/pulls{/number}","milestones_url":"https://api.github.com/repos/LucaRosaldi/aos/milestones{/number}","notifications_url":"https://api.github.com/repos/LucaRosaldi/aos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LucaRosaldi/aos/labels{/name}","releases_url":"https://api.github.com/repos/LucaRosaldi/aos/releases{/id}","deployments_url":"https://api.github.com/repos/LucaRosaldi/aos/deployments","created_at":"2016-08-11T08:00:36Z","updated_at":"2016-08-11T08:00:37Z","pushed_at":"2016-08-11T13:40:18Z","git_url":"git://github.com/LucaRosaldi/aos.git","ssh_url":"git@github.com:LucaRosaldi/aos.git","clone_url":"https://github.com/LucaRosaldi/aos.git","svn_url":"https://github.com/LucaRosaldi/aos","homepage":null,"size":988,"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":"michalsnik:master","ref":"master","sha":"1de25f696ade08dbf08870cae8af06b651858c6e","user":{"login":"michalsnik","id":4093559,"avatar_url":"https://avatars.githubusercontent.com/u/4093559?v=3","gravatar_id":"","url":"https://api.github.com/users/michalsnik","html_url":"https://github.com/michalsnik","followers_url":"https://api.github.com/users/michalsnik/followers","following_url":"https://api.github.com/users/michalsnik/following{/other_user}","gists_url":"https://api.github.com/users/michalsnik/gists{/gist_id}","starred_url":"https://api.github.com/users/michalsnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalsnik/subscriptions","organizations_url":"https://api.github.com/users/michalsnik/orgs","repos_url":"https://api.github.com/users/michalsnik/repos","events_url":"https://api.github.com/users/michalsnik/events{/privacy}","received_events_url":"https://api.github.com/users/michalsnik/received_events","type":"User","site_admin":false},"repo":{"id":38836015,"name":"aos","full_name":"michalsnik/aos","owner":{"login":"michalsnik","id":4093559,"avatar_url":"https://avatars.githubusercontent.com/u/4093559?v=3","gravatar_id":"","url":"https://api.github.com/users/michalsnik","html_url":"https://github.com/michalsnik","followers_url":"https://api.github.com/users/michalsnik/followers","following_url":"https://api.github.com/users/michalsnik/following{/other_user}","gists_url":"https://api.github.com/users/michalsnik/gists{/gist_id}","starred_url":"https://api.github.com/users/michalsnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalsnik/subscriptions","organizations_url":"https://api.github.com/users/michalsnik/orgs","repos_url":"https://api.github.com/users/michalsnik/repos","events_url":"https://api.github.com/users/michalsnik/events{/privacy}","received_events_url":"https://api.github.com/users/michalsnik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michalsnik/aos","description":"Animate on scroll library","fork":false,"url":"https://api.github.com/repos/michalsnik/aos","forks_url":"https://api.github.com/repos/michalsnik/aos/forks","keys_url":"https://api.github.com/repos/michalsnik/aos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michalsnik/aos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michalsnik/aos/teams","hooks_url":"https://api.github.com/repos/michalsnik/aos/hooks","issue_events_url":"https://api.github.com/repos/michalsnik/aos/issues/events{/number}","events_url":"https://api.github.com/repos/michalsnik/aos/events","assignees_url":"https://api.github.com/repos/michalsnik/aos/assignees{/user}","branches_url":"https://api.github.com/repos/michalsnik/aos/branches{/branch}","tags_url":"https://api.github.com/repos/michalsnik/aos/tags","blobs_url":"https://api.github.com/repos/michalsnik/aos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michalsnik/aos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michalsnik/aos/git/refs{/sha}","trees_url":"https://api.github.com/repos/michalsnik/aos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michalsnik/aos/statuses/{sha}","languages_url":"https://api.github.com/repos/michalsnik/aos/languages","stargazers_url":"https://api.github.com/repos/michalsnik/aos/stargazers","contributors_url":"https://api.github.com/repos/michalsnik/aos/contributors","subscribers_url":"https://api.github.com/repos/michalsnik/aos/subscribers","subscription_url":"https://api.github.com/repos/michalsnik/aos/subscription","commits_url":"https://api.github.com/repos/michalsnik/aos/commits{/sha}","git_commits_url":"https://api.github.com/repos/michalsnik/aos/git/commits{/sha}","comments_url":"https://api.github.com/repos/michalsnik/aos/comments{/number}","issue_comment_url":"https://api.github.com/repos/michalsnik/aos/issues/comments{/number}","contents_url":"https://api.github.com/repos/michalsnik/aos/contents/{+path}","compare_url":"https://api.github.com/repos/michalsnik/aos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michalsnik/aos/merges","archive_url":"https://api.github.com/repos/michalsnik/aos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michalsnik/aos/downloads","issues_url":"https://api.github.com/repos/michalsnik/aos/issues{/number}","pulls_url":"https://api.github.com/repos/michalsnik/aos/pulls{/number}","milestones_url":"https://api.github.com/repos/michalsnik/aos/milestones{/number}","notifications_url":"https://api.github.com/repos/michalsnik/aos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michalsnik/aos/labels{/name}","releases_url":"https://api.github.com/repos/michalsnik/aos/releases{/id}","deployments_url":"https://api.github.com/repos/michalsnik/aos/deployments","created_at":"2015-07-09T17:49:00Z","updated_at":"2016-09-01T10:48:28Z","pushed_at":"2016-08-31T22:36:06Z","git_url":"git://github.com/michalsnik/aos.git","ssh_url":"git@github.com:michalsnik/aos.git","clone_url":"https://github.com/michalsnik/aos.git","svn_url":"https://github.com/michalsnik/aos","homepage":null,"size":1081,"stargazers_count":2317,"watchers_count":2317,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":147,"mirror_url":null,"open_issues_count":5,"forks":147,"open_issues":5,"watchers":2317,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/michalsnik/aos/pulls/41"},"html":{"href":"https://github.com/michalsnik/aos/pull/41"},"issue":{"href":"https://api.github.com/repos/michalsnik/aos/issues/41"},"comments":{"href":"https://api.github.com/repos/michalsnik/aos/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/michalsnik/aos/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/michalsnik/aos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/michalsnik/aos/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/michalsnik/aos/statuses/df120d20c81866825da6f02067ba90d319dc76a0"}}}}
{"actor":{"display_login":"LucaRosaldi"}}