Closed Wenape closed 9 years ago
Yes please post a gif and if possible also a live demo. Cheers
Demo: http://f-drawer.meteor.com/ (Use Chrome to emulate touch, works crappy with mouse scroll) Repo: https://github.com/Wenape/drawer-example Gif:
Hi, is this something that could work for you? http://gloey.nl/apps/leadingScrollViewDelegate (just inspect the source using the browser)
It uses the LeadingScrollView feature through implementing a delegate which implements several functions. The delegate resizes the headerfooterLayout accordingly.
Works for me, also nice to have the extra functions. Thanks.
I'm using the Meteor version of famous-flex, but I'm posting here because of the nature of my problem.
I implemented the following functionality when working with the regular Scrollview. A HeaderFooterLayout contains a Scrollview as it's content. If the Scrollview is on it's initial position and you start dragging down (content on edge), the whole HeaderFooterLayout starts closing like a drawer. I also
setPosition(0)
on the Scrollviewupdate
event to counteract the "overscroll" effect. This is done with the following code:I can't get the same method to work using FlexScrollview. Instead of
_displacement
I can use.getAbsolutePosition()
. The problem has to do withsetPosition(0)
. With the regular Scrollview, you can use this function even when dragging. With FlexScrollview,_scroll.particle.setPosition(0)
works, but you see the effect only when you stop dragging, which doesn't work as you still get the "overscroll" effect before you stop dragging. Disabling the "overscroll" in options get's rid of the effect, but you lose the offset values you need to move the HeaderFooterLayout down.I'll probably post a gif if the effect is hard to visualize.