1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Ontario, Canada
    Posts
    10
    Vote Rating
    0
    imsCol is on a distinguished road

      0  

    Default [CLOSED-175] Issues with maps within carousels

    [CLOSED-175] Issues with maps within carousels


    I have been using Map cards in a carousel in order to allow a user to swipe through maps. The user can also select from a dropdown to get a new carousel of maps.

    The issue is: When loading a new carousel, only the map on the first card of the carousel is rendered.

    I'm not sure if this is a Sencha bug, or what... I have tried using doLayout to force rendering of the maps... no luck yet.

    Thanks in advance for the help

    Live Demo (let me know if it doesn't work... I have some odd DNS settings that don't let me view the URL)

    http://test.ilane.com/DS-Mobile-test...Bug/index.html

    Sample code is also attached to ensure that this forum post does not become irrelevant after I take down the demo.
    Attached Files

  2. #2
    Sencha - Support Team mike.estes's Avatar
    Join Date
    Mar 2011
    Location
    Redwood City, CA
    Posts
    221
    Vote Rating
    9
    mike.estes will become famous soon enough

      0  

    Default


    carousels should have a card layout, in your code you are giving the carousel a fit layout. Fit layout is only appropriate when the container with a fit layout only has 1 direct child component (though the child can have other children itself).

  3. #3
    Sencha User
    Join Date
    May 2011
    Location
    Ontario, Canada
    Posts
    10
    Vote Rating
    0
    imsCol is on a distinguished road

      0  

    Default


    Updated the demo to use the card layout for the carousel... the issue is still occurring.

  4. #4
    Sencha - Support Team mike.estes's Avatar
    Join Date
    Mar 2011
    Location
    Redwood City, CA
    Posts
    221
    Vote Rating
    9
    mike.estes will become famous soon enough

      0  

    Default


    hmm, I'm not sure yet why the maps aren't rendering. In the general sense this should work just fine, the small example below illustrates that you should be able to get this working:

    Code:
    Ext.setup({
        onReady: function() {
            var tripMapOptions = {        // Used in rendering map
                zoom: 14, 
                disableDefaultUI: true, 
                disableDoubleClickZoom: true, 
                draggable: false, 
                scrollwheel: false, 
                keyboardShortcuts: false
            };
    
            new Ext.Carousel({
                fullscreen: true,
                id: 'carousel',
                items: [
                    new Ext.Map({mapOptions:tripMapOptions}),
                    new Ext.Map({mapOptions:tripMapOptions}),
                    new Ext.Map({mapOptions:tripMapOptions})
                ]
            });
        } 
    });
    It's not jumping out at me why the above example works but your code isn't but I'll play around a bit and hopefully narrow it down

  5. #5
    Sencha User
    Join Date
    May 2011
    Location
    Ontario, Canada
    Posts
    10
    Vote Rating
    0
    imsCol is on a distinguished road

      0  

    Default


    Sorry, you appear to have misinterpreted what I was talking about.

    If you look at the demo, the first carousel (with only 1 card) renders fine. If this initial carousel had more than one card, the cards would render fine (as in your sample code).

    In my code, I am changing which carousel is active in the panel layout using the dropdown. When an alternate carousel is shown, the first map/item in the carousel renders, but the other map/items do not.

    I think this is a case of deferred rendering of the map, but I cannot figure out how to "force" rendering of the map in the carousel.

  6. #6
    Sencha - Support Team mike.estes's Avatar
    Join Date
    Mar 2011
    Location
    Redwood City, CA
    Posts
    221
    Vote Rating
    9
    mike.estes will become famous soon enough

      0  

    Default


    Yup, I was misinterpreting the issue, my apologies. I have your example running and am debugging the code.

  7. #7
    Sencha User
    Join Date
    May 2011
    Location
    Ontario, Canada
    Posts
    10
    Vote Rating
    0
    imsCol is on a distinguished road

      0  

    Default


    Any update?

    I would like to know if I did something wrong before I file it as a bug.

    Thanks for the help so far.

  8. #8
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    This appears to be a valid bug - it's on the pile for Touch 1.1.1
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

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

      0  

    Default


    Fixed in 2.0
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.