I’m almost certain I read about this somewhere a long time ago, but couldn’t find it where. As I can see the RootNode has a fixed width and height of 50000x50000pt. My questions are:
- Is there a way to programatically obtain these values e.g.
RootNode.bounds.width
?
- Are these values same (50000pt) on Windows as they are on macOS?
1 Like
The RootNode is infinite, but its corresponding canvas in the XD GUI is limited to 50,000 by 50,0000 on both Mac and Windows. I cannot think of a way to get that value programmatically. You can get that number from the XD GUI by taking advantage of the fact that it will not let you move nodes outside of those bounds. To do so create an artboard and resize it to 100x100. Then set its X and Y values in the Property Inspector to huge numbers like 999,999. XD will reset those positions to 24,900. So the canvas max width/height is (24,900 + 100) x 2 = 50,000. The plugin APIs will let you position a node outside of those boundaries, though that is not recommended.
1 Like
Thanks for the response @DavidXD, I was afraid that was the case, but just wanted to double-check. Since there isn’t a way to obtain these values with plugin APIs (in case they got changed in the future), for now I will just hardcode them.
1 Like