documentationfor yFiles for HTML 2.6

SplitEdgeStage

This layout stage replaces edges by a path of split-edges with a specified length before it calls a core layout algorithm.

Inheritance Hierarchy
SplitEdgeStage
Implemented Interfaces

Remarks

Concept

Each edge segment (or only segments that belong to a particular subset of edges) in the input graph will be split up into several segments such that all segments have a maximum length defined by the specified split segment length. If an edge segment is already shorter than the split segment length, then it will not be split up.

At each split location, a dummy node (the so-called split-node) will be inserted. Split-nodes inserted for the same original edge and the actual source and target node of the original edge will be connected by so called split-edges. In consequence, the original source and target node are not connected by a single edge but by a path consisting of split-edges. Furthermore, all edges are simple straight lines.

After this replacement step, the core layout algorithm will be invoked.

When the core layout algorithm has finished, the split-nodes will be removed from the graph and the original edge will be restored. The coordinates of the bends will be the center-coordinates of the corresponding split-node.

Features

The IDataProvider registered with key splitNodesDpKey can be used by the core layout algorithm to determine whether or not a certain node is a split-node that was created by this stage. This information may be useful when providing a custom core layout algorithm which should handle split-nodes in a different way than normal nodes. If no IDataProvider is registered with this key, this information is dropped.

By registering a IDataProvider with key affectedEdgesDpKey, the subset of edges that should be split by this layout stage can be specified. If no IDataProvider with this key is registered, all edges of the input graph will be split by the layout stage.

The amount of split-nodes replacing a single original edge can be controlled via the split segment length. The smaller the value, the more split-nodes this stage will insert.

Default Values of Properties

affectedEdgesDpKeyAFFECTED_EDGES_DP_KEY
splitNodesDpKeyAFFECTED_NODES_DP_KEY
splitNodeSize1.0
splitSegmentLength100

Type Details

yfiles module
layout-organic
yfiles-umd modules
layout-multipage, layout-organic, layout
Legacy UMD name
yfiles.organic.SplitEdgeStage
This stage can be useful if bends should be kept, even when using a layout algorithm which generally only draws straight-line edges. Simply specify the straight-line algorithm as core layout algorithm and execute this stage.

Constructors

Properties

Methods