comparison nodejs/testcase.js @ 676:f264b50c469c

Bind subject of mouse_event to JS object of coord
author Thinker K.F. Li <thinker@branda.to>
date Fri, 06 Aug 2010 13:33:47 +0800
parents c9f8c7e6f57e
children 799c852b9065
comparison
equal deleted inserted replaced
675:c643af2095c5 676:f264b50c469c
49 var deg = (i++) * 0.1; 49 var deg = (i++) * 0.1;
50 coord[2] = (i % 20) * 10; 50 coord[2] = (i % 20) * 10;
51 mb_rt.redraw_changed(); 51 mb_rt.redraw_changed();
52 }, 20); 52 }, 20);
53 setTimeout(function() { sys.puts("timeout"); }, 1000); 53 setTimeout(function() { sys.puts("timeout"); }, 1000);
54
55 sys.puts(root.subject);
56 var observer;
57 /* Mouse button pressed */
58 observer = root.subject.add_event_observer(4, function() {
59 sys.puts("mouse");
60 });