diff nodejs/animate.js @ 856:88f4916a0691 abs_n_rel_center

Compute y position according center of lightbar and text
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 20 Sep 2010 22:43:43 +0800
parents eff2f580b536
children ea1e88c40548
line wrap: on
line diff
--- a/nodejs/animate.js	Mon Sep 20 22:43:43 2010 +0800
+++ b/nodejs/animate.js	Mon Sep 20 22:43:43 2010 +0800
@@ -66,6 +66,9 @@
     var obj = this._obj;
     var self = this;
     
+    if(obj.timer)
+	obj.timer.stop();
+
     this._start_mtx = [obj[0], obj[1], obj[2], obj[3], obj[4], obj[5]];
     this._start_tm = Date.now();
     obj.timer = setInterval(function() { self.draw(); }, frame_interval);