Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 400: Line 400:
   var tstart= Math.floor(sim.draw_min_t/sim.timestep);
   var tstart= Math.floor(sim.draw_min_t/sim.timestep);
   var tend= Math.ceil(sim.draw_max_t/sim.timestep);
   var tend= Math.ceil(sim.draw_max_t/sim.timestep);
 +
  if(tstart > sim.molecules.length)
 +
    tstart= sim.molecules.length;
   if(tend > sim.molecules.length)
   if(tend > sim.molecules.length)
     tend= sim.molecules.length;
     tend= sim.molecules.length;
Line 409: Line 411:
     else
     else
     ctx.moveTo( simbox_drawXcoord(simid, ti*sim.timestep), simbox_drawYcoord(simid, dta[ti]) );
     ctx.moveTo( simbox_drawXcoord(simid, ti*sim.timestep), simbox_drawYcoord(simid, dta[ti]) );
-
    alert(simbox_drawXcoord(simid, ti*sim.timestep));
 
   }
   }

Revision as of 01:20, 3 August 2013