Skip to main content

<pc-layoutchild>

The <pc-layoutchild> tag is used to define a layout child component, which controls how an element is sized by its parent <pc-layoutgroup>.

Usage

Attributes

AttributeTypeDefaultDescription
enabledBoolean"true"Enabled state of the component
exclude-from-layoutFlag-Exclude this element from the layout so it takes up no space
fit-height-proportionNumber"0"Proportion of the group's spare height this element takes when height-fitting stretches or shrinks
fit-width-proportionNumber"0"Proportion of the group's spare width this element takes when width-fitting stretches or shrinks
max-heightNumber-Maximum height the element is laid out with (omit for no limit)
max-widthNumber-Maximum width the element is laid out with (omit for no limit)
min-heightNumber"0"Minimum height the element is laid out with
min-widthNumber"0"Minimum width the element is laid out with

Example

<pc-entity>
<pc-element type="image" width="200" height="45"></pc-element>
<pc-layoutchild min-height="45" fit-width-proportion="1"></pc-layoutchild>
</pc-entity>

JavaScript Interface

You can programmatically create and manipulate <pc-layoutchild> elements using the LayoutChildComponentElement API.