diff nodejs/testcase.js @ 742:24038e7a365b

Reorder instructions to invalidate coords correctly
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 25 Aug 2010 11:58:30 +0800
parents 5ac257be7bc0
children dd1f3382d6a4
line wrap: on
line diff
--- a/nodejs/testcase.js	Wed Aug 25 10:40:30 2010 +0800
+++ b/nodejs/testcase.js	Wed Aug 25 11:58:30 2010 +0800
@@ -42,6 +42,13 @@
 paint.fill(rect);
 root.add_shape(rect);
 
+/* test removing a coord */
+var rm_coord = mb_rt.coord_new(root);
+var rm_rect = mb_rt.rect_new(150, 150, 50, 50, 10, 10);
+paint.fill(rm_rect);
+rm_coord.add_shape(rm_rect);
+setTimeout(function() { rm_coord.remove(); }, 3000);
+
 /* Moving a path */
 sys.puts(mb_rt.path_new);
 var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 180,150 z");