Mercurial > MadButterfly
comparison nodejs/phone.js @ 800:76470d692bb9
Rotate an icon when it is pressed
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Tue, 31 Aug 2010 14:55:25 +0800 |
parents | 891bbaca1d8f |
children | 586e50f82c1f |
comparison
equal
deleted
inserted
replaced
799:ba6bb69ee419 | 800:76470d692bb9 |
---|---|
39 icon.mouse_event.add_event_observer(2, function(evt) { | 39 icon.mouse_event.add_event_observer(2, function(evt) { |
40 overholder.home(); | 40 overholder.home(); |
41 }); | 41 }); |
42 icon.mouse_event.add_event_observer(4, function(evt) { | 42 icon.mouse_event.add_event_observer(4, function(evt) { |
43 pressholder.go_center(evt.cur_tgt); | 43 pressholder.go_center(evt.cur_tgt); |
44 var rotate = new animate.rotate(app, evt.cur_tgt, 2 * 3.1415, 0.7); | |
45 rotate.start(); | |
44 }); | 46 }); |
45 } | 47 } |
46 | 48 |
47 var sw = 0; | 49 var sw = 0; |
48 var dock_up = new animate.linear(app, dock, 0, -300, 0.5); | 50 var dock_up = new animate.linear(app, dock, 0, -300, 0.5); |