Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 20: Line 20:
  this.const= false;
  this.const= false;
  this.adjustable= false;
  this.adjustable= false;
 +
this.history= new Array();
}
}
Line 113: Line 114:
  //controls
  //controls
  reshtmlparamdiv += '<button onclick="simbox_startclick(this,'+id+')" id="simbox_start_'+id+'">PLAY</button><button onclick="simbox_resetclick(this,'+id+')" id="simbox_reset_'+id+'">RESET</button>';
  reshtmlparamdiv += '<button onclick="simbox_startclick(this,'+id+')" id="simbox_start_'+id+'">PLAY</button><button onclick="simbox_resetclick(this,'+id+')" id="simbox_reset_'+id+'">RESET</button>';
-
 
  paramdiv.innerHTML= reshtmlparamdiv;
  paramdiv.innerHTML= reshtmlparamdiv;
-
 
-
 
  return true;
  return true;
Line 140: Line 138:
{
{
  //TODO STOP
  //TODO STOP
-
alert('ok');
 
  simulations[simid].running= false;
  simulations[simid].running= false;
  document.getElementById('simbox_start_'+simid).innerHTML= 'PLAY';
  document.getElementById('simbox_start_'+simid).innerHTML= 'PLAY';
 +
 +
//Reset quantities, clear curves
  for(var i= 0 ; i < simulations[simid].molecules.length ; ++i)
  for(var i= 0 ; i < simulations[simid].molecules.length ; ++i)
 +
{
   simulations[simid].molecules[i].quantity= simulations[simid].molecules[i].init_qtty;
   simulations[simid].molecules[i].quantity= simulations[simid].molecules[i].init_qtty;
 +
  simulations[simid].molecules[i].history.length= 0;
 +
}
}
}

Revision as of 21:45, 2 August 2013