Specifies discrete positions for placing edge labels with the GenericLabeling algorithm.
Remarks
This enumeration defines various label positions along an edge in a graph, allowing for precise control over the placement of labels relative to the edge's path. The positions can be combined using a bitwise OR operation to specify multiple valid locations for label placement.
Type Details
- yFiles module
- algorithms
See Also
Constants
Position mask that constrains the allowed positions to the CENTER of the edge's path.
Position mask that constrains the allowed positions to a set of six positions beside the edge path.
Remarks
Two of the positions are near the source and two others are near the target. The remaining positions are in the middle of the edge.
See Also
DiscreteEdgeLabelPositions.SOURCE_HEAD,
DiscreteEdgeLabelPositions.SOURCE_TAIL,
DiscreteEdgeLabelPositions.HEAD,
DiscreteEdgeLabelPositions.TAIL,
DiscreteEdgeLabelPositions.TARGET_HEAD,
DiscreteEdgeLabelPositions.TARGET_TAIL
Sample Graphs
Position mask that constrains the allowed positions to a set of three positions directly on the edge's path.
Position mask that constrains the allowed positions to the two locations near the middle of the edge beside the edge's path.
Static Methods
Converts the given argument to an enum constant of this enum type.
Remarks
Most notably, this method can convert an enum constant's name into the enum constant itself.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - DiscreteEdgeLabelPositions
- The value to convert to an enum constant.
Returns
- ↪DiscreteEdgeLabelPositions
- The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - DiscreteEdgeLabelPositions
- The numeric value of an enum constant.
Returns
- ↪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.