0

I want to nest two scrollviews. The outer one should allow only scrolling in x-drection the inner one only y-direction. It seems that the MouseSync of the inner scrollview always takes the mouse-event and invokes prevent-default regardless of the direction-settings.

How can such behavior be implemented?

Jens Zastrow
  • 287
  • 1
  • 3
  • 9
  • 1
    Are you looking for a pagination in one direction and standard scrollview in the other? Could you give a use case? – aintnorest Aug 07 '14 at 22:25

1 Answers1

1

I tried to comment first to see your use case but didn't get a response.

I needed something similar to display a list of customers and their data where to see the next customers info the design wanted to be able to scroll right or left while still being able to scroll up or down for more details on that customer. Now you can just pipe the scrollviews together but that gives an odd effect where when you slide your finger down unless its directly down no left right the whole page swivels around. I ended up using a paginated scroll view for x-direction populated by views that where a standard scrollview in the y-direction. Doing it this way I was able to set a some rules that made the left right transition not kick in till after so many pixel drag in that direction.

The codes here: https://github.com/vizidrix/famous/blob/master/page-swaper/PageSwaper.js

If that isn't what your looking for let me know your use case.

aintnorest
  • 1,326
  • 2
  • 13
  • 20