# HG changeset patch # User Thinker K.F. Li # Date 1289552088 -28800 # Node ID 191d3a5f74c8d24cb8bb999c0ec1b7aed78e7046 # Parent a9abcdac0ae5efcf13d47f2b3243daa4c44a7905 Migrate testsvg.js to new interface of shift action. diff -r a9abcdac0ae5 -r 191d3a5f74c8 nodejs/animate.js --- a/nodejs/animate.js Fri Nov 12 16:53:03 2010 +0800 +++ b/nodejs/animate.js Fri Nov 12 16:54:48 2010 +0800 @@ -15,12 +15,12 @@ x = (this.targetx - this.startposx) * percent + this.startposx; y = (this.targety - this.startposy) * percent + this.startposy; this.obj.center.move(x, y); - this.app.refresh(); + this._app.refresh(); } function shift(app,obj,shiftx,shifty) { obj.animated_shift = this; - this.app = app; + this._app = app; this.obj = obj; this.end = 0; this.targetx = shiftx + obj.center.x; diff -r a9abcdac0ae5 -r 191d3a5f74c8 nodejs/test.svg --- a/nodejs/test.svg Fri Nov 12 16:53:03 2010 +0800 +++ b/nodejs/test.svg Fri Nov 12 16:54:48 2010 +0800 @@ -15,7 +15,7 @@ height="480" id="svg2" sodipodi:version="0.32" - inkscape:version="0.47+devel r9312" + inkscape:version="0.47 r22583" sodipodi:docname="test.svg" version="1.0" inkscape:output_extension="org.inkscape.output.svg.inkscape"> @@ -33,7 +33,7 @@ inkscape:cx="267.0313" inkscape:cy="228.90269" inkscape:document-units="px" - inkscape:current-layer="layer1" + inkscape:current-layer="layer4" showgrid="false" inkscape:window-width="1347" inkscape:window-height="894" @@ -104,162 +104,324 @@ transform="translate(147.14286,-2.85715)" id="item1" mbname="item1" - style="fill-opacity:1"> + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="305.12571" + inkscape:bbox-y="419.49715" + inkscape:bbox-width="13.021875" + inkscape:bbox-height="21.072"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="305.12571" + inkscape:bbox-y="419.49715" + inkscape:bbox-width="13.021875" + inkscape:bbox-height="21.072">item1 + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="305.81167" + inkscape:bbox-y="379.97032" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="305.81167" + inkscape:bbox-y="379.97032" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219">item1 + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="307.48508" + inkscape:bbox-y="337.42336" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="307.48508" + inkscape:bbox-y="337.42336" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219">item1 + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="306.9954" + inkscape:bbox-y="294.87636" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="306.9954" + inkscape:bbox-y="294.87636" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219">item1 + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="305.46463" + inkscape:bbox-y="252.32939" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="305.46463" + inkscape:bbox-y="252.32939" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219">item1 + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="304.97496" + inkscape:bbox-y="209.7824" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="304.97496" + inkscape:bbox-y="209.7824" + inkscape:bbox-width="74.0625" + inkscape:bbox-height="18.574219">item1 + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="305.47649" + inkscape:bbox-y="167.23542" + inkscape:bbox-width="65.027344" + inkscape:bbox-height="18.574219"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="305.47649" + inkscape:bbox-y="167.23542" + inkscape:bbox-width="65.027344" + inkscape:bbox-height="18.574219">item1 + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="306.40478" + inkscape:bbox-y="124.68844" + inkscape:bbox-width="65.027344" + inkscape:bbox-height="18.574219"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="306.40478" + inkscape:bbox-y="124.68844" + inkscape:bbox-width="65.027344" + inkscape:bbox-height="18.574219">item1 + style="fill-opacity:1" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="303.20061" + inkscape:bbox-y="82.141456" + inkscape:bbox-width="65.027344" + inkscape:bbox-height="18.574219"> item1 + sodipodi:role="line" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="303.20061" + inkscape:bbox-y="82.141456" + inkscape:bbox-width="65.027344" + inkscape:bbox-height="18.574219">item1 + style="stroke:none" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="164.66374" + inkscape:bbox-y="326.01386" + inkscape:bbox-width="409.10203" + inkscape:bbox-height="33.623234"> + ry="10" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="168.5966" + inkscape:bbox-y="326.01386" + inkscape:bbox-width="405.16917" + inkscape:bbox-height="30.41517" /> + ry="10" + inkscape:transform-center-x="0" + inkscape:transform-center-y="0" + inkscape:bbox-x="164.66374" + inkscape:bbox-y="329.22193" + inkscape:bbox-width="405.16911" + inkscape:bbox-height="30.41517" />