fx = d.x;
            // d.fy = d.y;
        }

        function dragged(d) {
            // d.fx = d3.event.x;
            // d.fy = d3.event.y;
        }

        function dragended(d) {
            // if (!d3.event.active) simulation.alphaTarget(0);
            //d.fx = null;
            //d.fy = null;
        }

        function releasenode(d) {
            d.fx = null;
            d.fy = null;
        }

        const linkedByIndex = {};
        graph.links.forEach(d => {
            linkedByIndex[`${d