Class: ContentController

ContentController

Controls all LayoutSystem children sizing.

new ContentController (layout, content, globalStyles)

Creates all instances and manages configs

Name Type Attributes Description
layout LayoutSystem

Layout instance

content Content <optional>

Content of the layout

globalStyles LayoutStyles <optional>

Global styles for layout and it's children

Members

children Map<string, Container>

List of all children of the layout, controlled by this controller. As the layout is a container, you can use all container methods on it, including addChild, but only elements added by layout config thought constructor of ContentController or using addContent method will be managed by this controller.

firstChild Container

Get first child of the layout

Methods

addContentElement (id, content)

Adds content element to the layout and register it in Content controller registry.

Name Type Description
id string

ID of the element.

content Container

pixi container instance to be added.

createContent (content, parentGlobalStyles)

Adds content to the layout.

Name Type Attributes Description
content Content <optional>

Content of the layout

parentGlobalStyles LayoutStyles <optional>

Global styles for layout and it's children

getByID (id) Container | undefined

Get element from the layout child tree by it's ID

Name Type Description
id string
Returns:
Type Description
Container | undefined

removeContent (id)

Removes content by its id.

Name Type Description
id string

resize (width, height)

Resizes all children.

Name Type Description
width number
height number