Created
September 14, 2019 16:30
-
-
Save thomas-lowry/4d2d890ae5dfd4ab4eccebc4da99d52d to your computer and use it in GitHub Desktop.
Find the page of a node in Figma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPage(node) { | |
let item = node; | |
while (item.type != 'PAGE') { | |
item = item.parent; | |
console.log(item); | |
} | |
return item; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment