1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    15
    Answers
    1
    Vote Rating
    0
    Kah0ona is on a distinguished road

      0  

    Default Answered: Height of Carousel is 0, why?

    Answered: Height of Carousel is 0, why?


    Hello, I have the following component, a media carousel with a toolbar on top:
    Code:
    Ext.define('MarktBuzz.view.components.MediaCarousel', {
        extend: 'Ext.Panel',
        xtype : 'mediacarousel',
        requires: ['Ext.Toolbar', 'Ext.carousel.Carousel'],
    
    
        config: {
            fullscreen: true
        },
        
        initialize: function() {
            this.callParent(arguments);
            var toolbar, carousel;
    
            console.log("Initializing MediaCarousel");
    
            toolbar = Ext.create('Ext.Toolbar', {
            
                docked: 'top',
                title: 'Afbeeldingen',
                items: [
                    {
                        action: 'slideBack',
                        text: 'Terug',
                        ui: 'back',
                    },
                    { xtype: 'spacer'}
                ]
            });
            
           carousel = Ext.create('Ext.carousel.Carousel', {
                fullscreen: true,
            
                
                defaults: {
                    styleHtmlContent: true
                },
            
                items: [
                    {
                        html : 'Item 1',
                        style: 'background-color: #5E99CC'
                    },
                    {
                        html : 'Item 2',
                        style: 'background-color: #759E60'
                    },
                    {
                        html : 'Item 3'
                    }
                ],
    
    
            });
    
    
            this.add([toolbar, carousel]);
            console.log(this);
        },
        
    });
    The toolbar shows, but the Ext.Carousel seems to be 0px high, when inspecting the HTML. Any idea why this is the case? If I set a fixed height, it works, but if i set height like "100%" it doesn't. How can I make it to use all the vertical space?

  2. In the config object, give the panel layout : 'fit', this will tell the carousel to have 100% of the width and height and will be as you want.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    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


    In the config object, give the panel layout : 'fit', this will tell the carousel to have 100% of the width and height and will be as you want.
    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.

  4. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    15
    Answers
    1
    Vote Rating
    0
    Kah0ona is on a distinguished road

      0  

    Default


    That did the trick thanks!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi