Closed stoeffel closed 4 years ago
Hey Stoeffel! Glad you're checking it out 😄
🤔 Ah, yeah it probably does make sense to change the docs.
Animator.wrap
doesn't care about units, though Animator.Inline.rotate
does assume radians. And of course it helps to have all examples using the same stuff.
I like your fix, and I'll also add a note in Animator.Inline.rotate
about units.
And yeah, you're right, that reverse spin shouldn't happen, it should already be at 0
.
Thanks for accepting this PR and for further clarifying the docs!
I really love elm-animator (and elm-ui) so far (building something for my kids). I actually think that these two libraries are a major reason I'd choose elm for any project.
Using
360
instead of(2 * pi)
will spin the loader 57 times.You can try it here https://ellie-app.com/93T5cxxRPbfa1
Additionally, I wasn't expecting that the button would spin back in this example because
wrap
should end up at0
right? Is this a bug or expected? How would you perform just one full rotation clockwise without spinning back when changing the state back toFalse
? (let me know if you want me to open an issue)Thanks for making this awesome library! ❤️