|
@ -21,7 +21,7 @@ class ForceAtlas2BasedRepulsionSolver extends BarnesHutSolver { |
|
|
dx = distance; |
|
|
dx = distance; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.overlapAvoidanceFactor < 1) { |
|
|
|
|
|
|
|
|
if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { |
|
|
distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius); |
|
|
distance = Math.max(0.1 + (this.overlapAvoidanceFactor * node.shape.radius), distance - node.shape.radius); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -37,4 +37,4 @@ class ForceAtlas2BasedRepulsionSolver extends BarnesHutSolver { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export default ForceAtlas2BasedRepulsionSolver; |
|
|
|
|
|
|
|
|
export default ForceAtlas2BasedRepulsionSolver; |