我注意到没有编程方法来操作从SVGator中导出的SVG动画。官方docs解释了如何通过点击启动它。但没有办法阻止它。
发布于 2020-03-24 03:07:23
我找到了一种解决办法。您可以在svg文件中替换以下代码
i=new t(n.animations,n.options);
使用
i=new t(n.animations,n.options); if (!document.__SVGATOR_) document.__SVGATOR__ = {}; document.__SVGATOR__[n.root] = i;
然后,您将能够通过执行以下操作来停止动画
document.__SVGATOR__['id-of-dom-element'].stop()
https://stackoverflow.com/questions/60820064
复制相似问题