-
1 Dec 2011 4:49 AM #1
Regions now require width to render properly
Regions now require width to render properly
Moving a prototype project from 4.0.7 to 4.1-pr1 and I found the following difference causing my to change some code (to the better...)
4.0.7 lets me get away with the following definition of a Border region:
With 4.1-pr1 I need to specifically add a width: property otherwise the west region will be 100% width.Code:{ xtype: 'navtree', region: 'west', split: true, minWidth: 250 }
-
1 Dec 2011 9:41 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
Using this code:
Both 4.0.7, 4.1-PR1, and out latest code in git produce the same results.Code:Ext.create('Ext.container.Viewport', { layout : 'border', items : [ { region : 'west', split : true }, { region : 'center' } ] });
Using this code in 3.4.0 and it produces the same results as the 4.x did:
Code:new Ext.Viewport({ layout : 'border', items : [ { region : 'west', split : true }, { region : 'center' } ] });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.
-
1 Dec 2011 9:35 PM #3
Perhaps a complete example would help, but I'll take a stab. The meaning of no width is "auto width" which can be counter-intuitive at times. The navtree is not a built-in xtype, so I am not sure what it contains. If you try something like a simple panel with some text or a basic component, I imagine that it will auto-width as you might expect. Trees, being tables, may expand.
Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
1 Dec 2011 10:13 PM #4
navtree is (as you may have guessed) a subclassed Tree panel.
I have added "width" and now everything works in both 4.0.7 and 4.1-PR1... don't know why. If I remove "width" everything is fine now, but I have added other stuff to the panels so maybe the layout is now completely satisfied?
Thanks,
/Mattias


Reply With Quote