Template:Team:Paris Saclay/simbox
From 2013.igem.org
(Difference between revisions)
Line 408: | Line 408: | ||
var step= Math.ceil((tend-tstart)/canv.width); | var step= Math.ceil((tend-tstart)/canv.width); | ||
- | + | canvas.beginPath(); | |
- | + | ||
for(var ti= tstart ; ti < tend ; ti += step) | for(var ti= tstart ; ti < tend ; ti += step) | ||
{ | { | ||
Line 417: | Line 416: | ||
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]) ); | ||
} | } | ||
+ | ctx.strokeStyle= sim.molecules[i].curve_color; | ||
ctx.stroke(); | ctx.stroke(); | ||
} | } |
Revision as of 01:41, 3 August 2013