   showLink: () ->
     @link.setMap($a.map)
 
-  # in order to remove an element you need to unpublish the events, hide the 
+  # in order to remove an element you need to unpublish the events, hide the
   # marker and set it to null
   removeLink: ->
     $a.broker.off('map:init')

    $a.broker.trigger("map:select_item:#{beginNode.cid}")
    $a.broker.trigger("map:select_item:#{endNode.cid}")

  # called from the context menu as well. It clears itself and its nodes as 
  # well as the higlighted tree items
  clearSelfandMyNodes: () ->
    @clearSelected()

  @SELECTED_LINK_COLOR: 'red'

  $a = window.sirius

  initialize: (@model, @network, @legs) ->
    @_createEncodedPath @legs
    @_saveEncodedPath()
