comparison nodejs/testdesktop.js @ 856:88f4916a0691 abs_n_rel_center

Compute y position according center of lightbar and text
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 20 Sep 2010 22:43:43 +0800
parents c385493e04b6
children ea1e88c40548
comparison
equal deleted inserted replaced
855:c385493e04b6 856:88f4916a0691
75 if (line == lines.length) { 75 if (line == lines.length) {
76 line = line - 1; 76 line = line - 1;
77 return; 77 return;
78 } 78 }
79 var target = lines[line]; 79 var target = lines[line];
80 sys.puts(target); 80 var sy = target.center.y - lightbar.center.y;
81 var sy = target.cnter.y - 20 - lightbar.center.y;
82 sys.puts("line="+line); 81 sys.puts("line="+line);
83 sys.puts("sy="+sy); 82 sys.puts("sy="+sy);
84 sys.puts("target.y="+target.center.y); 83 sys.puts("target.y="+target.center.y);
85 sys.puts("lightbar.y="+lightbar.center.y); 84 sys.puts("lightbar.y="+lightbar.center.y);
86 var an = new animate.linear(app,lightbar,0,sy,0.3); 85 var an = new animate.linear(app,lightbar,0,sy,0.3);