Results 1 to 4 of 4

Thread: how to override launch function?

  1. #1
    Sencha User
    Join Date
    Nov 2013
    Posts
    49
    Answers
    1

    Default how to override launch function?

    Hi i downloaded ext.ux.cover extension from github,

    I copied the below code in my app.js, now i want to open this animation in my view called, Peronalizeviewtheme.js.
    Due to having launch: function() when ever i am deploying my application -- default this animation only showing.

    Please help me out how i can achieve this to bring in my view. i'm .

    Here code.
    launch: function(){


    var cover = Ext.create('Ext.ux.Cover', {
    itemCls: 'my-cover-item',
    //These are just for demo purposes.
    height: (Ext.os.deviceType !== 'Phone')? 300: undefined,
    width: (Ext.os.deviceType !== 'Phone')? 800: undefined,
    //end-demo
    itemTpl : [
    '<div>',

    '<div class="image"><tpl if="image"><img src="{image}"></tpl></div>',
    '</div>'
    ],
    store : {
    fields: ['firstName', 'lastName', 'company', 'image'],
    data: [
    {firstName: 'Tommy', lastName: 'Maintz', company: 'Sencha', image: 'touch/resources/images/sencha.png'},
    {firstName: 'Rob', lastName: 'Dougan', company: 'Sencha', image: 'touch/resources/images/sencha.png'},
    {firstName: 'Tommy', lastName: 'Maintz', company: 'Sencha', image: './images/sencha.png'},
    {firstName: 'Rob', lastName: 'Dougan', company: 'Sencha', image: './images/sencha.png'},

    ]
    },
    selectedIndex: 2,
    listeners:{
    itemdoubletap: function(){
    console.log('itemdbltap', arguments);
    },
    itemtap: function(cover, idx){
    console.log('itemtap', arguments);
    },
    scope: this
    }
    });



    var tab = Ext.create('Ext.Panel',{
    tabBarPosition: 'bottom',
    items:[{
    title: 'cover',
    iconCls: 'favorites',
    //Demo purpose
    layout:{
    type: 'vbox',
    pack:'center',
    align: 'center'
    },
    //end demo
    items: [cover]
    }]
    });

    //weird fix to call refresh when orientation changes
    Ext.Viewport.on('orientationchange', function(){cover.refresh();})
    Ext.Viewport.add(tab);


    },

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Please use code tags when you post code in your comments. I'm not sure I am following you. Is it that you cannot get the ux to work correctly?
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  3. #3
    Sencha User
    Join Date
    Nov 2013
    Posts
    49
    Answers
    1

    Default Yes, fmoseley .

    My question is how to change the launch function make it work inside my view becoz i already have one function with launch in my app.js. How to call it!!

  4. #4
    Sencha User
    Join Date
    Nov 2013
    Posts
    49
    Answers
    1

    Default I got the solution.

    Thank you.!!

Posting Permissions

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