PDA

View Full Version : layout: fit... broken in 2.2.0?



JohnM_
8 Apr 2013, 9:18 PM
In the ongoing process of trying to migrate to touch 2.2.0, we're having some pretty severe issues over here, but the big issue of the moment is a nagging probelm when setting layout: fit on a container. We get a Type error as follows


Object fit has no method 'onItemAdd'

Any experience with fixing this? Setting layout: fit is apparently still perfectly valid as per the 2.2.0 docs.

Any help deeply appreciated.

JohnM_
9 Apr 2013, 3:03 PM
Solution: layout: fit is somewhat broken. This used to work, under Sencha 2.0.11:


Ext.define('A_View', {
extend: 'Ext.Container',
xtype: 'somextype',
layout: 'fit',

config: {
iconCls: 'star',
[...etc]


Now, you need to move the layout into the config object, like so:


Ext.define('A_View', {
extend: 'Ext.Container',
xtype: 'somextype',

config: {
iconCls: 'star',
layout: 'fit',
[...etc]


So there's the solution.
It used to work flawlessly, now it doesn't.