1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    5
    Vote Rating
    0
    oye816 is on a distinguished road

      0  

    Default How to let load-mask in the center position?

    How to let load-mask in the center position?


    I don't know why my load-mask is not in the center, it always shows on the top of pnel.
    Could someone help me?



    part of my code
    Code:
    var serviceNewsDetailPanel = new Ext.Panel({   
        id: 'serviceNewsDetailPanel',
        cls : 'tabPage',
        fullscreen: true,
        scroll : false,
        layout: 'fit',    
        items: [
        {
            xtype: 'list',
            id: 'serviceNewsDetailList',                
            itemTpl: '<div style="font-size: 16px">{title}</div><div style="font-size: 14px">{pubDate}</div>',
            store: serviceNewsDetailStore,
            onItemDisclosure: true,
            listeners: {
                itemtap: function(dataview, index, item, e) {
                    var url = dataview.store.getAt(index).data.link;
                    
                    window.open(url);
                }
            }
        }]   
    });
    
    
    var serviceCard = new Ext.Panel({
        id: 'serviceCard',
        title : '服務項目',
        iconCls : 'note1',    
        fullscreen : true,
        scroll: false,    
        layout: 'fit',
        dockedItems: [{
            xtype: 'toolbar',
            id : 'serviceToolbar',
            title : '服務項目',
            ui: 'leather',             
            cls: 'tabTopBar',
            height: 52,
            listeners: {
                add: function(container, component, index) {
                    container.doLayout();
                }
            }
        }],
        items: [
        {
            xtype: 'panel',
            id: 'servicePanel',
            layout: 'card',
            scroll: false,
            fullscreen: true,
            items:[serviceBasePanel, serviceDetailPanel, serviceDatabasePanel, serviceNewsPanel, serviceNewsDetailPanel]        
        }
        ]
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,710
    Vote Rating
    436
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Most likely it was rendered before a full layout was done so the element it is rendering to wasn't the full size.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha User
    Join Date
    Apr 2010
    Posts
    5
    Vote Rating
    0
    oye816 is on a distinguished road

      0  

    Default


    still don't know how to fix it

  4. #4
    Sencha User
    Join Date
    Apr 2010
    Posts
    5
    Vote Rating
    0
    oye816 is on a distinguished road

      0  

    Default


    Finally figure out how to fix it.

    Need to set
    Code:
    Ext.getCmp('id').setActiveItem(child, 'slide');
    before store to load data.