(distance, connected)
| 47 | var repulsionStrength = 1500; |
| 48 | |
| 49 | function forceSize(distance, connected) { |
| 50 | let repulse = -repulsionStrength / (distance * distance); |
| 51 | let spring = 0; |
| 52 | if (connected) { |
| 53 | spring = (distance - springLength) * springStrength; |
| 54 | } |
| 55 | return spring + repulse; |
| 56 | } |
| 57 | |
| 58 | function forceDirected_simple(layout, graph) { |
| 59 | for (let a = 0; a < graph.size; a++) { |
no outgoing calls
no test coverage detected