     # can only draw on custom relationships
     if @state.canDraw
       document.addEventListener 'mousemove', @drawCurve
+      document.addEventListener 'mouseup', @endDrawCurve
       @drawing = true
       if @state.newCustomData
         scaledCoords = @pointToScaledCoords(evt)

  endDrawCurve: (evt) ->
    if @drawing
      document.removeEventListener 'mousemove', @drawCurve
      @drawing = false
      #update relation with custom data
      @updateRelationCustomData(@state.currentData)

      (div
        className: drawClass
        onMouseDown: @startDrawCurve
        ref: "graphBody"
        ,
        if @state.newCustomData
