Open jkillian opened 9 years ago
You could possibly do something like...
Paper.prototype.markupAnimateTransform = function( attr ) {
return this.el('animateTransform').attr(
Be aware, animating by animateTransform tag/element can be hit and miss, I think Firefox has some issues with it in some cases, so its likely not the way to go in many cases, where its best to use Snap animation instead. But there are a couple of cases where you want it in an svg image or something. Just make sure you are using it when you couldn't use Snap for the animation.
Thanks for the advice @ibrierley. I actually could use Snap for the animation in all cases, I just figured using the animateTransform
tag would be more performant (not Snap's fault on that).
No problem, just be aware of the compatibility issues (thinking about it, I'm not sure IE9/10 support it either, you may want to check, if it a requirement for you).
If performance is key, you may want to look at css (or combining with Velocity.js is straightforward, but it does mean another lib).
Yeah, no version of IE supports animateTransform
, and unfortunately IE also don't support CSS animations for SVG elements either. So when it comes to them, basically have to use library like Snap :smiley:
Is there a way to create an arbitrary element of an Element? The only way to do this I could find was this:
I want to create an
animateTransform
element inside of apath
but can't figure out a good way to do it.