1. #1
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    2
    Vote Rating
    0
    parkside is on a distinguished road

      0  

    Default 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?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    Answers
    3575
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    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
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    2
    Vote Rating
    0
    parkside is on a distinguished road

      0  

    Default


    Thx - sounds promising but I can't get it working.

    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 ]
            });
        }
    });
    I took this example and added the scroll part - without effect.

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    adjohnson916 is on a distinguished road

      0  

    Default 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.

Thread Participants: 2

Tags for this Thread