Closed tgienger closed 9 years ago
Hi @tgienger!
Yes, you can pass an object as the second parameter to the addAnimation
and the animation source will get it as options:
function animationSource({target, options}) {...}
...
this.addAnimation(animationSource, {foo: this.state.foo})
...
I will document this soon, until that, i made a mini demo on this
It makes sense looking at it. I tried it but failed because I wasn't using the es6 parameter destructuring properly. Bad on my part, thanks :)
Your welcome! :) I uploaded an other demo that selecting target according the options and i modified the previous one to use only ES5 and JSX. (There should be more demo using plain ES5 i guess)
Thanks for the issue, i'm closing it then!
So far I'm liking this plugin, but I would like the ability to pass my selector as an argument, either by object or string, to the animation function. This way I can create one animation function to use on multiple targets. Unless of course there's a way to do this that I haven't discovered :)