Mercurial > MadButterfly
comparison nodejs/testcase.js @ 743:dd1f3382d6a4
Create a persistent handle for coords and shapes correctly
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 25 Aug 2010 13:58:49 +0800 |
parents | 24038e7a365b |
children | 56a5e08cd8af |
comparison
equal
deleted
inserted
replaced
742:24038e7a365b | 743:dd1f3382d6a4 |
---|---|
45 /* test removing a coord */ | 45 /* test removing a coord */ |
46 var rm_coord = mb_rt.coord_new(root); | 46 var rm_coord = mb_rt.coord_new(root); |
47 var rm_rect = mb_rt.rect_new(150, 150, 50, 50, 10, 10); | 47 var rm_rect = mb_rt.rect_new(150, 150, 50, 50, 10, 10); |
48 paint.fill(rm_rect); | 48 paint.fill(rm_rect); |
49 rm_coord.add_shape(rm_rect); | 49 rm_coord.add_shape(rm_rect); |
50 setTimeout(function() { rm_coord.remove(); }, 3000); | 50 setTimeout(function() { |
51 rm_coord.remove(); | |
52 mb_rt.redraw_changed(); | |
53 mb_rt.flush(); | |
54 }, 3000); | |
51 | 55 |
52 /* Moving a path */ | 56 /* Moving a path */ |
53 sys.puts(mb_rt.path_new); | 57 sys.puts(mb_rt.path_new); |
54 var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 180,150 z"); | 58 var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 180,150 z"); |
55 sys.puts(path); | 59 sys.puts(path); |