Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 12: Line 12:
{
{
  var xmlfile= "https://2013.igem.org/Team:Paris_Saclay/"+sb.getAttribute('data-load')+"?action=raw&ctype=text/css";
  var xmlfile= "https://2013.igem.org/Team:Paris_Saclay/"+sb.getAttribute('data-load')+"?action=raw&ctype=text/css";
 +
var width= sb.getAttribute('data-width');
 +
var height= sb.getAttribute('data-height');
  var canv= document.createElement('canvas');
  var canv= document.createElement('canvas');
-
 
+
var ctx= canv.getContext("2d");
  canv.id= "simbox_canv"+id;
  canv.id= "simbox_canv"+id;
-
  canv.width= sb.getAttribute('data-width');
+
  canv.width= width;
-
  canv.height= sb.getAttribute('data-height');
+
  canv.height= height;
 +
sb.appendChild(canv);
 +
 
-
sb.appendChild(canvas);
 
}
}

Revision as of 18:24, 2 August 2013