Shape constraints

Shape constraints allow the shape to define limits that prevent the shape from going below a minimum size or above a maximum size. For both minimum and maximum size, both width and height are optional, so it is possible to have a shape that is limited in only one dimension in either direction or has different limits for height and width. Shape constraints also allow locking controls on the shape. The shapes horizontal or vertical resizing can be limited to prevent the shape from being resized in that dimension. Minimum size can be specified using a formula, which allows the minimum dimensions of the shape to be dynamically updated based on formula values. If resizing is also locked for that dimension, the shape's dimension will be fully dynamic. Lastly, you are able to alter the image that represents your shape in the shapes panel. This is useful if you have many shapes that look the same or have the same structure, but serve a different purpose.

ShapeDefinition schema

PropertyTypeDescription
minSizeConstraintSizeFormula (optional)A constraint that limits the minimum size of the shape.
maxSizeConstraintSizeFormula (optional)A constraint that limits the minimum size of the shape.
lockedstring\[](optional)A list of fields to lock. Options are aspectRatio, horizontalResize, and verticalResize
thumbnailstring (SVG) (optional)An SVG that replaces the thumbnail image of the shape in the toolbar.

📘

If you include aspectRatio in the locked list without having a default aspect ratio, the width and height will be used to calculate it.

ConstraintSizeFormula schema

PropertyTypeDescription
widthnumber, formula (optional)
heightnumber, formula (optional)

ConstraintSize schema

PropertyTypeDescription
widthnumber (optional)If present, constrains the width to this number
heightnumber (optional)If present, constrains the height to this number