Closed fregante closed 6 years ago
Ah yes, this seems like a rather extreme edge case. Thanks for pointing it out though. Keep in mind that:
So again, in this case I'd recommend simply setting the value directly. For the 2.x release, I'll look for ways to better accommodate simple set() calls like this. Like perhaps a quickSet() that is NOT a tween instance and is solely meant to immediately change values without recording anything or concerning itself with interpolation. Fair enough?
That probably sounds good. The problem with raw DOM API calls is that they’re not as easy to add in a reversable timeline
True, though you could just add a call() in the timeline that'll do it, and maybe another that's SUPER close to it, like 0.00001 seconds before it that sets it to the initial value. There are other ways to do this too - let me know if you need any help. I know you're an advanced user, so you're probably already aware of several options.
I’ll stick to attr
for now, I don’t want to set multiple function calls to set/unset it when GSAP can take care of it via AttrPlugin 🙂
I think GSAP is assuming
fill
is always a color and is trying to parse it, whileattr
doesn't parse it and thus works correctlyhttps://codepen.io/bfred-it/pen/RMjLKv