X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/source/FitLayout.html?ds=inline diff --git a/docs/source/FitLayout.html b/docs/source/FitLayout.html index 361a2eec..3c538b1d 100644 --- a/docs/source/FitLayout.html +++ b/docs/source/FitLayout.html @@ -1,17 +1,12 @@ - -
-/*! - * Ext JS Library 3.0.3 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -/** + + + ++ \ No newline at end of fileThe source code + + + + +/** * @class Ext.layout.FitLayout * @extends Ext.layout.ContainerLayout *- +Ext.Container.LAYOUTS['fit'] = Ext.layout.FitLayout;This is a base class for layouts that contain a single item that automatically expands to fill the layout's @@ -36,12 +31,22 @@ Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, { // private monitorResize:true, + type: 'fit', + + getLayoutTargetSize : function() { + var target = this.container.getLayoutTarget(); + if (!target) { + return {}; + } + // Style Sized (scrollbars not included) + return target.getStyleSize(); + }, + // private onLayout : function(ct, target){ Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target); - if(!this.container.collapsed){ - var sz = (Ext.isIE6 && Ext.isStrict && target.dom == document.body) ? target.getViewSize() : target.getStyleSize(); - this.setItemSize(this.activeItem || ct.items.itemAt(0), sz); + if(!ct.collapsed){ + this.setItemSize(this.activeItem || ct.items.itemAt(0), this.getLayoutTargetSize()); } }, @@ -52,6 +57,6 @@ Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, { } } }); -Ext.Container.LAYOUTS['fit'] = Ext.layout.FitLayout;