                     .attr("r", radius*3)
 
     nodeMouseUp: (n) ->
-        # we are dragging
         # to do: insert lines uniquely
         if !d3.select(n).empty() and !d3.select("#dragline").empty()
             dragline = d3.select("#dragline")

            targetNode = n
            if sourceNode != targetNode
                newLink = {source: sourceNode, target: targetNode, caption: "edited"}
                alchemy.edges.push(newLink)
                alchemy.edge = alchemy.edge.data(alchemy.edges)
                alchemy.drawing.drawedges(alchemy.edge)
            dragline.datum(null)
            return true
        else return false

        dragline = d3.select("#dragline")
        targetX = dragline.attr("x2")
        targetY = dragline.attr("y2")
        sourceNode = d

        targetNode = {id: alchemy.nodes.length, x: targetX, y: targetY, caption: "editedNode"}    
        newLink = {source: sourceNode, target: targetNode, caption: "edited"}

        # add to alchemy data and draw nodes / links
        alchemy.editor.update(targetNode, newLink)

    # reset dragline
    d3.select("#dragline")
