I set my node width to 'label' which automatically sizes the node based on the text in the label. Though now I would like to set my node height to be equal to node width so my shape doesn't look all squish. How do I do that?
Asked
Active
Viewed 157 times
1 Answers
0
Options:
(1) Calculate the text size yourself and set the node width and height using mappers based on the text width. You can calculate the text size by creating a div with the same text and style.
(2) After init, get the width of each node as automatically set. For each node: Either override the style for height with the element's width or set a data field that maps to height.

maxkfranz
- 11,896
- 1
- 27
- 36