Open jjwallace opened 2 months ago
This issue was solved with the below solution:
useEffect(() => {
fgRef?.current?.d3Force('charge').distanceMax(125)
fgRef?.current?.d3Force('charge').strength(-15)
fgRef?.current?.d3Force('link').distance(15)
fgRef?.current?.d3Force('collision', d3.forceCollide(node => 2.5*node.radius))
fgRef?.current?.d3Force('center', forceCenter(0));
fgRef?.current?.d3Force('collide', d3.forceCollide(1));
}, []);
Describe the bug I cannot modify d3Force parameters and have them visible in a simulation. when trying both methods below, there is no visible change in the force layout simulation.
To Reproduce One method is in the below useEffect, another is commented out below inside the ForceGraph3d Component.
Expected behavior Upon modification of charge, link, collision and collide; the simulation should change its properties however there is no visible changes that occur almost as if non of these parameters affect the simulation.
Screenshots
Desktop (please complete the following information):