-
Notifications
You must be signed in to change notification settings - Fork 44
Embedded scrollview always fires both vertical & horizontal scrollstart #52
Comments
Thanks for reporting this Peace. The scrolling damping effect is controlled by a physics particle, a spring and two drag-forces. You will have to look in the famo.us source-code on what other options you can pass to these physics objects. The damping-ratio and period for the var scrollView = new FlexScrollView({
scrollParticle: {
// use defaults
},
scrollDrag: {
forceFunction: Drag.FORCE_FUNCTIONS.QUADRATIC,
strength: 0.001,
disabled: true
},
scrollFriction: {
forceFunction: Drag.FORCE_FUNCTIONS.LINEAR,
strength: 0.0025,
disabled: false
},
scrollSpring: {
dampingRatio: 1.0,
period: 350
},
}); It's currently not possible to configure how far the the list can be pulled from the edge. If you think this would be useful for other developers as well, please make a explanatory feature request for it so others can vote for it as well. |
Hi, I am unable to reproduce this problem. Can you share the code or a live example so I can have a look? Are you sure that you have set |
ping @peacechen |
1 similar comment
ping @peacechen |
I implemented the Embedded scrollview scrolling restrictions that you decribed at
https://github.com/IjzerenHein/famous-flex/blob/master/tutorials/FlexScrollView.md#embedded-scrollview-scrolling-restrictions
Unexpectedly, it always fires both vertical & horizontal scrollstart events. I had to make a small change to work around that during vertical-only scrolling by setting a flag in the vertical scrollstart to prevent the horizontal scrollstart from coming in behind it and disabling the vertical. Logically it seems that setOptions({ enabled: false }) would disable the horizontal scrollstart firing, but there must be a race condition with the callbacks.
While the list is scrolling one way, it can't be scrolled the other way since it's waiting for the scrollend event to re-enable. This is problematic as the list decelerates and looks like it has stopped but not quite. Is there an option to increase the dampening effect?
Also is there an option to limit how far the list can be pulled away from the edge at the ends of the list? That inertia draws out how long the list continues moving and prevents swiping in the perpendicular direction. It would be great if that could be disabled because in my case, the horizontal scrollview shouldn't pull away from the edge.
The text was updated successfully, but these errors were encountered: