Skip to main content
Question

Placing content in Figma without overlapping content that is already there

  • January 21, 2023
  • 2 replies
  • 545 views

neicore

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 🙂

This topic has been closed for replies.

2 replies

Gleb
  • Power Member
  • January 21, 2023

The only way is to loop through all objects’ coordinates on canvas and find a free space algorithmically.


tank666
  • January 21, 2023

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: