Reputation: 529
Working on figma plugin development, so I need to call a function ReorganizeFunc() when a frame node is moved from one position to another, only when dropped I want to call the function. But the below code does not work so, can you suggest whats the fix required
figma.on('selectionchange', () => {
const selectedNodes = figma.currentPage.selection;
selectedNodes.forEach(node => {
if (node.type === 'FRAME') {
console.log(`Selected frame is at position: (${node.x}, ${node.y})`);
ReorganizeFunc();
}
});
});
Upvotes: 0
Views: 24