Hi I want to set constraints for a Text Node but it seems like the property is read-only Constraints · Figma Developers
Also, I don’t find any method or way to set the constraints.
How can I do it?
Thank you,
Page 1 / 1
To change read-only properties, you need to overwrite the entire object or array. In your case, you need to overwrite the object, and the code will look like this:
node.constraints = {
horizontal: "MAX",
vertical: "MAX"
}
Read more about editing properties on the Figma Developers:
figma.comReply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.