FACT++  1.0
function onload (   load)

Definition at line 1 of file index.js.

References refresh_graphics(), refresh_text(), and var().

Referenced by onresize().

2 {
3  var W = window.innerWidth;
4  var H = window.innerHeight;
5 
6  document.getElementById("canvas").width = 1;
7  document.getElementById("canvas").height = 1;
8 
9  var tw = document.getElementById('table').offsetWidth;
10  var th = document.getElementById('table').offsetHeight;
11 
12  var margin = (W-tw)*2;
13 
14  var cw = tw;// - margin;
15  var ch = H - th - margin;
16 
17  document.getElementById("canvas").width = cw;
18  document.getElementById("canvas").height = ch;
19 
20  // ------ debug -----
21  document.getElementById('debug').innerHTML = "";
22  document.getElementById('debug').innerHTML += "|W="+W+"/"+H;
23  document.getElementById('debug').innerHTML += "|T="+tw+"/"+th;
24  document.getElementById('debug').innerHTML += "|C="+cw+"/"+ch;
25 
26  if (!load)
27  return;
28 
29  refresh_text();
31 }
po::typed_value< T > * var(T *ptr=0)
function refresh_text()
Definition: index.js:38
function refresh_graphics()
Definition: index.js:275

+ Here is the call graph for this function:

+ Here is the caller graph for this function: