Hello,
I am working on a plugin that places images in Figma and I was wondering if there is a method I missed in the documentation that can help place the images in the Figma canvas without overlapping content that is already there.
thanks
Hello,
I am working on a plugin that places images in Figma and I was wondering if there is a method I missed in the documentation that can help place the images in the Figma canvas without overlapping content that is already there.
thanks
The only way is to loop through all objects’ coordinates on canvas and find a free space algorithmically.
Basically, what you need to do is check the coordinates and the width and height of the children of the PageNode
, and then calculate whether your object overlaps other objects on the canvas.
Links to relevant properties: