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;