           d3.selectAll("#graph line[data-child='#{graphUI.dragged}']").remove()
           # Did we drop it in the trash?
           if intrash(".node[data-id=#{graphUI.dragged}]")
-            console.log "AGH"
             deleteAll = (id)->
               node = graph.node(id)
               if node.children.length > 0


    # Stop dragging
    $(document).on "mouseup", (e) ->
      console.log "Mouseup!"
      # Remove handler
      $(document).off "mousemove.drag"
      $(".node[data-id=#{graphUI.dragged}]").attr 'contenteditable', 'true'

      # Threshold
      threshold = 25 #px
      dist = Math.sqrt((x-startx)*(x-startx) + (y-starty)*(y-starty))
      if dist < threshold and not dragstart
        return
      else
        dragstart = true
