Bounding Box Constraint
Intro
Constrain Shapes to the bounding box of other shapes.
UI
Input Shape - Connect the Shape to sample its bounding box.
Width - A value of 0 will set pinning to the left of the Input Shape’s bounding box, a value of 100 will set it to the right.
Height - A value of 0 will set pinning to the bottom of the Input Shape’s bounding box, a value of 100 will set it to the top.
Offset - Add/subtract values [x, y] to the output.
Out Position [read only] - Shows the [x, y] values being output by the Layer. Where the Id connection combines both the x and y positions this attribute allows you to connect the separate [x, y] attributes to other Layers.
Example
- Create 2 Shapes.
- Create a Bounding Box Constraint.
- Connect shape1.id→boundingBoxConstraint.inputShape.
- Connect boundingBoxConstraint.id→shape2.position.
- Set the Bounding Box Constraint's Width to 0.
Shape 2 will be constrained to the left edge of Shape 1's bounding box.