drawer
drawer copied to clipboard
Refreshing iScroll
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!
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.
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!