1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    54
    Answers
    1
    Vote Rating
    0
    jameshenderson is on a distinguished road

      0  

    Default Answered: 3 or more added carousel items cause overlapped content

    Answered: 3 or more added carousel items cause overlapped content


    When I create a carousel with 3 or more added items, the first page holds two or more sets of content, for example:

    Code:
    var carousel2 = new Ext.Carousel({
    	layout: 'fit',
    	items: []
    });
    
    
    
    
    carousel2.add(new Ext.Panel({
    	html: '1st NEW Item!!!!!'
    }));
    
    
    carousel2.add(new Ext.Panel({
    	html: '2nd NEW Item!!!!!'
    }));
    
    
    carousel2.add(new Ext.Panel({
    	html: '3rd NEW Item!!!!!'
    }));

  2. Not sure why but its working without layout:'fit'.

    If it helps, I am using the carousel inside a tabpanel, and not using layout:'fit' anywhere else.

    Mark that as Answered if you like? Keep up the great work!

  3. #2
    Sencha User
    Join Date
    Jul 2011
    Posts
    54
    Answers
    1
    Vote Rating
    0
    jameshenderson is on a distinguished road

      0  

    Default Fixed - I removed layout:'fit'

    Fixed - I removed layout:'fit'


    Not sure why but its working without layout:'fit'.

    If it helps, I am using the carousel inside a tabpanel, and not using layout:'fit' anywhere else.

    Mark that as Answered if you like? Keep up the great work!

  4. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Remember layouts work from the outside. So if you added layout fit into carousel, it would mean all of its children would be the size of the carousel.

    Carousels are special though, and are already layout fit in a different way. We should remove the layout configuration from carousels altogether.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 1