-
22 Feb 2013 5:17 AM #1
Mixin parameters have no effect
Mixin parameters have no effect
Ext version tested:
- Ext 4.1.1-rc2
- FF19
- Some parameters defined in a Mixin have no effect on the panel where the mixin is added
The styles from the mixin are effective on the panel - however the following doesnt do anything and the panel is not collapsibleCode:Ext.define("App.mixins.PanelDefaults", { layout:{ type:'vbox', align:'stretch' }, bodyStyle:{ padding:"5px" }, style:{ marginBottom:"5px" }, //has no effect titleCollapse:true, collapsible:true, collapseDirection:'top' }); Ext.define("App.view.Panel", { extend:'Ext.panel.Panel', mixins:['App.mixins.PanelDefaults'] });
Workaround:Code:titleCollapse:true, collapsible:true, collapseDirection:'top'
Code:Ext.define("App.mixins.PanelDefaults", { layout:{ type:'vbox', align:'stretch' }, bodyStyle:{ padding:"5px" }, style:{ marginBottom:"5px" }, initMe:function(){ this.titleCollapse = this.titleCollapse || true; this.collapsible = this.collapsible || true; this.collapseDirection = this.collapseDirection || 'top'; } }); Ext.define("App.view.Panel", { extend:'Ext.panel.Panel', mixins:['App.mixins.PanelDefaults'] initComponent:function(){ this.initMe(); this.callParent(); } });
-
22 Feb 2013 11:11 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
This looks to be fixed in 4.2.0 releases.
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.
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote