停止动画
Animate,Set,animateTransform节点都自带一个endElement()方法,可以停止动画。
<svg xmlns="http://www.w3.org/2000/svg">
<g>
<rect x="0" y="0" width="20" height="30" style="color: blue;">
<animate attributeType="XML" attributeName="width" begin="0" to="40" end="body.click" dur="1s"