Please check if the PR fulfills these requirements(please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)
[X] The commit message follows our guidelines
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
What kind of change does this PR introduce?(Bug fix, feature, docs update, ...)
Feature.
What is the current behavior?(You can also link to an open issue here)
Diagrams usually contain overlaps or near-overlaps. See the example:
What is the new behavior (if this is a feature change)?
An additional force that separates the centers of the edges applying Coulomb's law is added. By default it is disabled. It can be configured using:
new NetworkAreaDiagram(network).draw("output.svg",
new SvgParams(),
new LayoutParameters().setSpringRepulsionFactorForceLayout(0.2));
The expected result on the same network is:
The spring repulsion factor is combined with the repulsion parameter used to separate nodes in the graph. The repulsion force between springs is computed between the centers of the springs (the edges of the graph) and applied to its end nodes. The centers of the springs are also repelled from the other nodes in the graph.
Signed-off-by: Luma zamarrenolm@aia.es
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Feature.
What is the current behavior? (You can also link to an open issue here) Diagrams usually contain overlaps or near-overlaps. See the example:
What is the new behavior (if this is a feature change)? An additional force that separates the centers of the edges applying Coulomb's law is added. By default it is disabled. It can be configured using:
The expected result on the same network is:
The spring repulsion factor is combined with the
repulsion
parameter used to separate nodes in the graph. The repulsion force between springs is computed between the centers of the springs (the edges of the graph) and applied to its end nodes. The centers of the springs are also repelled from the other nodes in the graph.