-
10 Jan 2012 6:55 AM #1
Unanswered: Disable "Bounce" Effect in Carousel
Unanswered: Disable "Bounce" Effect in Carousel
I'm using a horizontal carousel to swipe between various teasers in our iPad app. This works really great. However I want to use this carousel in our Android app now and for this I want to disable the "bounce" effect I get when there are no more entries - meaning I'm at the end or the beginning of the "list".
Is this possible?
-
10 Jan 2012 8:24 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
- Answers
- 3107
The scroll config can take a config object of the Scroller class. So if you do this on a list it should work:
Code:scroll : { bounces : false }Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
11 Jan 2012 8:14 AM #3
Thx - sounds promising but I can't get it working.
I took this example and added the scroll part - without effect.Code:Ext.setup({ onReady: function() { // Create a Carousel of Items var carousel1 = new Ext.Carousel({ defaults: { cls: 'card' }, scroll: { bounces: false }, items: [{ html: '<h1>Carousel</h1><p>Navigate the two carousels on this page by swiping left/right or clicking on one side of the circle indicators below.</p>' }, { title: 'Tab 2', html: '2' }, { title: 'Tab 3', html: '3' }] }); new Ext.Panel({ fullscreen: true, layout: { type: 'vbox', align: 'stretch' }, defaults: { flex: 1 }, items: [carousel1 ] }); } });
-
12 Dec 2012 8:03 AM #4
No effect with "bounces: false"
No effect with "bounces: false"
The scroller config with bounces set to false isn't disabling the scroll bounce effect for me either on the components I've tested. Is this still supposed to work in Sencha Touch 2.x ( esp. 2.1)? Or is there another way of doing it? Thanks.


Reply With Quote