     newNode.doubleSided = true
     @nodesSpheres.push(newNode)
     @trigger "newGeometries", [newNode]
-      
+
   getIndexFromTreeId : (treeId) ->
     unless treeId
       treeId = @route.getTree().treeId

      return

    index = @getIndexFromTreeId(@route.getTree().treeId)
    for i in [0...@curIndex]
      if @nodes[index].geometry.nodeIDs[i] == node.id
        nodesIndex = i
        break

    for i in [0..2]
      @nodes[index].geometry.__vertexArray[nodesIndex * 3 + i] =
        @nodes[index].geometry.__vertexArray[(@curIndex - 1) * 3 + i]

    # Delete Edge by finding it in the array
    # ASSUMPTION edges always go from smaller ID to bigger ID

            @edgesBuffer[index].set( neighbor.pos, (edgesIndex++) * 3 )
            @edgesBuffer[index].set(     node.pos, (edgesIndex++) * 3 )

      if edgesIndex != (2 * (@curIndex[index] - 1)) and !(@curIndex[index] == 0 and edgesIndex == 0)
        console.error("edgesIndex does not equal (2 * (@curIndex[index] - 1) !!!")

      @routes[index].geometry.__vertexArray = @edgesBuffer[index]
