Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 14: Line 14:
{
{
  this.name= undefined;
  this.name= undefined;
 +
this.init_qtty= 0;
  this.quantity= 0;
  this.quantity= 0;
  this.curve_show= false;
  this.curve_show= false;
Line 67: Line 68:
   simulations[id].molecules[i].name= molecule_tags[i].getAttribute('name');
   simulations[id].molecules[i].name= molecule_tags[i].getAttribute('name');
   if(molecule_tags[i].hasAttribute('quantity'))
   if(molecule_tags[i].hasAttribute('quantity'))
 +
  {
 +
  simulations[id].molecules[i].init_qtty= molecule_tags[i].getAttribute('quantity');
   simulations[id].molecules[i].quantity= molecule_tags[i].getAttribute('quantity');
   simulations[id].molecules[i].quantity= molecule_tags[i].getAttribute('quantity');
 +
  }
   if(molecule_tags[i].hasAttribute('curve_show'))
   if(molecule_tags[i].hasAttribute('curve_show'))
   simulations[id].molecules[i].curve_show= (molecule_tags[i].getAttribute('curve_show') == 'true');
   simulations[id].molecules[i].curve_show= (molecule_tags[i].getAttribute('curve_show') == 'true');
Line 107: Line 111:
  reshtmlparamdiv += '<br />';
  reshtmlparamdiv += '<br />';
  //controls
  //controls
-
  reshtmlparamdiv += '<button>START</button><button>RESET</button>'
+
  reshtmlparamdiv += '<button onclick="simbox_startclick(this,'+id+')">START</button><buttononclick="simbox_resetclick(this,'+id+')">RESET</button>'
  paramdiv.innerHTML= reshtmlparamdiv;
  paramdiv.innerHTML= reshtmlparamdiv;

Revision as of 21:26, 2 August 2013