【问题标题】:Manipulate javascript animation exported from svgator操作从 svgator 导出的 javascript 动画
【发布时间】:2020-03-23 19:07:23
【问题描述】:

我注意到没有编程方式来操作从 SVGator 导出的 SVG 动画。官方docs解释了如何一键启动。但是没有办法阻止它。

【问题讨论】:

    标签: svgator


    【解决方案1】:

    我找到了解决方法。可以在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()

    【讨论】:

      【解决方案2】:

      您确实可以选择在每次点击时“暂停”导出。

      【讨论】:

        猜你喜欢
        • 2020-11-15
        • 2014-10-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-09-19
        • 2019-12-12
        • 2015-09-08
        • 1970-01-01
        相关资源
        最近更新 更多