simulation.alphaTarget(0); d.fx = null; d.fy = null; } // Resize handling (optional, keeps layout centered on resize) window.addEventListener("resize", () => { const w = window.innerWidth; const h = window.innerHeight; svg.attr("width", w).attr("height", h); simulation.force("center", d3.forceCenter(w / 2, h / 2)); simulation.alpha(0.5).restart(); }); phaTarget(0); d.fx = null; d.fy = null; } // Resize handling (optional, keeps layout centered on resize) window.addEventListener("resize", () => { const w = window.innerWidth; const h = window.innerHeight; svg.attr("width", w).attr("height", h); simulation.force("center", d3.forceCenter(w / 2, h / 2)); simulation.alpha(0.5).restart(); }); haTarget(0); d.fx = null; d.fy = null; } // Resize handling (optional, keeps layout centered on resize) window.addEventListener("resize", () => { const w = window.innerWidth; const h = window.innerHeight; svg.attr("width", w).attr("height", h); simulation.force("center", d3.forceCenter(w / 2, h / 2)); simulation.alpha(0.5).restart(); });