Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Extends: Group 

Description

The LayoutGroup node manages the position of its child nodes by arranging them in a row from left to right (horizontal) or in a column from top to bottom (vertical layout). Fields provide options to control the spacing between children, the horizontal and vertical alignment, and the margins around the edges of the group.

Fields

FieldTypeDefaultUse
layoutDirectionstring"vertical"

Controls the layout direction. Values include:

  • "horizontal" - positions the children in a row from left to right
  • "vertical" - positions the children in a column from top to bottom
horizAlignmentstring"left"

Specifies the alignment point in the horizontal direction.

When layoutDirection is "vertical":

  • "left" - Aligns the left edges of each child in the column and sets the LayoutGroup's local origin so that x=0 is at the left edge of the children.
  • "center" - Aligns the centers of each child in the column and sets the LayoutGroup's local origin so that x=0 is at the center alignment point.
  • "right" - Aligns the right edges of each child in the column and sets the LayoutGroup's local origin so that x=0 is at the right edge of the children.

When layoutDirection is "horizontal":

  • "left" - Sets the LayoutGroup's local origin so that x=0 is at the left edge of the first child.
  • "center" - Sets the LayoutGroup's local origin so that x=0 is at the center of the horizontal row of children.
  • "right" - Sets the LayoutGroup's local origin so that x=0 is at the right edge of the last child.
vertAlignmentstring"left"

Specifies the alignment point in the horizontal direction.

When layoutDirection is "horizontal":

  • "top" - Aligns the top edges of each child in the row and sets the LayoutGroup's local origin so that y=0 is at the top edge of the children.
  • "center" - Aligns the centers of each child in the row and sets the LayoutGroup's local origin so that y=0 is at the center alignment point.
  • "bottom" - Aligns the bottom edges of each child in the row and sets the LayoutGroup's local origin so that y=0 is at the bottom edge of the children.

When layoutDirection is "vertical":

  • "top" - Sets the LayoutGroup's local origin so that y=0 is at the top edge of the first child.
  • "center" - Sets the LayoutGroup's local origin so that y=0 is at the center of the vertical column of children.
  • "bottom" - Sets the LayoutGroup's local origin so that y=0 is at the bottom edge of the last child.
itemSpacingsarray of floats[ ]

Controls the spacing before or after each child in the layout direction.

By default, no space is added between the children.

If the itemSpacings" field has a single value, and the addItemSpacingAfterChild field is "true", that amount of space is inserted after each child is positioned. If addItemSpacingAfterChild is "false", the space is inserted before each child is positioned.

If the itemSpacings field has more than one value, the first value specifies the spacing before or after the first item, the second value specifies the spacing before or after the second item, etc. If there are fewer values in the itemSpacings field than needed, the final value is repeated as needed. If there are more values in the itemSpacings field than needed, the extra values are ignored.
addItemSpacingAfterChildbooleantrue

Controls how the itemSpacings are inserted. By default, addItemSpacingsAfterChild is true. This results in the specified item spacings to be inserted after the child is positioned. If addItemSpacingsAfterChild is false, the specified item spacing is inserted before the child is positioned.

Theme Attributes

None

Data Bindings

None

 

  • No labels