ConstraintsControlModel

Control the position/resize constraints of a morph inside a morph without any layout or a morph with a ConstraintLayout. A constraint is a policy that dictates how the different sides of a morph relate to its owner morph frame. This controller automatically creates ConstraintLayouts as needed to reify the constraints.

Constructor

new ConstraintsControlModel()

Methods

selectHorizontalConstraint()

Same as setlectVerticalConstraint() but for horizontal direction.

selectVerticalConstraint()

Configures the vertical constraint behavior of a morph. This applies when the morph is controlled by a ConstraintLayout. The following constraint behaviors are supported (By the ConstraintLayout): scale: this scales the morph along the vertial direction when the container resizes. move: this moves the morph along the vertical direction when the container resizes. (Also known as Bottom) fixed: this leaves the morph at a fixed vertical offset when the container resizes. (Also known as Top) resize: this resizes the morph by the same amount that the container resizes (Also known as Top and Botton) center: this moves the morph vertically via its relative center to the container as the container resizes.