Is there a good way to test scrolling within the viewport?
makeros opened this issue · comments
Arek Czogała commented
Hello.
I just want to test scrolling behavior on different viewport sizes.
Right now i'm scrolling viewport content with viewport.el_.contentWindow.scrollTo(0,101). But then i need also to reset scrollTop after each test.
I'm just curious if there is a better approach for this.
Martin Donath commented
Thanks for your thoughts. Currently there's no way. I have to think about if it makes sense including this into the codebase.
Martin Donath commented
This is finally implemented in #34 - there's a new method called offset
that proxies calls to the content window:
viewport.offset(0, 10) // scroll 10px down
Scroll offset is also reset when reset
is called. Should be ready soon.
Martin Donath commented
Released as part of 1.0.0.