In case this cannot be solved,
i’d like to know if there is another way for me to know if a node is a frame or a group.
the reason I need to differenciate them is because of the special behaviour of group where a group’s children’s coordinates aren’t substracted from their (group) parent’s position.
Any work-around that let me know this info reliably would be welcome.
Thanks
Hi,
any update on this ?
i’m still regularly observing this issue,
it’s a real problem, i can’t determine reliably the coordinates of my nodes because of that.
Best
ok, i think i finally understood what’s happening,
the api returns the wrong type (FRAME or NODE) only when the type is changed (manually in the Figma UI) and the plugin isn’t restarted. It’s like there is a cache that returns the same node.type as the first time.
it’s not as much a critical issue as i thought, but still a bit,
The scenario where this will be an issue is when a Figma user uses an HTML/CSS exporter (like the one i’m building) and switch some nodes from FRAME to GROUP (or the reverse) while using the plugin.
I hope this helps. Cheers
This is a documented edge case GroupNode | Plugin API
I see, thanks.
And is there no way to refresh that node to get updated information ?
(I assume not otherwise it would be mentioned in that doc but asking just in case)