0

私はそのようなコードを持っています:

<defs>
    <g id="g0">
        <circle cx="0" cy="1" r="16" fill="blue" id="pr0" stroke-width="0" stroke="#2986dc"/>
        <circle cx="0" cy="0" r="14" fill="red" id="pp0" />
    </g>
</defs>
<use x="603" y="484" id="u0" href="#g0">
    <animateTransform attributeName="transform" attributeType="XML" type="rotate" id="t0" dur="30s" repeatCount="indefinite" from="0 494 494" to="360 494 494"/>
</use>

JavaScriptを使用してアニメーション中にグループの座標を取得するにはどうすればよいですか?

4

1 に答える 1

0

SVG 1.2 Micro DOMは、アニメーション化された値にアクセスするためのメソッドのクラスを提供しますget*PresentationTrait*()が、ブラウザではまだサポートされていないと思います。おそらく最も簡単な方法は、JavaScript アニメーションに頼ることでしょう。

于 2012-11-29T22:27:15.303 に答える