FakeSmile with IE9

后端 未结 2 1745
灰色年华
灰色年华 2021-01-20 12:09

I\'m trying to fake SMIL support in IE9 with FakeSmile

I\'m creating the SVG element dynamically, adding a rect element with animate element and calling beginElement

相关标签:
2条回答
  • 2021-01-20 12:35

    Fenring (leunen-d) anwered that fakesmil doesn't support dynamic animations and that it could be added with the following function: https://answers.launchpad.net/smil/+question/203333

    function registerAnimation(anim) {
        var targets = getTargets(anim);
        var elAnimators = new Array();
        for(var i=0; i<targets.length ;i++) {
          var target = targets[i];
          var animator = new Animator(anim, target, i);
          animators.push(animator);
          elAnimators[i] = animator;
        }
        anim.animators = elAnimators;
        var id = anim.getAttribute("id");
        if (id)
          id2anim[id] = anim;
        for(var i=0; i<elAnimators.length ;i++)
          elAnimators[i].register();
    }
    
    0 讨论(0)
  • 2021-01-20 12:36

    It seems you're setting a property incorrectly:

    animation.setAttributeNS(null, 'begin', 'indefinite');
    

    Change the property name to match the value:

    animation.setAttributeNS(null, 'repeatCount', 'indefinite');
    
    0 讨论(0)
提交回复
热议问题