If you have multiple self-links at a node,
they are bundled like multilinks. The bends of the self-links are
shifted to avoid self-links overlapping each other. The
multiself-links can be distributed in relation to the attachment
position in various ways. The specified attachment position refers
to the middle of the bundle, or it refers to the outermost link of
the bundle, or it refers to the innermost link of the bundle. This
is illustrated by the following figures. The attachment position is
the same in all three cases and is indicated by the two small
crosses (X), but the multiself-link distribution is variously
centered, toward the inside of the bundle, or toward the outside of
the bundle.
Multiself-link distribution | Figures showing the distribution |
---|---|
Centered | ![]() |
Toward the inside of the multiself-link bundle | ![]() |
Toward the outside of the multiself-link bundle | ![]() |
Multiself-link distribution
In CSS
Add to the GraphLayout section:
multiSelfLinkDistribution: “INNER”;
In Java
Use the method:
setMultiSelfLinkDistribution(int distribution);
The valid values for distribution
are given with the example of Uniform Length Edges layout:
- IlvUniformLengthEdgesLayout.CENTERED
- IlvUniformLengthEdgesLayout.INNER
- IlvUniformLengthEdgesLayout.OUTER
The offset between the bends of the
self-links can be specified. These parameters have the same meaning
as the corresponding parameters on general multilinks, but apply
only to self-links that are multilink bundles.
In CSS
Add to the GraphLayout section:
multiSelfLinkOffset: "10"; multiSelfLinkMaxSpread: "60";
In Java
Use the methods:
setMultiSelfLinkOffset(float offset); setMultiSelfLinkMaxSpread(float maxSpread);
The multiself-link offset is the offset between two neighboring
self-links (or their bends). The value of maxSpread
limits this offset to avoid having too much space used when you
have too many multiple self-links. If the multiself-link offset
is 10 and the value of maxSpread is
60, the effective offset is 10 if you have less than six
multiself-links. If you have more multiself-links, the effective
offset is reduced. For example, if you have 15 multiself-links,
the effective offset will be 4 instead of 10 to ensure that the
self-links are shifted at most 60 units apart from each other. If
the self-link mode is one of the narrow modes, for example, NARROW_CONNECTED_RECTANGULAR, the
effective offset is further limited by the size of the bounding
box of the node where the self-links occur.