diff nodejs/phone.js @ 791:85c5949352bb

Slide the dock of phone UI
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 31 Aug 2010 02:54:54 +0800
parents 9b2d803701e0
children bf2794eed702
line wrap: on
line diff
--- a/nodejs/phone.js	Tue Aug 31 02:47:22 2010 +0800
+++ b/nodejs/phone.js	Tue Aug 31 02:54:54 2010 +0800
@@ -51,10 +51,13 @@
 
 var sw = 0;
 dock.mouse_event.add_event_observer(4, function(evt) {
-	if(sw == 0)
-	    dockholder.shift(0, -300);
-	else
-	    dockholder.home();
+	if(sw == 0) {
+	    var an = new animate.linear(app, dock, 0, -300, 0.5);
+	    an.start();
+	} else {
+	    var an = new animate.linear(app, dock, 0, 0, 0.5);
+	    an.start();
+	}
 	sw = (sw + 1) % 2;
     });