Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 70: Line 70:
   if(molecule_tags[i].hasAttribute('adjustable'))
   if(molecule_tags[i].hasAttribute('adjustable'))
   molecules[i].adjustable= (molecule_tags[i].getAttribute('adjustable') == 'true');
   molecules[i].adjustable= (molecule_tags[i].getAttribute('adjustable') == 'true');
-
alert(molecules[i].curve_show);
 
  }
  }
Line 81: Line 80:
  sb.appendChild(canv);
  sb.appendChild(canv);
   
   
 +
//Init param box
 +
var paramdiv= document.createElement('div');
 +
sb.appendChild(paramdiv);
 +
//legend
 +
var reshtmlparamdiv= '';
 +
for(var i= 0 ; i < molecules.length ; ++i)
 +
{
 +
  if(molecules[i].curve_show)
 +
  reshtmlparamdiv += '<span style="color:'+molecules[i].curve_color+">'+molecules[i].name+'</span>&nbsp;';
 +
}
 +
paramdiv.innerHTML= reshtmlparamdiv;
 +
 +
  return true;
  return true;

Revision as of 19:59, 2 August 2013