Skip to main content
Question

Clone node inside section positioning wrong

  • November 29, 2022
  • 1 reply
  • 557 views

Lewis_Healey

I’m trying to clone a node and position it under the original node and it works fine until the node is inside a section. Do you have any guidance on how I can make sure the node position is relative to the parent?

Example code below

    // Clone the selected node so we can swap the tokens
    const clonedNode = selectedNode.clone();

    // Create Frame node to act as a skeleton
    const frame = figma.createFrame();
    frame.y = selectedNode.y + selectedNode.height + 40;
    frame.x = selectedNode.x;

1 reply

tank666
  • 4863 replies
  • November 29, 2022

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings