     constructor: (attributes) ->
       super
       @k = v for k,v of attributes
-      @updateSegments(attributes.segments) if attributes
   
     select: ->
       @drawing().select(@)
-  
-    updateSegments: (segments) =>
-      @segments = new SimplifiesSegments().for(segments)
   
     reconnectTo: (nodeId, offset) =>
       mover = new MovesPath(@toPath(), offset)
       mover.moveStart() if nodeId is @sourceId
       mover.moveEnd() if nodeId is @targetId
-      @updateSegments(mover.finalise())
+      @segments = mover.finalise()
       @save()
   
     paperId: =>

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

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

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

