changeset 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 fbf26794c02d
children bf2794eed702
files nodejs/phone.js
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
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;
     });