src/app/main/e98cf432753a4295@791.js
// When an object dot is clicked
When an object dot is clicked
When an object dot is clicked
function objectClicked(event, p) {
    overlap.selectAll("*").remove();
    lines.append("g")
      .attr("stroke", "red")
      .attr("stroke-opacity", 0.6)
      .selectAll("links")
      .data(p.others.map((frag, index, array) => frag = {x: frag.x, y: frag.y, xNext: array[(index + 1) % array.length].x, yNext: array[(index + 1) % array.length].y}).flat())
      .join("line")
        .attr("x1", d => x(d.x))
        .attr("y1", d => y(d.y))
        .attr("x2", d => x(d.xNext))
        .attr("y2", d => y(d.yNext));
  }
function objectClicked ( event , p ) { overlap . selectAll ( "*" ) . remove ( ) ; lines . append ( "g" ) . attr ( "stroke" , "red" ) . attr ( "stroke-opacity" , 0.6 ) . selectAll ( "links" ) . data ( p . others . map ( ( frag , index , array ) => frag = { x : frag . x , y : frag . y , xNext : array [ ( index + 1 ) % array . length ] . x , yNext : array [ ( index + 1 ) % array . length ] . y } ) . flat ( ) ) . join ( "line" ) . attr ( "x1" , d => x ( d . x ) ) . attr ( "y1" , d => y ( d . y ) ) . attr ( "x2" , d => x ( d . xNext ) ) . attr ( "y2" , d => y ( d . yNext ) ) ; }
When an object dot is clicked
When an object dot is clicked