 #The BaseElements object holds classes which are Visual representations of the
 #objects that comprise a Cypress networked CPS system
 BaseElements = {
+
+  updateId: (e) ->
+    e.id.name = e.props.name
+    e.id.sys = e.props.sys
+
+  currentId: (d) ->
+    {name: d.props.name, sys: d.props.sys, design: dsg }
  
   #The Computer class is a representation of a computer
   Computer: class Computer

    for k, v of @cprops
      @datgui.add(@cprops, k)

    $(@datgui.domElement).focusout () =>
      for k, v of @cprops
        for e in @elements
          e.props[k] = v
      @ve.addie.update(@elements)
      true

    true

  hide: () ->
    if @datgui?
      @datgui.destroy()
      @elements = []
      @cprops = {}

    @mh.ve.container.onmousemove = (eve) => @handleMove(eve)
  
  handleUp: (ixs) ->
    @mh.updateMouse(event)
    @end.copy(@mh.pos)
    if @mh.placingObject.shp?
      @mh.placingObject.props.position = @mh.placingObject.shp.obj3d.position
      if @start.distanceTo(@end) > 0
        @mh.ve.addie.update([@mh.placingObject])

    @mh.ve.container.onmousemove = null
    @mh.ve.container.onmousedown = (eve) => @mh.baseDown(eve)
