website/files/v0.9.2/js/goldenlayout.js
function( contentItem, index ) {
		var tab = new lm.controls.Tab( this, contentItem );
		
		if( this.tabs.length === 0 ) {
			this.tabs.push( tab );
			this.tabsContainer.append( tab.element );
			return;
		}
	
		if( index === undefined ) {
			index = this.tabs.length;
		}
	
		if( index > 0 ) {
			this.tabs[ index - 1 ].element.after( tab.element );
		} else {
			this.tabs[ 0 ].element.before( tab.element );
		}
	
		this.tabs.splice( index, 0, tab );
	}
function( contentItem, index ) {
		var tab = new lm.controls.Tab( this, contentItem );
		
		if( this.tabs.length === 0 ) {
			this.tabs.push( tab );
			this.tabsContainer.append( tab.element );
			return;
		}
	
		if( index === undefined ) {
			index = this.tabs.length;
		}
	
		if( index > 0 ) {
			this.tabs[ index - 1 ].element.after( tab.element );
		} else {
			this.tabs[ 0 ].element.before( tab.element );
		}
	
		this.tabs.splice( index, 0, tab );
	}
function ( contentItem , index ) { var tab = new lm . controls . Tab ( this , contentItem ) ; if ( this . tabs . length === 0 ) { this . tabs . push ( tab ) ; this . tabsContainer . append ( tab . element ) ; return ; } if ( index === undefined ) { index = this . tabs . length ; } if ( index > 0 ) { this . tabs [ index - 1 ] . element . after ( tab . element ) ; } else { this . tabs [ 0 ] . element . before ( tab . element ) ; } this . tabs . splice ( index , 0 , tab ) ; }
Creates a new tab and associates it with a contentItem

@param   {lm.item.AbstractContentItem} contentItem
@param   {Integer} index The position of the tab

@returns {void}
Creates a new tab and associates it with a contentItem