Automatic resizing for a node shape with an icon in it

The representation of a user-defined node automatically computes the size of its shape according to the size of the icon.
Autoresizing can be controlled independently in the vertical and horizontal directions through the properties horizontalAutoResizeMode and verticalAutoResizeMode . These properties accept the values listed in the following table.
CSS Properties for Autoresizing of Nodes
Values
Behavior
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.
You can control how much space is left between the border of the shape and its content (icon) using the properties horizontalAutoResizeMargin and verticalAutoResizeMargin .