Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshing iScroll #25

Open
jbarkun opened this issue May 5, 2016 · 2 comments
Open

Refreshing iScroll #25

jbarkun opened this issue May 5, 2016 · 2 comments

Comments

@jbarkun
Copy link

jbarkun commented May 5, 2016

Hey! Thanks for the great plugin.

I have some dropdowns inside my drawer navigation, and am having some issues recalculating the drawer height for iScroll after opening them. Because iScroll is initialized through Drawer, what would be the best way to use the refresh() function to get the new drawer height?
http://iscrolljs.com/#refresh

Thank you for your help!

@oddlyfunctional
Copy link
Collaborator

Hi @jbarkun! I've recently implemented a refresh function but didn't have time to update the docs yet. It doesn't quite work as you asked, though. It recreates the whole iScroll (useful for the cases where you dynamically load the whole drawer) by calling drawer.drawer('refresh'). If this doesn't solve your problem, let me know and I'll implement an accessor to the iScroll's refresh function.

@tommueller
Copy link

tommueller commented Jun 28, 2016

I definitely would need an accessor to iScroll's refresh function! Using the refresh function as is, my scroller jumps up while refreshing.

I already added it to mine
softRefresh: function softRefresh() { return this.each(function() { var _this = this; return _this.iScroll.refresh(); }); },

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants