UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

47 lines 1.98 kB
/** * An axis coupling mode is a mode that is applied to a {@link ViewportWidget} * on a per-axis basis. The mode controls how a ViewportWidget's axis length * relates to a ViewportWidget child's axis length. * * If two axes are not coupled, then they do not affect each other's length in * any way. If two axes are bi-directionally coupled, then they will always have * the same length. If two axes are uni-directionally coupled, then one axis * will affect the length of another axis, but not the other way around. * * @category Core */ export var AxisCoupling; (function (AxisCoupling) { /** * Doesn't couple a {@link ViewportWidget}'s axis to its child; the * viewport's axis length is completely separate from the child's axis * length. * * Default axis coupling mode for ViewportWidget. */ AxisCoupling[AxisCoupling["None"] = 0] = "None"; /** * Bi-directional coupling. The {@link ViewportWidget}'s axis will be equal * to its child's axis. Use this if the axis being tied isn't meant to be * scrollable. */ AxisCoupling[AxisCoupling["Bi"] = 1] = "Bi"; /** * Uni-directional coupling, from the parent to the child. The * {@link ViewportWidget}'s axis will be resolved as a regular Widget, but * the result will be transferred to the child's minimum axis length * constraint. * * Default axis coupling mode for {@link TextArea}. */ AxisCoupling[AxisCoupling["ParentToChild"] = 2] = "ParentToChild"; /** * Uni-directional coupling, from the child to the parent. The child's * resolved axis length will be used as the {@link ViewportWidget}'s minimum * axis length. Useful when combined with {@link Widget#flexShrink}. * * Default axis coupling mode for {@link TextArea}. */ AxisCoupling[AxisCoupling["ChildToParent"] = 3] = "ChildToParent"; })(AxisCoupling || (AxisCoupling = {})); //# sourceMappingURL=AxisCoupling.js.map