How do I set the initial size of a node? #1353
Answered
by
bcakmakoglu
CodyBontecou
asked this question in
Q&A
-
I'd like to set the initial view to have nodes in specific positions and sizes. Positions is clear enough, but I can't seem to find anything related to the size besides |
Beta Was this translation helpful? Give feedback.
Answered by
bcakmakoglu
Mar 19, 2024
Replies: 1 comment 3 replies
-
You can pass interface Node {
// ...
/**
* Fixed width of node, applied as style
* You can pass a number which will be used in pixel values (width: 300 -> width: 300px)
* or pass a string with units (width: `10rem` -> width: 10rem)
*/
width?: number | string | WidthFunc
/**
* Fixed height of node, applied as style
* You can pass a number which will be used in pixel values (height: 300 -> height: 300px)
* or pass a string with units (height: `10rem` -> height: 10rem)
*/
height?: number | string | HeightFunc |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
CodyBontecou
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can pass
width
andheight
to a node, which will be applied as a style.