website/files/v0.9.2/js/goldenlayout.js
function( config, parent ) {
		var typeErrorMsg, contentItem;

		if( typeof config.type !== 'string' ) {
			throw new lm.errors.ConfigurationError( 'Missing parameter \'type\'', config );
		}

		if( !this._typeToItem[ config.type ] ) {
			typeErrorMsg = 'Unknown type \'' + config.type + '\'. ' +
				'Valid types are ' + lm.utils.objectKeys( this._typeToItem ).join( ',' );

			throw new lm.errors.ConfigurationError( typeErrorMsg );
		}


		/**
		 * We add an additional stack around every component that's not within a stack anyways
		 */
		if( config.type === 'component' && !( parent instanceof lm.items.Stack ) && !!parent ) {
			config = {
				type: 'stack',
				isClosable: config.isClosable,
				width: config.width,
				height: config.height,
				content: [ config ]
			};
		}

		contentItem = new this._typeToItem[ config.type ]( this, config, parent );

		return contentItem;
	}
function( config, parent ) {
		var typeErrorMsg, contentItem;

		if( typeof config.type !== 'string' ) {
			throw new lm.errors.ConfigurationError( 'Missing parameter \'type\'', config );
		}

		if( !this._typeToItem[ config.type ] ) {
			typeErrorMsg = 'Unknown type \'' + config.type + '\'. ' +
				'Valid types are ' + lm.utils.objectKeys( this._typeToItem ).join( ',' );

			throw new lm.errors.ConfigurationError( typeErrorMsg );
		}


		/**
		 * We add an additional stack around every component that's not within a stack anyways
		 */
		if( config.type === 'component' && !( parent instanceof lm.items.Stack ) && !!parent ) {
			config = {
				type: 'stack',
				isClosable: config.isClosable,
				width: config.width,
				height: config.height,
				content: [ config ]
			};
		}

		contentItem = new this._typeToItem[ config.type ]( this, config, parent );

		return contentItem;
	}
function ( config , parent ) { var typeErrorMsg , contentItem ; if ( typeof config . type !== 'string' ) { throw new lm . errors . ConfigurationError ( 'Missing parameter \'type\'' , config ) ; } if ( ! this . _typeToItem [ config . type ] ) { typeErrorMsg = 'Unknown type \'' + config . type + '\'. ' + 'Valid types are ' + lm . utils . objectKeys ( this . _typeToItem ) . join ( ',' ) ; throw new lm . errors . ConfigurationError ( typeErrorMsg ) ; } /**
		 * We add an additional stack around every component that's not within a stack anyways
		 */ if ( config . type === 'component' && ! ( parent instanceof lm . items . Stack ) && ! ! parent ) { config = { type : 'stack' , isClosable : config . isClosable , width : config . width , height : config . height , content : [ config ] } ; } contentItem = new this . _typeToItem [ config . type ] ( this , config , parent ) ; return contentItem ; }
Recoursively creates new item tree structures based on a provided
ItemConfiguration object

@param   {Object} config ItemConfig
@param   {[ContentItem]} parent The item the newly created item should be a child of

@returns {lm.items.ContentItem}
Recoursively creates new item tree structures based on a provided ItemConfiguration object