           "M#{d.source.x},#{d.source.y-0.6}" +
           "A-#{d.arc_offset_a},-#{d.arc_offset_b} 0 " +
           "#{d.pos_offset_a},#{d.pos_offset_b} #{d.target.x-4},#{d.target.y}"
-      )
+
     force.on('tick', tick)
 
   drawGraph(nodes, edgesForMode(mode))

        d.pos_offset_b = 1 if (rand % 2) == 0

    tick = ->
      node.attr("transform", (d) ->
        if d.is_center
          d.x = width/2
          d.y = height/2
        "translate(#{d.x},#{d.y})")
      path.attr("d", (d) ->
        dx = d.target.x - d.source.x
        dy = d.target.y - d.source.y
        dr = Math.sqrt(dx*dx + dy*dy)*2

      addClass($(node[0][source_index]), 'highlight')
      addClass($(node[0][target_index]), 'highlight')
    )
    $('path').on('mouseleave', (e) -> removeClass('g.node', 'highlight'))

    node.append("circle").
      attr("r", (d) -> if d.is_center then 10 else 7)

    node.append("text").
      attr("x", 12).
      attr("dy", ".35em").
      text(nodeDisplayName)

    calc_offsets = (d) ->
      d.arc_offset_a = randomNumber(55, 15) if d.arc_offset_a == undefined
