drawer icon indicating copy to clipboard operation
drawer copied to clipboard

Refreshing iScroll

Open jbarkun opened this issue 8 years ago • 2 comments

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!

jbarkun avatar May 05 '16 20:05 jbarkun

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.

oddlyfunctional avatar May 05 '16 20:05 oddlyfunctional

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!

tommueller avatar Jun 28 '16 09:06 tommueller