0

I have a client that doesn't like the bounce effect on the edge hit of the scrollview. So I'm looking to make the scrollview not bounce and act more 'normal'. In truth I'd really like it to bounce but only on the top.

From looking at the scrollview I've got no idea how to do this with a scrollview without heavily modifying it. At that point I'm not sure that using a scroller and a draggable wouldn't be a better solution.

Any thoughts?

aintnorest
  • 1,326
  • 2
  • 13
  • 20
  • care to show some of your code? – Moak Sep 12 '14 at 22:25
  • Code for what? I said I looked at the scrollview and had no idea. If you want the code for the scrollview its at https://github.com/wgester/famous/blob/master/views/Scrollview.js . I hate it when people don't give reasons for down votes. – aintnorest Sep 12 '14 at 22:31

2 Answers2

0

Edit: why was this down-voted?

Note that on OS X or iOS this is not possible, as Apple likes the bounce of a page and it is native behaviour. Famous does add on top of that, however, and THAT can be turned off:

for a ScrollContainer:
        new ScrollContainer({
            scrollview : {
                edgeGrip : 1
            }
        });

for a Scrollview:
        new Scrollview({    
            edgeGrip : 1
        });

It's as simple as that ;-)

The scrollview will not bounce anymore unless the operating system wants it to bounce.

Stephan Bijzitter
  • 4,425
  • 5
  • 24
  • 44
  • The os bounce is added to a native scrollview. As far I know they don't effect the famo.us javascript scrollview. I've tried setting edgeGrip to 1 before and have never had it work. Most of the scrollview physics options yield little change and at larger number changes they start acting very buggy. I'll check it and up point it if you have a fiddle showing this working because for all my testing this doesn't work. – aintnorest Sep 23 '14 at 18:07
  • I am using a v0.3.0-alpha branch (you can check out my fork below) and the native bounce is induced by the OS even on Famo.us pages. A Famo.us page is treated a single webpage that - just like Google.com (without a search) - is bounced even if it doesn't use scrolling. I do agree, the settings seem a bit unresponsive at times, but for me changing edgeGrip worked! https://github.com/StephanBijzitter/famous/tree/v0.3.0-alpha – Stephan Bijzitter Sep 24 '14 at 08:42
0

I tried Stephan's suggestion to use edgeGrip and it doesn't stop the edge bouncing running under Chrome. The other edge parameters didn't improve the behavior either. However I did find that speedLimit helps to reduce the bounce. Not a perfect solution but it might be enough depending on your requirements.

new Scrollview({    
   speedLimit: 0.6
});

Update: This doesn't seem to help as much with mobile Chrome :-/

pmont
  • 2,083
  • 22
  • 43