       @ln.obj3d.userData = this
       @props = {
         name: "lnk",
-        capacity: 100
-        #latency: 0
+        capacity: 1000,
+        a_name: null,
+        a_sys: null,
+        b_name:null,
+        b_sys: null,
+        latency: null
       }
 
       #TODO if ln itself is clicked on this messes up selection logic 


  #addBaseElements adds the common base elements to the ElementBox
  addBaseElements: ->
    @addElement((box, x, y) -> new BaseElements.Controller(box, x, y, 5))
    @addElement((box, x, y) -> new BaseElements.Router(box, x, y, 5))
    @addElement((box, x, y) -> new BaseElements.Switch(box, x, y, 5))
    @addElement((box, x, y) ->

    console.log "Generating experiment json for " + @ve.surface.elements.length +
      " elements"

    data = {
      computers: [],
      routers: [],
      switches: [],
      lan_links: [],
      wan_links: []
    }

    linkAdd = (l) ->
      switch
        when l.isInternet then data.wan_links.push(l)
        else data.wan_links.push(l)

    add = (e) ->
      switch
        when e instanceof BaseElements.Computer then data.computers.push(e.props)
        when e instanceof BaseElements.Router then data.routers.push(e.props)
        when e instanceof BaseElements.Switch then data.switches.push(e.props)
        when e instanceof BaseElements.Link then linkAdd(e.props)
        else console.log('unkown element -- ', e)

    add(e) for e in @ve.surface.elements

    console.log(data)
    console.log(JSON.stringify(data, null, 2))

    data

  swapIn: ->
    @expJson()

