How can I disable and re-enable dragging on a scrollview in Famo.us?
Asked
Active
Viewed 80 times
1 Answers
1
I can imagine any of these methods would work:
- Unpipe the events from the all Surfaces/Views to the scrollview, this would effectively make it unresponsive to user-input.
- Set 'pointer-events: none' for all the surfaces in the scrollView.
- Create a proxy EventHandler and pipe the events from the surfaces to that EventHandler and then you can pipe/unpipe those events to the ScrollView.
I don't think there is an easier way to do this with the stock ScrollView though..
Alternatively, you could use the FlexScrollView, which contains an option for it:
var scrollView = new FlexScrollView({
enabled: true
});
// disable
scrollView.setOptions({
enabled: false
});
Tutorial: https://github.com/IjzerenHein/famous-flex/blob/master/tutorials/FlexScrollView.md

IjzerenHein
- 2,690
- 1
- 17
- 13
-
Looks like I'm going to go with famous-flex. Does it automatically unload elements from memory like the stock scrollview? – Jordan Jan 26 '15 at 19:52