You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the default example from the "Usage" section. Is it expected that the root node shows up in the top left corner and other nodes are cut off - see the image? I'm using the latest version.
If so, is there an option to center the root node and automatically zoom out to fit all nodes?
The text was updated successfully, but these errors were encountered:
@mgroma. To answer the first part of your question, there is a TreeProp called translate which translates the graph along the x/y axis by the specified amount of pixels. If you set up some code like the following, you can then set the prop value to treeContainerDimensions.width and .height/2 to ensure that it is always centred in all viewports. const dimensions = treeContainer.getBoundingClientRect(); setTreeContainerDimensions({ width: dimensions.width, height: dimensions.height, });
Regarding the second part on zooming out, sorry don't know enough about what is going on under the hood to answer this
I used the default example from the "Usage" section. Is it expected that the root node shows up in the top left corner and other nodes are cut off - see the image? I'm using the latest version.
If so, is there an option to center the root node and automatically zoom out to fit all nodes?
The text was updated successfully, but these errors were encountered: