How is set animation done in Raphael?

前端 未结 2 2043
面向向阳花
面向向阳花 2021-01-06 17:57

I\'m trying to accomplish some animation with sets in Raphael, but even though an opacity animation worked, I cannot succeed in moving a set (or even a circle) around the ca

相关标签:
2条回答
  • 2021-01-06 18:09

    I played with this a bit (and scanned through the source) and it looks like you need to specify the transformation in a form like {transform:'M 1 .5 .5 1 15 25'}. Take a look at this fiddle to see some transformations.

    BTW, the transformations aren't working exactly as i would have expected, and I can't pretend I understand why... I am pretty new to Raphael and SVG. Anyway, I hope this helps move you in the right direction.

    0 讨论(0)
  • 2021-01-06 18:25

    To move a set in Raphael, use:

    // move to (100,100) over 1 second
    
    theSetNameGoesHere.animate({transform: "t100,100"}, 1000);
    
    0 讨论(0)
提交回复
热议问题