Rolling out: Projects become folders 📂 ✨
Did you ever find a solution?
The easiest way is to turn off the clipsContent, get the absoluteRenderBounds, and then use the resizeWithoutConstraints method and change the coordinates of the children if required.
clipsContent
absoluteRenderBounds
resizeWithoutConstraints
For anyone coming here, I’ve coded up a solution that worked pretty well for my use case. Some edge cases might not be working yet though. Resizes a parent element around all children, assuming absolute positioning of both.
Github Gist - johannesvollmer / Resize to Fit (Figma Plugin API)
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.