1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Hong Kong
    Posts
    44
    Answers
    6
    Vote Rating
    0
    Winnie Lam is on a distinguished road

      0  

    Default Unanswered: Unable to slide view in right direction

    Unanswered: Unable to slide view in right direction


    In app.js, I create a viewport with card layout.

    Code:
    Ext.application({
        name: 'App',  
        model: ['Page','ShopInfo'],
        controllers: ['Home'],    
        launch: function() {                  
            var viewport = Ext.create('Ext.Panel', {
                id: 'my-viewport',
                fullscreen: true,
                layout: {
                    type: 'card',
                    animation: { type: 'slide', direction: 'left' }
                },
                items: [
                    { xtype: 'home' }
                ]
    });
    
    
        }
    });
    And in the controller, whenever the button is clicked, i want it to go to the homepage.
    Please help with the following lines. Why the first one work, but the second one doesn't work? I want it slide to right. If I remove the animation type in app.js, nothing appeared.

    Code:
    'button[go]' : {
                    tap: function(btn) {
                        viewport = Ext.ComponentQuery.query('#my-viewport');
                        target = Ext.ComponentQuery.query(btn.go);
                        
                        viewport[0].getLayout().setAnimation({type: 'slide', direction: 'right'}); //first 
                        viewport[0].setActiveItem(target[0],{type: 'slide', direction: 'right'}); //second
                    }
                }

  2. #2
    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


    In PR2, setActiveItem does not support the second argument specifying the animation type.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

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