const allNode = figma.root.findAll();
const target = figma.getNodeById(key);
let pageNode = target[0].parent;
if (pageNode.type == "SECTION") {
pageNode = pageNode.parent;
}
figma.currentPage = pageNode;
figma.viewport.scrollAndZoomIntoView(target);
This is my code.
I have object key and figma.getNodeById(key)
has return BaseNode.
So i want to change page and move screen to object location.
But scrollAndZoomIntoView()
function is can’t use with BaseNode.
How can i do?