Catch changes on SVG element circle and change attributes elsewhere via js

前端 未结 3 1459
感情败类
感情败类 2021-01-26 17:12

I have an embedded SVG in an HTML document. An (SVG) circle is animated using . I was trying to find a way to put some kind of event listener on that

3条回答
  •  不要未来只要你来
    2021-01-26 17:18

    A while ago I ran into the same problem you are describing. I wanted to be able to stop animations halfway, based on events triggered by the user and keep elements at their reached position. Unable to do so with SMIL I decided to forge my own animation system for svg.js, a small javascript library I have been working on:

    http://documentup.com/wout/svg.js#animating-elements

    It might be useful for what you are trying to achieve.

提交回复
热议问题