{"action":"created","issue":{"url":"https://api.github.com/repos/jlmakes/scrollreveal.js/issues/240","repository_url":"https://api.github.com/repos/jlmakes/scrollreveal.js","labels_url":"https://api.github.com/repos/jlmakes/scrollreveal.js/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/jlmakes/scrollreveal.js/issues/240/comments","events_url":"https://api.github.com/repos/jlmakes/scrollreveal.js/issues/240/events","html_url":"https://github.com/jlmakes/scrollreveal.js/issues/240","id":139188712,"number":240,"title":"Sequenced Animation","user":{"login":"TiagoDeSousa","id":5401468,"avatar_url":"https://avatars.githubusercontent.com/u/5401468?v=3","gravatar_id":"","url":"https://api.github.com/users/TiagoDeSousa","html_url":"https://github.com/TiagoDeSousa","followers_url":"https://api.github.com/users/TiagoDeSousa/followers","following_url":"https://api.github.com/users/TiagoDeSousa/following{/other_user}","gists_url":"https://api.github.com/users/TiagoDeSousa/gists{/gist_id}","starred_url":"https://api.github.com/users/TiagoDeSousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TiagoDeSousa/subscriptions","organizations_url":"https://api.github.com/users/TiagoDeSousa/orgs","repos_url":"https://api.github.com/users/TiagoDeSousa/repos","events_url":"https://api.github.com/users/TiagoDeSousa/events{/privacy}","received_events_url":"https://api.github.com/users/TiagoDeSousa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jlmakes/scrollreveal.js/labels/Invalid%20/%20Won't%20Fix","name":"Invalid / Won't Fix","color":"f4f4f4"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-08T06:01:12Z","updated_at":"2016-03-08T08:28:46Z","closed_at":"2016-03-08T08:28:46Z","body":"When I set a sequenced animation as so:\r\n```js\r\nwindow.sr = ScrollReveal();\r\nsr.reveal( '.animate', { delay: 700, easing: 'ease', duration: 800, scale: 0 }, 200 );\r\n```\r\nIt actually animates as it should, however:\r\n- It animates every element with the class `.animate` even if it's not in the viewport.\r\n- If you're in the middle of the page and hit refresh the animated elements in the viewport have to wait until the previous elements animation finishes."},"comment":{"url":"https://api.github.com/repos/jlmakes/scrollreveal.js/issues/comments/193661455","html_url":"https://github.com/jlmakes/scrollreveal.js/issues/240#issuecomment-193661455","issue_url":"https://api.github.com/repos/jlmakes/scrollreveal.js/issues/240","id":193661455,"user":{"login":"jlmakes","id":2044842,"avatar_url":"https://avatars.githubusercontent.com/u/2044842?v=3","gravatar_id":"","url":"https://api.github.com/users/jlmakes","html_url":"https://github.com/jlmakes","followers_url":"https://api.github.com/users/jlmakes/followers","following_url":"https://api.github.com/users/jlmakes/following{/other_user}","gists_url":"https://api.github.com/users/jlmakes/gists{/gist_id}","starred_url":"https://api.github.com/users/jlmakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlmakes/subscriptions","organizations_url":"https://api.github.com/users/jlmakes/orgs","repos_url":"https://api.github.com/users/jlmakes/repos","events_url":"https://api.github.com/users/jlmakes/events{/privacy}","received_events_url":"https://api.github.com/users/jlmakes/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T08:28:46Z","updated_at":"2016-03-08T08:28:46Z","body":"**This is by design.**\r\n\r\nI went through a number of strategies, each of which were complex and flawed. You’re describing the desired effect of only revealing what is visible in sequence—but what about `config.reset`? When you scroll back up in that reality, your sequence either has broken order or has to wait (??) until you’ve finished scrolling… both of which are quite unusual. \r\n\r\nSo maybe... reveal normally if scrolling up with `config.reset` but use the sequence when scrolling down. But what about scrolling left or right? What’s more, I’ve experimented with negative sequence intervals for reverse sequences (last to first)… which further complicates the above scenario.\r\n\r\nAfter taking a step back, it became clear that the logic was only growing more and more complex (and at odds with the existing ScrollReveal source) and I needed something that worked for scrolling up, down, left or right for sequences and reverse sequences. And thus the current sequencer:\r\n\r\n- If any element of a sequence is visible, reveal the sequence.\r\n- If no elements of a sequence are visible, hide the all elements in that sequence.\r\n\r\nIt’s simple, and honors the fact that sequenced elements are essentially a group—and that group’s visibility is what is measured, not that of the individual elements."}}