-
7 Nov 2011 11:34 PM #1
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] } ] });
-
8 Nov 2011 10:19 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
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.
-
8 Nov 2011 10:50 PM #3
-
15 Nov 2011 7:11 PM #4
Finally figure out how to fix it.
Need to setbefore store to load data.Code:Ext.getCmp('id').setActiveItem(child, 'slide');


Reply With Quote