Automatic resizing

The general node can automatically compute the size of its shape according to the size of the labels and the icon.
You can control autoresizing in the vertical and horizontal directions independently through the properties horizontalAutoResizeMode and verticalAutoResizeMode . These properties accept the following values:
NO_AUTO_RESIZE
Autoresize is disabled.
EXPAND_ONLY
The node is allowed to grow in the specified direction, but not to shrink.
SHRINK_ONLY
The node is allowed to shrink in the specified direction, but not to grow.
EXPAND_OR_SHRINK
The node is allowed to expand or to shrink as needed.
If horizontal autoresizing and word wrapping are used at the same time, the general node cannot use the size of the label to compute the shape’s width because word wrapping uses the shape’s width to cut lines. In this case, the label will be word wrapped such that its bounding box is approximately square.
You can control how much space will be left between the border of the shape and its contents (label and icon) using the properties horizontalAutoResizeMargin and verticalAutoResizeMargin .