comparison nodejs/testdesktop.js @ 849:d1c98eb474e1

Change the code to fit the change of the center of the transformation point.
author wycc
date Mon, 20 Sep 2010 21:49:23 +0800
parents dfe28355bded
children 881efcd8a18f 23dffb564ace
comparison
equal deleted inserted replaced
848:702e4874a58a 849:d1c98eb474e1
61 if (line == -1) { 61 if (line == -1) {
62 line = 0; 62 line = 0;
63 return; 63 return;
64 } 64 }
65 var target = lines[line]; 65 var target = lines[line];
66 var sy = target.y-20-lightbar.y; 66 var sy = target.y-lightbar.y;
67 sys.puts(sy); 67 sys.puts(sy);
68 var an = new animate.linear(app,lightbar,0,sy,0.3); 68 var an = new animate.linear(app,lightbar,0,sy,0.3);
69 an.start(); 69 an.start();
70 }); 70 });
71 app.addKeyListener(mbapp.KEY_DOWN, function() { 71 app.addKeyListener(mbapp.KEY_DOWN, function() {
74 if (line == lines.length) { 74 if (line == lines.length) {
75 line = line - 1; 75 line = line - 1;
76 return; 76 return;
77 } 77 }
78 var target = lines[line]; 78 var target = lines[line];
79 var sy = target.y-20-lightbar.y; 79 var sy = target.y-lightbar.y;
80 sys.puts("line="+line); 80 sys.puts("line="+line);
81 sys.puts("sy="+sy); 81 sys.puts("sy="+sy);
82 sys.puts("target.y="+target.y); 82 sys.puts("target.y="+target.y);
83 sys.puts("lightbar.y="+lightbar.y); 83 sys.puts("lightbar.y="+lightbar.y);
84 var an = new animate.linear(app,lightbar,0,sy,0.3); 84 var an = new animate.linear(app,lightbar,0,sy,0.3);