Results 1 to 4 of 4

Thread: How did Carrousel change exactly in 0.9.3?

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Location
    The Hague
    Posts
    15

    Default How did Carrousel change exactly in 0.9.3?

    I just upgraded my prototype to 0.9.3 and some things stopped working, as expected. I could fix most issues but i'm left with a rather weird issue with the carrousel where i instantiate it with a bunch of items and it only shows the first.

    I'm building this super simple array of cards in a loop and then passing that as the items paramter to a new carrousel. In the previous version that was perfectly fine but now, while it does see all the items (i get a dot for each), when i slide to the next it's just an empty card. The html is there when i look at the generated source but it seems like it's hidden. Although i can't find out how through firebug.

    creating a bunch of items:

    Code:
    var items = [];
    
    Ext.each(delivery.looks, function(look) {
    
    this.single = {
            title: look.name,
            html: "<div style=\"background: transparent url(/content/images/"+look.image+") no-repeat center 0; height: 100%; width: 100%; \"></div>"
        }
    
        items.push(this.single);
    
    });
    creating a basic carrousel:

    Code:
    this.carousel = new Ext.Carousel({
        ui: 'dark',
        defaults: { cls: 'look' },
        items: items
    });
    The carrousel then ends up in a panel and thats it. nothing fancy i would think...
    Last edited by tijs; 4 Aug 2010 at 7:10 AM. Reason: reformatted code a bit for legibility

  2. #2
    Ext User
    Join Date
    Jul 2010
    Location
    Calgary, Alberta
    Posts
    186

    Default

    I had this happen too, but I found there were css changes as well.

    make sure to include the 0.93 css file for the sencha framework you are using. (ie: debug.css if you are using debug.js)

  3. #3
    Ext JS Premium Member cnelissen's Avatar
    Join Date
    Sep 2007
    Location
    California
    Posts
    226

    Default

    I'm experiencing the same issue... I have a carousel with 3 cards, and each are somehow hidden. They are present in the DOM, and don't have any display or visibility turned off, and are blocking correctly, not sure why they are hidden.

    Code:
    Ext.Modules.CarouselTest = Ext.extend(Ext.Carousel, {
    	items: [{
    		title: 'Ad 1',
    		html: '<img src="/temp_images/ads/ad1.jpg" width="320" height="320" alt="" />'
    	},{
    		title: 'Ad 2',
    		html: '<img src="/temp_images/ads/ad2.jpg" width="320" height="320" alt="" />'
    	},{
    		title: 'Ad 3',
    		html: '<img src="/temp_images/ads/ad3.jpg" width="320" height="320" alt="" />'
    	}],
    	initComponent: function() {
    		Ext.Modules.CarouselTest.superclass.initComponent.call(this);
    	}
    });
    Tested in Chrome 6, Safari 5.0.1, iPad, and iPhone.

    Tried to upload a screenshot to demonstrate, but its giving some kind of error but no error message... I can provide one if someone wants it.
    - Clint Nelissen

  4. #4
    Sencha User
    Join Date
    Jun 2010
    Location
    The Hague
    Posts
    15

    Default

    @nosarious Awesome, it really was that simple! Thanks for the pointer.

    @cnelissen my problem was caused by the wrong css file, maybe your problem will be solved the same way
    Last edited by tijs; 4 Aug 2010 at 10:22 AM. Reason: clarified who i was replying to

Similar Threads

  1. Changing carrousel split-view heights
    By alexandercarter in forum Sencha Touch 1.x: Discussion
    Replies: 7
    Last Post: 21 Jul 2010, 7:25 AM
  2. Change Grid Model on Form Fields change
    By shrek in forum Ext GWT: Help & Discussion (1.x)
    Replies: 0
    Last Post: 27 Feb 2009, 9:42 AM
  3. Tree change on tab change
    By varsha.kothari in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 23 Jun 2008, 6:29 AM
  4. Replies: 2
    Last Post: 10 Jun 2008, 8:45 PM
  5. Replies: 0
    Last Post: 28 Aug 2007, 12:09 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •