{"action":"created","issue":{"url":"https://api.github.com/repos/mkay581/scroll-js/issues/20","repository_url":"https://api.github.com/repos/mkay581/scroll-js","labels_url":"https://api.github.com/repos/mkay581/scroll-js/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/mkay581/scroll-js/issues/20/comments","events_url":"https://api.github.com/repos/mkay581/scroll-js/issues/20/events","html_url":"https://github.com/mkay581/scroll-js/issues/20","id":264148548,"number":20,"title":"Offset option","user":{"login":"julmot","id":8310677,"avatar_url":"https://avatars0.githubusercontent.com/u/8310677?v=4","gravatar_id":"","url":"https://api.github.com/users/julmot","html_url":"https://github.com/julmot","followers_url":"https://api.github.com/users/julmot/followers","following_url":"https://api.github.com/users/julmot/following{/other_user}","gists_url":"https://api.github.com/users/julmot/gists{/gist_id}","starred_url":"https://api.github.com/users/julmot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julmot/subscriptions","organizations_url":"https://api.github.com/users/julmot/orgs","repos_url":"https://api.github.com/users/julmot/repos","events_url":"https://api.github.com/users/julmot/events{/privacy}","received_events_url":"https://api.github.com/users/julmot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-10-10T08:56:23Z","updated_at":"2017-10-10T17:21:03Z","closed_at":null,"author_association":"NONE","body":"When scrolling to an element with a fixed header, you'd need to have an option to specify an offset. The offset may vary between viewports or can be expanding once you scroll up, so it should also support a callback function."},"comment":{"url":"https://api.github.com/repos/mkay581/scroll-js/issues/comments/335546287","html_url":"https://github.com/mkay581/scroll-js/issues/20#issuecomment-335546287","issue_url":"https://api.github.com/repos/mkay581/scroll-js/issues/20","id":335546287,"user":{"login":"mkay581","id":1446916,"avatar_url":"https://avatars0.githubusercontent.com/u/1446916?v=4","gravatar_id":"","url":"https://api.github.com/users/mkay581","html_url":"https://github.com/mkay581","followers_url":"https://api.github.com/users/mkay581/followers","following_url":"https://api.github.com/users/mkay581/following{/other_user}","gists_url":"https://api.github.com/users/mkay581/gists{/gist_id}","starred_url":"https://api.github.com/users/mkay581/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkay581/subscriptions","organizations_url":"https://api.github.com/users/mkay581/orgs","repos_url":"https://api.github.com/users/mkay581/repos","events_url":"https://api.github.com/users/mkay581/events{/privacy}","received_events_url":"https://api.github.com/users/mkay581/received_events","type":"User","site_admin":false},"created_at":"2017-10-10T17:21:03Z","updated_at":"2017-10-10T17:21:03Z","author_association":"OWNER","body":"Ah, now I see. \r\n\r\nI know that other packages have offset option, but I was more concerned with your use case to determine whether another approach may be better suited. AFAICT, adding an offset will only be necessary in a very specific corner case: when scrolling the viewport element (this wouldn't make sense for any other element) that contains a nested element that that sits at the top of the viewport (if scrolling down) or bottom of the element (if scrolling up), and the developer actually cares about the fixed nested element. So I'm hesitant about adding such a feature, but totally not opposed to it. :)\r\n\r\nIt seems more reasonable for the scrolled element to have `padding` set to the top of it to respect the height of its fixed content so that `toElement()` will be used in a simpler way.\r\n\r\nAlso, can you speak to my question about the callback? Why do you feel this is necessary?"}}
{"actor":{"display_login":"mkay581"}}