Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Commit

Permalink
Tuning the force layout for larger graphs
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
  • Loading branch information
flo-dup committed Oct 20, 2021
1 parent a604360 commit 7ee33d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/powsybl/nad/layout/ForcedLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public class ForcedLayout implements Layout {

@Override
public void run(Graph graph, LayoutParameters layoutParameters) {
ForceLayout<Node, Edge> forceLayout = new ForceLayout<>(graph.toJgrapht());
ForceLayout<Node, Edge> forceLayout = new ForceLayout<>(graph.toJgrapht())
.setMaxSpeed(1e3);
forceLayout.execute();

double[] dims = new double[4];
Expand Down

0 comments on commit 7ee33d2

Please sign in to comment.