       
     toPath: =>
       s = LinkShape.find(@shape)
-      path = s.draw(@toSegments())
+      path = s.draw(@segments)
       path.name = @paperId()
       path
 

        sourceId: destroyed.sourceId
        targetId: destroyed.targetId
        segments: destroyed.segments
        shape: destroyed.shape

    toSegments: =>
      for s in @segments
        new paper.Segment(s.point, s.handleIn, s.handleOut)

define [
  'spine'
  'models/moves_path'
  'models/link_shape'
  'spine.relation'
], (Spine, MovesPath, LinkShape) ->

  class Link extends Spine.Model
    @configure "Link", "sourceId", "targetId", "segments", "shape"
