X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..b37ceabb82336ee82757cd32efe353cfab8ec267:/pkgs/pkg-tabs-debug.js diff --git a/pkgs/pkg-tabs-debug.js b/pkgs/pkg-tabs-debug.js index d393f7fd..20586858 100644 --- a/pkgs/pkg-tabs-debug.js +++ b/pkgs/pkg-tabs-debug.js @@ -1,6 +1,6 @@ /*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC + * Ext JS Library 3.2.2 + * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license */ @@ -559,7 +559,7 @@ new Ext.TabPanel({ *
  • cls : String
    The CSS class name
  • *
  • iconCls : String
    A CSS class to provide appearance for an icon.
  • * - * @param {BoxComponent} item The {@link Ext.BoxComponent BoxComponent} for which to create a selector element in the tab strip. + * @param {Ext.BoxComponent} item The {@link Ext.BoxComponent BoxComponent} for which to create a selector element in the tab strip. * @return {Object} An object hash containing the properties required to render the selector element. */ getTemplateArgs : function(item) { @@ -588,9 +588,6 @@ new Ext.TabPanel({ if(this.rendered){ var items = this.items; this.initTab(c, items.indexOf(c)); - if(items.getCount() == 1){ - this.syncSize(); - } this.delegateUpdates(); } }, @@ -817,10 +814,10 @@ new Ext.TabPanel({ Ext.fly(oldEl).removeClass('x-tab-strip-active'); } } + this.activeTab = item; if(item){ var el = this.getTabEl(item); Ext.fly(el).addClass('x-tab-strip-active'); - this.activeTab = item; this.stack.add(item); this.layout.setActiveItem(item); @@ -863,10 +860,11 @@ new Ext.TabPanel({ pos = this.getScrollPos(), l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos; - if(!this.enableTabScroll || count < 1 || cw < 20){ // 20 to prevent display:none issues + if(!this.enableTabScroll || cw < 20){ // 20 to prevent display:none issues return; } - if(l <= tw){ + if(count == 0 || l <= tw){ + // ensure the width is set if there's no tabs wd.scrollLeft = 0; wrap.setWidth(tw); if(this.scrolling){