changeset 1438:d19f47691d5e

Use cooord.set_text to update the text inside a component.
author wycc
date Mon, 11 Apr 2011 13:03:25 +0800
parents 7f4edd6e175e
children c028aa928cc8
files nodejs/component.js
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/nodejs/component.js	Mon Apr 11 13:00:54 2011 +0800
+++ b/nodejs/component.js	Mon Apr 11 13:03:25 2011 +0800
@@ -73,9 +73,13 @@
 }
 
 Component.prototype.toCoord=function() {
-   return this.coord; 
+    return this.realize();
 }
 
+Component.prototype.set_text=function(text) {
+	this.realize();
+	this.coord.set_text("asdsad");
+}
 
 function ComponentManager(app)
 {