Circular Layout
This chapter describes the major API changes to the CircularLayout introduced with yFiles for HTML 3.0 and how to migrate from the older version.
As with all major layout algorithms, the CircularLayout no longer inherits from MultiStageLayout
,
but implements ILayoutAlgorithm directly.
The layout stages are now managed by a LayoutStageStack, which can be obtained via the
layoutStages property; see Layout Stages and Multi-Stage Layouts for more details.
Renamed, Moved, and Removed Classes and Members
The following table lists the renamed, moved, and removed classes and members of the major classes of the CircularLayout. In addition to the changes listed here, the expert API was streamlined by removing some protected methods of CircularLayout.
yFiles for HTML 2.6 | yFiles for HTML 3.0 | Remarks |
---|---|---|
SingleCycleLayout | ||
Changed Default Values and Behavior Changes
Node labels are now considered by default. To change this behavior, set the nodeLabelPlacement property to the desired value. It is now also easier to place the node labels with GenericLabeling by setting the value to GENERIC.
Edge labels are now considered by default. To change this behavior, set the edgeLabelPlacement property to the desired value. It is now also easier to place the edge labels with GenericLabeling by setting the value to GENERIC.
The default component arrangement style has been changed to PACKED_CIRCLE. The style can be specified via the ComponentLayout.style property. The ComponentLayout that is used by the CircularLayout is available via the componentLayout property.
Port placement now takes the specified port candidates into account. The ports are placed in a post-processing step by the PortPlacementStage. Port candidates can be specified via the properties on the sub-data CircularLayoutData.ports. See also the section Ports.
SingleCycleLayout
The class SingleCycleLayout
is no longer available as a standalone layout algorithm. To achieve the same style,
apply the CircularLayout and set partitioningPolicy to SINGLE_CYCLE instead.
Consequently, there is no property singleCycleLayout
on the CircularLayout class anymore.
It has been replaced by the new class PartitionDescriptor. This class offers the properties to configure
the single-cycle layout style that were previously available in the removed SingleCycleLayout
class.
Furthermore, the unit of property initialAngle has been changed from radians to degrees.