28446d1ef0c51eab447176a8b2abc21642fdb400.svn-base 589 B

12345678910111213141516171819202122
  1. /*
  2. * Ext JS Library 2.0 Copyright(c) 2006-2007, Ext JS, LLC. licensing@extjs.com
  3. *
  4. * http://extjs.com/license
  5. */
  6. Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, {
  7. monitorResize : true,
  8. onLayout : function(A, B) {
  9. Ext.layout.FitLayout.superclass.onLayout.call(this, A, B);
  10. if (!this.container.collapsed) {
  11. this.setItemSize(this.activeItem || A.items.itemAt(0), B
  12. .getStyleSize())
  13. }
  14. },
  15. setItemSize : function(B, A) {
  16. if (B && A.height > 0) {
  17. B.setSize(A)
  18. }
  19. }
  20. });
  21. Ext.Container.LAYOUTS["fit"] = Ext.layout.FitLayout;