UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

46 lines 1.91 kB
/** * Alignment of container contents. Used for when {@link Container} has too much * space. * * @category Theme */ export var Alignment; (function (Alignment) { /** * Give the maximum available space to the child (taking into account * container padding), potentially stretching it. */ Alignment["Stretch"] = "stretch"; // TODO maybe make SoftStretch the default? it seems like a happy middle- // -ground between the nuclear-bomb-esque incompatible behaviour of // 0.10, and the old behaviour of 0.9 /** * 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. */ Alignment["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. */ Alignment[Alignment["Start"] = 0] = "Start"; /** * 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. */ Alignment[Alignment["Center"] = 0.5] = "Center"; /** * Align the child to the end of the container, having the extra space at * the start. Equivalent to using a ratio of 1. */ Alignment[Alignment["End"] = 1] = "End"; })(Alignment || (Alignment = {})); //# sourceMappingURL=Alignment.js.map