Template:Team:Paris Saclay/simbox
From 2013.igem.org
(Difference between revisions)
Line 30: | Line 30: | ||
sb.style.width=width+"px"; | sb.style.width=width+"px"; | ||
sb.style.height=height+"px"; | sb.style.height=height+"px"; | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
//Open XML data file | //Open XML data file | ||
Line 83: | Line 71: | ||
molecules[i].adjustable= (molecule_tags[i].getAttribute('adjustable') == 'true'); | molecules[i].adjustable= (molecule_tags[i].getAttribute('adjustable') == 'true'); | ||
} | } | ||
- | + | ||
+ | //Init param box | ||
+ | var paramdiv= document.createElement('div'); | ||
+ | sb.appendChild(paramdiv); | ||
+ | //Load list | ||
for(var i= 0 ; i < molecules.length ; ++i) | for(var i= 0 ; i < molecules.length ; ++i) | ||
{ | { | ||
- | + | if(molecules[i].curve_show) | |
+ | { | ||
+ | sb.innerHTML += '<span style='color:molecules[i].curve_color>'+molecules[i].name+'</span> '; | ||
+ | } | ||
} | } | ||
+ | |||
+ | |||
+ | //Create canvas | ||
+ | var canv= document.createElement('canvas'); | ||
+ | var ctx= canv.getContext("2d"); | ||
+ | canv.id= "simbox_canv"+id; | ||
+ | canv.width= width; | ||
+ | canv.height= height; | ||
+ | sb.appendChild(canv); | ||
return true; | return true; |
Revision as of 19:53, 2 August 2013