Provides constants for shapes that LabelStyle can wrap text into.
Remarks
The shape is fitted inside the label layout and text is wrapped to stay inside the shape. If a padding is set, this padding is kept between the shape and the text.
The resize behavior of the shapes (except for LABEL_SHAPE) to the label layout equal that of the corresponding ShapeNodeShape with the same name for node layouts used by ShapeNodeStyle. This allows using the constants in conjunction with labels on top of nodes rendered with ShapeNodeStyle covering the whole node layout. This is typically achieved using CENTER.
See Also
Developer's Guide
API
- textWrappingShape
Members
No filters for this type
Constants
The diamond uses the centers of the label layout sides.
static
An ellipse with the label layout as bounds.
static
The hexagon uses the centers of the left and right sides of the label layout connected to the middle sections of its top and bottom side.
static
The hexagon uses the centers of the top and bottom sides of the label layout connected to the middle sections of its left and right side.
static
The LabelShape set as shape.
The LabelShape set as shape.
The shape the text is wrapped in matches the LabelShape used for the label background.
static
See Also
Developer's Guide
The octagon uses the middle sections of the label layout sides connected by diagonal lines.
static
The octagon uses the middle sections of the label layout sides connected by diagonal lines.
static
The diamond uses the centers of the label layout sides.
static
The stadium consists of two semi-circles connected by straight lines at the larger sides of label layout. So if the label's width is larger than its height, the semi-circles are at the label's left and right side, if the label's height is larger than its width, the semi-circles are at the label's top and bottom side, and if the width and height are equal, the stadium shape is reduced to a circle.
static
The rectangle uses the label layout but has round corners with a fixed radius.
static
The triangle uses the lower left and lower right corners of the label layout as well as the center of its upper side.
static
The triangle uses the upper left and upper right corners of the label layout as well as the center of its lower side.
static
The triangle uses the upper and lower right corners of the label layout as well as the center of its left side.
static
The triangle uses the upper and lower left corners of the label layout as well as the center of its right side.
static
Static Methods
Converts the given argument to an enum constant of this enum type.
Converts the given argument to an enum constant of this enum type.
Most notably, this method can convert an enum constant's name into the enum constant itself.
static
Parameters
- value: TextWrappingShape
- The value to convert to an enum constant.
Return Value
- TextWrappingShape
- The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
Returns the name of the given enum constant.
static
Parameters
- value: TextWrappingShape
- The numeric value of an enum constant.
Return Value
- string
- The name of the enum constant.
Throws
- Exception ({ name: 'Error' })
- If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.