// }
// function linkover(d,i) {
// let x1 = d3.select(this).attr('x1')
// let x2 = d3.select(this).attr('x2')
// let y1 = d3.select(this).attr('y1')
// let y2 = d3.select(this).attr('y2')
// d3.select(this).attr('stroke-width',6)
// let msg = timeframe.edges[i].prob.toString()+'\n'
// +timeframe.edges[i].timestamp.toString()+'\n'
// +timeframe.edges[i].ground_truth.toString()
// svg.append('text')
// .classed('edge_msg',true)
// .attr('x', () => (x1+x2)/2)
// .attr('y', () => (y1+y2)/2)
// .attr('font-size',12)
// .text(() => msg)
// }
// function linkoff(d,i) {
// d3.select(this).attr('stroke-width',1)
// svg.selectAll('.edge_msg').remove()
// }
// let node = svg.append("g")
// .attr("stroke", "#fff")
// .attr("stroke-width", 1.5)
// .selectAll("circle");
// function ticked() {
// node.attr("cx", d => d.x)
// .attr("cy", d => d.y);
// link.attr("x1", d => d.source.x)
// .attr("y1", d => d.source.y)
// .attr("x2", d => d.target.x)
// .attr("y2", d => d.target.y);
// }
// invalidation.then(() => simulation.stop());
// return Object.assign(svg.node(), {
// update({nodes, links}) {
// const old = new Map(node.data().map(d => [d.id, d]));
// nodes = nodes.map(d => Object.assign(old.get(d.id) || {}, d));
// links = links.map(d => Object.assign({}, d));
// node = node
// .data(nodes, d => d.id)
// .join(enter => enter.append("circle")
// .attr("r", 5)
// .call(drag(simulation)))
// .on('mouseover',nodeover)
// .on('mouseout',nodeoff);
// link = link
// .data(links, d => [d.source, d.target])
// .join("line")
// .attr('stroke',d => edge_color_scale(d.timestamp))
// .on('mouseover',linkover)
// .on('mouseout',linkoff);
// simulation.nodes(nodes);
// simulation.force("link").links(links);
// simulation.alpha(1).restart().tick();
// ticked(); // render now!
// }
// });
// }