All children will have the same size as the parent.

However, we can adjust the inner space a child consumes:

// Example of utility function "layout"
LUIFreeStackLayout.layout(elem, {
top: 10, // start 10 pixels from top border of the parent
right: 0.3, // right end is 30% from the right border of the parent
bottom: 10, // end 10 pixels before bottom border of the parent
width: 0.5, // let it have a width of 50% of the x axis
})

// Example of utility function "layout"
LUIFreeStackLayout.layout(elem, {
width: 200, // elem is 200px width and x-centered (bc. right is missing)
top: 0, // elem is aligned from top
height: 30, // elem is 30px height
}

Hierarchy

  • LUIFreeStackLayout

Implements

Constructors

Properties

outEnd: number
outStart: number
PropBottom: "Bottom" = "Bottom"
PropHeight: "Height" = "Height"
PropLeft: "Left" = "Left"
PropRight: "Right" = "Right"
PropTop: "Top" = "Top"
PropWidth: "Width" = "Width"

Methods

  • Parameters

    • target: LUIElement
    • layoutProps: {
          bottom?: number;
          height?: number;
          left?: number;
          right?: number;
          top?: number;
          width?: number;
      }
      • Optional bottom?: number
      • Optional height?: number
      • Optional left?: number
      • Optional right?: number
      • Optional top?: number
      • Optional width?: number

    Returns void

Generated using TypeDoc