Position
The CSML language provides many different attributes for positioning.
From the center
| Attribute | Type | Default | Description |
|---|---|---|---|
| horizontalCenter | INTEGER | When set, if left or right is not set, the layout will be centered horizontally offset by the numeric value of this property | |
| percentHorizontalCenter | INTEGER | When set, if left or right is not set, the layout will be centered horizontally offset by the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100% | |
| minHorizontalCenter | INTEGER | The minimum horizontal center location that can be applied through percentHorizontalCenter | |
| maxHorizontalCenter | INTEGER | The maximum horizontal center location that can be applied through percentHorizontalCenter | |
| verticalCenter | INTEGER | When set, if top or bottom is not set, the layout will be centered vertically offset by the numeric value of this property | |
| percentVerticalCenter | INTEGER | When set, if top or bottom is not set, the layout will be centered vertically offset by the value of this multiplied by to the containing height. A value of 0 represents 0% and 1 represents 100% | |
| minVerticalCenter | INTEGER | The minimum vertical center location that can be applied through percentVerticalCenter | |
| maxVerticalCenter | INTEGER | The maximum vertical center location that can be applied through percentVerticalCenter |
From the top
| Attribute | Type | Default | Description |
|---|---|---|---|
| top | INTEGER | When set, the top of the layout will be located offset from the top of its container by the value of this property | |
| percentTop | INTEGER | When set, the top of the layout will be located offset by the value of this property multiplied by the containing height. A value of 0 represents 0% and 1 represents 100% | |
| offsetTop | INTEGER | Add additional offset to be added to the top value after it has been set | |
| minTop | INTEGER | The minimum top location that can be applied to the layout boundaries | |
| maxTop | INTEGER | The maximum top location that can be applied to the layout boundaries |
From the bottom
| Attribute | Type | Default | Description |
|---|---|---|---|
| bottom | INTEGER | When set, the bottom of the layout will be located offset from the bottom of its container by the value of this property | |
| percentBottom | INTEGER | When set, the bottom of the layout will be located offset by the value of this property multiplied by the containing height. A value of 0 represents 0% and 1 represents 100% | |
| offsetBottom | INTEGER | Add additional offset to be added to the bottom value after it has been set | |
| minBottom | INTEGER | The minimum bottom location that can be applied to the layout boundaries | |
| maxBottom | INTEGER | The maximum bottom location that can be applied to the layout boundaries |
From the left
| Attribute | Type | Default | Description |
|---|---|---|---|
| left | INTEGER | When set, the left of the layout will be located offset by the value of this property multiplied by the containing width | |
| percentLeft | INTEGER | When set, the left of the layout will be located offset by the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100% | |
| offsetLeft | INTEGER | Add additional offset to be added to the left value after it has been set | |
| minLeft | INTEGER | The minimum left location that can be applied to the layout boundaries | |
| maxLeft | INTEGER | The maximum left location that can be applied to the layout boundaries |
From the right
| Attribute | Type | Default | Description |
|---|---|---|---|
| right | INTEGER | When set, the right of the layout will be located offset by the value of this property multiplied by the containing width | |
| percentRight | INTEGER | When set, the right of the layout will be located offset by the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100% | |
| offsetRight | INTEGER | Add additional offset to be added to the right value after it has been set | |
| minRight | INTEGER | The minimum right location that can be applied to the layout boundaries | |
| maxRight | INTEGER | The maximum right location that can be applied to the layout boundaries |
Absolute positionning
| Attribute | Type | Default | Description |
|---|---|---|---|
| x | INTEGER | Defines the x location (top left) of the layout boundary. Unlike left, x does not affect a layout's width. Once left (or percentLeft) is set, the x value no longer applies. If percentX exists when x is set, percentX will be overridden and be given a value of NaN. When a Layout is created for a display object, this is defined as the x location of that display object. The value of x itself cannot be NaN | |
| percentX | INTEGER | When set, the x location of the layout will be located at the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100% | |
| minX | INTEGER | The minimum x location that can be applied to the layout boundaries | |
| maxX | INTEGER | The maximum x location that can be applied to the layout boundaries | |
| y | INTEGER | Defines the y location (top left) of the layout boundary. Unlike top, y does not affect a layout's height. Once top (or percentTop) is set, the y value no longer applies. If percentY exists when y is set, percentY will be overridden and be given a value of NaN. When a Layout is created for a display object, this is defined as the y location of that display object. The value of y itself cannot be NaN | |
| percentY | INTEGER | When set, the y location of the layout will be located at the value of this property multiplied by the containing height. A value of 0 represents 0% and 1 represents 100% | |
| minY | INTEGER | The minimum y location that can be applied to the layout boundaries | |
| maxY | INTEGER | The maximum y location that can be applied to the layout boundaries |