Hello,
I use to have complex layouts and I unfortunately found a case where the layouts stop being calculated. Of course, I over-simplified the example.
Code:
Ext.require(['*']);
Ext.onReady(function() {
viewport = Ext.create('Ext.Viewport', {
layout: {
type: 'hbox',
align: 'middle'
},
items: [{
//width: 150,
layout : {
type: 'vbox',
align: 'stretch'
},
items: [{
layout: 'fit',
items: [{
xtype: 'displayfield',
fieldLabel: 'blah',
value: ':-)'
}]
}]
}]
});
});
It is enough to specify the width of the vbox (uncomment the "width:" line) or to un-wrap the layout-fit (commenting the lines in red) for the field to draw. In this state, the viewport remains desperately empty (drawn with a height of 0)