lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
42 lines (41 loc) • 1.5 kB
TypeScript
/**
* Alignment of container contents. Used for when {@link Container} has too much
* space.
*
* @category Theme
*/
export declare enum Alignment {
/**
* Give the maximum available space to the child (taking into account
* container padding), potentially stretching it.
*/
Stretch = "stretch",
/**
* Propagates minimum axis length to the child (taking into account
* container padding), potentially stretching it, but not growing it beyond
* the minimum container axis length unless necessary.
*
* Does something similar in {@link MultiContainer} cross-axis lengths;
* propagates the minimum axis length and, if the final cross axis length
* exceeds the minimum axis length, then re-propagates the final axis length
* to all children, effectively stretching the MultiContainer contents on
* the cross axis without artificially growing the cross axis.
*/
SoftStretch = "soft-stretch",
/**
* Align the child to the start of the container, having the extra space at
* the end. Equivalent to using a ratio of 0.
*/
Start = 0,
/**
* Align the child to the center of the container, having the extra space
* split equally to both the start and the end. Equivalent to using a ratio
* of 0.5.
*/
Center = 0.5,
/**
* Align the child to the end of the container, having the extra space at
* the start. Equivalent to using a ratio of 1.
*/
End = 1
}