plugin-samples icon indicating copy to clipboard operation
plugin-samples copied to clipboard

skipInvisibleInstanceChildren Not working

Open thanhnd45 opened this issue 3 years ago • 0 comments

I am developing a plugin for myself, I want to find all TextNodes and ignore nodes that are hidden. Do I use figma.skipInvisibleInstanceChildren = true; but the result, I get in the function fillAll() still contains the hidden node (its parent is hidden)

My code:

figma.skipInvisibleInstanceChildren = true; figma.showUI(__html__);

function getAllText(){ let listNodeSelected = figma.currentPage.selection let listTextNode = [] for (const node of listNodeSelected){ let textNodes = node.findAll((node) => node.type === "TEXT"); listTextNode = listTextNode.concat(textNodes) } }

image

image

How to implement skipInvisibleInstanceChildren?

thanhnd45 avatar Feb 03 '23 08:02 thanhnd45