/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
*/
// We are adding these custom layouts to a namespace that does not
// exist by default in Ext, so we have to add the namespace first:
var target = this.container.getLayoutTarget(), ret;
if (target) {
ret = target.getViewSize();
+
+ // IE in strict mode will return a height of 0 on the 1st pass of getViewSize.
+ // Use getStyleSize to verify the 0 height, the adjustment pass will then work properly
+ // with getViewSize
+ if (Ext.isIE && Ext.isStrict && ret.height == 0){
+ ret = target.getStyleSize();
+ }
+
ret.width -= target.getPadding('lr');
ret.height -= target.getPadding('tb');
}
// private
onLayout : function(ct, target){
- var rs = ct.items.items, len = rs.length, r, i;
+ var rs = ct.items.items,
+ len = rs.length,
+ r,
+ m,
+ i,
+ margins = [];
this.renderAll(ct, target);
for(i = 0; i < len; i++){
r = rs[i];
+ m = r.getPositionEl().getMargins('tb');
+ margins[i] = m;
if(!r.rowHeight){
- ph -= (r.getHeight() + r.getEl().getMargins('tb'));
+ ph -= (r.getHeight() + m);
}
}
for(i = 0; i < len; i++){
r = rs[i];
+ m = margins[i];
if(r.rowHeight){
- r.setSize({height: Math.floor(r.rowHeight*ph) - r.getEl().getMargins('tb')});
+ r.setSize({height: Math.floor(r.rowHeight*ph) - m});
}
}
var ts = this.getLayoutTargetSize();
if (ts.width != size.width){
this.adjustmentPass = true;
- this.layoutTargetSize = ts;
this.onLayout(ct, target);
}
}