Referenceconstraints

<constraints>

<constraints> is a Graphical component that delineates a block of code for defining one or more constraint components associated with a <point>.

Attributes and Properties

The <constraints> component has no attributes.

Props for <constraints name="c">
PropertyType
$c.constraintUsedboolean
$c.disabledboolean
$c.fixedboolean
$c.fixLocationboolean
$c.hiddenboolean
$c.scalesnumber

Example: <constraints> with nested <constrainToGrid/>

The <point> is constrained to the default 1×11 \times 1 grid by nesting a <constrainToGrid/> component within a <constraints> block.


Example: <constraints> with nested <constrainTo>

A <point> defining the center of the <circle> is constrained to a <line> by nesting a <constrainTo> component within a <constraints> block.


Example: <constraints> with nested <attractToGrid/>

The <point> is attracted to a custom grid by nesting an <attractToGrid> component within a <constraints> block.


Property Example: constraintUsed

The constraintUsed property renders the boolean value corresponding to whether the current location of the <point> is utilizing the specified constraint - in this case, an <attractToGrid/> constraint.