Mercurial > MadButterfly
changeset 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 | ba6bb69ee419 |
children | f84ccf1f59ae |
files | nodejs/phone.js nodejs/phone_ui.svg |
diffstat | 2 files changed, 116 insertions(+), 109 deletions(-) [+] |
line wrap: on
line diff
--- a/nodejs/phone.js Tue Aug 31 14:54:47 2010 +0800 +++ b/nodejs/phone.js Tue Aug 31 14:55:25 2010 +0800 @@ -41,6 +41,8 @@ }); icon.mouse_event.add_event_observer(4, function(evt) { pressholder.go_center(evt.cur_tgt); + var rotate = new animate.rotate(app, evt.cur_tgt, 2 * 3.1415, 0.7); + rotate.start(); }); }
--- a/nodejs/phone_ui.svg Tue Aug 31 14:54:47 2010 +0800 +++ b/nodejs/phone_ui.svg Tue Aug 31 14:55:25 2010 +0800 @@ -26,7 +26,7 @@ inkscape:pageshadow="2" inkscape:zoom="0.90416667" inkscape:cx="312.60279" - inkscape:cy="61.259335" + inkscape:cy="186.36119" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -51,17 +51,20 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(0,-572.3622)"> + inkscape:bbox-x="-1.1059908" + inkscape:bbox-y="-860.32248" + inkscape:bbox-width="415.19362" + inkscape:bbox-height="773.49026"> <rect mbname="icon00" style="fill:#ffe8e8;fill-opacity:1;stroke:#800000;stroke-width:2.07682943;stroke-miterlimit:4;stroke-dasharray:none" id="rect3599" width="56.328701" height="44.162804" - x="30.536106" - y="631.01813" - inkscape:bbox-x="29.497691" - inkscape:bbox-y="376.14285" + x="31.642097" + y="60.326893" + inkscape:bbox-x="30.603683" + inkscape:bbox-y="374.47189" inkscape:bbox-width="58.40553" inkscape:bbox-height="46.239633" rx="11.071856" @@ -80,10 +83,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="314.31491" - inkscape:bbox-x="29.497691" - y="692.84607" - x="30.536106" + inkscape:bbox-y="312.64394" + inkscape:bbox-x="30.603683" + y="122.15484" + x="31.642097" height="44.162804" width="56.328701" id="use3685" @@ -96,10 +99,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="252.48703" - inkscape:bbox-x="29.497691" - y="754.67395" - x="30.536106" + inkscape:bbox-y="250.81607" + inkscape:bbox-x="30.603683" + y="183.98271" + x="31.642097" height="44.162804" width="56.328701" id="use3687" @@ -112,10 +115,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="190.65909" - inkscape:bbox-x="29.497691" - y="816.50189" - x="30.536106" + inkscape:bbox-y="188.98813" + inkscape:bbox-x="30.603683" + y="245.81065" + x="31.642097" height="44.162804" width="56.328701" id="use3689" @@ -128,10 +131,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="128.83115" - inkscape:bbox-x="29.497691" - y="878.32983" - x="30.536106" + inkscape:bbox-y="127.16017" + inkscape:bbox-x="30.603683" + y="307.63861" + x="31.642097" height="44.162804" width="56.328701" id="use3691" @@ -144,10 +147,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="376.14285" - inkscape:bbox-x="97.092132" - y="631.01813" - x="98.130547" + inkscape:bbox-y="374.47189" + inkscape:bbox-x="98.198119" + y="60.326893" + x="99.236534" height="44.162804" width="56.328701" id="use3693" @@ -160,10 +163,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="314.31491" - inkscape:bbox-x="97.092132" - y="692.84607" - x="98.130547" + inkscape:bbox-y="312.64394" + inkscape:bbox-x="98.198119" + y="122.15484" + x="99.236534" height="44.162804" width="56.328701" id="use3695" @@ -176,10 +179,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="252.48703" - inkscape:bbox-x="97.092132" - y="754.67395" - x="98.130547" + inkscape:bbox-y="250.81607" + inkscape:bbox-x="98.198119" + y="183.98271" + x="99.236534" height="44.162804" width="56.328701" id="use3697" @@ -192,10 +195,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="190.65909" - inkscape:bbox-x="97.092132" - y="816.50189" - x="98.130547" + inkscape:bbox-y="188.98813" + inkscape:bbox-x="98.198119" + y="245.81065" + x="99.236534" height="44.162804" width="56.328701" id="use3699" @@ -208,10 +211,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="128.83115" - inkscape:bbox-x="97.092132" - y="878.32983" - x="98.130547" + inkscape:bbox-y="127.16017" + inkscape:bbox-x="98.198119" + y="307.63861" + x="99.236534" height="44.162804" width="56.328701" id="use3701" @@ -224,10 +227,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="376.14285" - inkscape:bbox-x="164.68658" - y="631.01813" - x="165.72499" + inkscape:bbox-y="374.47189" + inkscape:bbox-x="165.79256" + y="60.326893" + x="166.83098" height="44.162804" width="56.328701" id="use3703" @@ -240,10 +243,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="314.31491" - inkscape:bbox-x="164.68658" - y="692.84607" - x="165.72499" + inkscape:bbox-y="312.64394" + inkscape:bbox-x="165.79256" + y="122.15484" + x="166.83098" height="44.162804" width="56.328701" id="use3705" @@ -256,10 +259,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="252.48703" - inkscape:bbox-x="164.68658" - y="754.67395" - x="165.72499" + inkscape:bbox-y="250.81607" + inkscape:bbox-x="165.79256" + y="183.98271" + x="166.83098" height="44.162804" width="56.328701" id="use3707" @@ -272,10 +275,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="190.65909" - inkscape:bbox-x="164.68658" - y="816.50189" - x="165.72499" + inkscape:bbox-y="188.98813" + inkscape:bbox-x="165.79256" + y="245.81065" + x="166.83098" height="44.162804" width="56.328701" id="use3709" @@ -288,10 +291,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="128.83115" - inkscape:bbox-x="164.68658" - y="878.32983" - x="165.72499" + inkscape:bbox-y="127.16017" + inkscape:bbox-x="165.79256" + y="307.63861" + x="166.83098" height="44.162804" width="56.328701" id="use3711" @@ -304,10 +307,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="376.14285" - inkscape:bbox-x="232.28101" - y="631.01813" - x="233.31943" + inkscape:bbox-y="374.47189" + inkscape:bbox-x="233.387" + y="60.326893" + x="234.42542" height="44.162804" width="56.328701" id="use3713" @@ -320,10 +323,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="314.31491" - inkscape:bbox-x="232.28101" - y="692.84607" - x="233.31943" + inkscape:bbox-y="312.64394" + inkscape:bbox-x="233.387" + y="122.15484" + x="234.42542" height="44.162804" width="56.328701" id="use3715" @@ -336,10 +339,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="252.48703" - inkscape:bbox-x="232.28101" - y="754.67395" - x="233.31943" + inkscape:bbox-y="250.81607" + inkscape:bbox-x="233.387" + y="183.98271" + x="234.42542" height="44.162804" width="56.328701" id="use3717" @@ -352,10 +355,10 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="190.65909" - inkscape:bbox-x="232.28101" - y="816.50189" - x="233.31943" + inkscape:bbox-y="188.98813" + inkscape:bbox-x="233.387" + y="245.81065" + x="234.42542" height="44.162804" width="56.328701" id="use3719" @@ -368,25 +371,26 @@ rx="11.071856" inkscape:bbox-height="46.239633" inkscape:bbox-width="58.40553" - inkscape:bbox-y="128.83115" - inkscape:bbox-x="232.28101" - y="878.32983" - x="233.31943" + inkscape:bbox-y="127.16017" + inkscape:bbox-x="233.387" + y="307.63861" + x="234.42542" height="44.162804" width="56.328701" id="use3721" style="fill:#ffe8e8;fill-opacity:1;stroke:#800000;stroke-width:2.07682943;stroke-miterlimit:4;stroke-dasharray:none" /> <g id="g3781" - inkscape:bbox-x="-1.1059908" - inkscape:bbox-y="442.39634" + inkscape:bbox-x="-2.6747894e-07" + inkscape:bbox-y="440.72538" inkscape:bbox-width="321.84332" - inkscape:bbox-height="43.133648"> + inkscape:bbox-height="43.133648" + transform="translate(1.1059905,-570.69124)"> <rect inkscape:bbox-height="35.391705" inkscape:bbox-width="320.73734" - inkscape:bbox-y="442.39634" - inkscape:bbox-x="-1.1059908" + inkscape:bbox-y="440.72538" + inkscape:bbox-x="-2.7016535e-07" y="574.57416" x="-1.1059908" height="35.391705" @@ -396,8 +400,8 @@ <rect inkscape:bbox-height="35.391705" inkscape:bbox-width="320.73734" - inkscape:bbox-y="450.13828" - inkscape:bbox-x="-2.250144e-06" + inkscape:bbox-y="448.46732" + inkscape:bbox-x="1.1059882" y="566.83221" x="-2.250144e-06" height="35.391705" @@ -416,10 +420,10 @@ rx="11.071856" inkscape:bbox-height="46.239804" inkscape:bbox-width="58.405701" - inkscape:bbox-y="372.37318" - inkscape:bbox-x="354.93541" - y="634.78772" - x="355.97391" + inkscape:bbox-y="370.70221" + inkscape:bbox-x="356.04143" + y="64.096489" + x="357.07993" height="44.162804" width="56.328701" id="rect3599-9" @@ -436,27 +440,28 @@ rx="11.071856" inkscape:bbox-height="46.239804" inkscape:bbox-width="58.405701" - inkscape:bbox-y="319.73725" - inkscape:bbox-x="355.68193" - y="687.42365" - x="356.72043" + inkscape:bbox-y="318.06628" + inkscape:bbox-x="356.78795" + y="116.73241" + x="357.82645" height="44.162804" width="56.328701" id="rect3599-9-3" - style="fill:none;stroke:#ff8010;stroke-width:2.0769999;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + style="fill:none;stroke:#000080;stroke-width:2.07699990000000012;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" mbname="presshint" /> <g id="g3849" - inkscape:bbox-x="1.1059908" - inkscape:bbox-y="-313.576" - inkscape:bbox-width="317.41979" - inkscape:bbox-height="384.87165" - mbname="dock"> + inkscape:bbox-x="2.2255181" + inkscape:bbox-y="-289.63124" + inkscape:bbox-width="317.40625" + inkscape:bbox-height="359.25593" + mbname="dock" + transform="translate(1.1059905,-570.69124)"> <path inkscape:bbox-height="76.31255" inkscape:bbox-width="317.40625" - inkscape:bbox-y="-5.0169" - inkscape:bbox-x="1.1195276" + inkscape:bbox-y="-6.68786" + inkscape:bbox-x="2.2255181" inkscape:connector-curvature="0" id="rect2817" d="m 163.68203,981.06655 c -63.1198,0 -120.411185,7.92804 -162.5625024,20.84375 l 0,55.4688 317.4062524,0 0,-57.7188 C 277.22165,988.08365 223.03485,981.06655 163.68203,981.06655 z" @@ -466,8 +471,8 @@ d="m 182.48848,1003.6866 c 0,8.2461 -9.16063,14.9309 -20.46083,14.9309 -11.3002,0 -20.46083,-6.6848 -20.46083,-14.9309 0,-8.24608 9.16063,-14.93086 20.46083,-14.93086 11.3002,0 20.46083,6.68478 20.46083,14.93086 z" id="path3843" inkscape:connector-curvature="0" - inkscape:bbox-x="140.52832" - inkscape:bbox-y="32.7062" + inkscape:bbox-x="141.63431" + inkscape:bbox-y="31.03524" inkscape:bbox-width="42.99866" inkscape:bbox-height="31.93876" /> <rect @@ -477,8 +482,8 @@ height="282.06689" x="4.4043493" y="1057.2367" - inkscape:bbox-x="3.3854628" - inkscape:bbox-y="-287.96028" + inkscape:bbox-x="4.4914533" + inkscape:bbox-y="-289.63124" inkscape:bbox-width="312.8604" inkscape:bbox-height="284.10467" /> </g>