PDA

View Full Version : [CLOSED]defaultMargins for Box containers does not accept string value



kmiyashiro
26 Feb 2011, 12:19 AM
In Ext.layout.container.Box there is a property called defaultMargins, the documentation says that it must be an Object, but the description says:


This property may also be specified as a string containing space-separated, numeric margin values. The order of the sides associated with each value matches the way CSS processes margin values:

Either that's an incorrect docs description and defaultMargins does not accept a string value, or this is a bug:


// Use the item's margin/margins specification, or
margins = item.margins || item.margin || Ext.apply({}, this.defaultMargins);


Ext.apply({}, '10') will always return an empty object, which is then assigned the item's current margins which defeats the purpose of setting the defaultMargins.


Ext.applyIf(margins, itemEl.getMargin());

Fix: Take out the Ext.apply().


// Use the item's margin/margins specification, or
margins = item.margins || item.margin || this.defaultMargins;

Jamie Avins
26 Feb 2011, 8:00 AM
This has already been addressed for the next release.