Closed diarmidmackenzie closed 1 year ago
Thanks for the feedback. Sorry, I wrote the example code in a hurry, as I was mostly focussed on what the actual component did. Should have tidied it up a lot more before submitting a PR.
Just doing some testing now, I spotted a couple of things I hadn't noticed before, which I want to investigate before merging this PR...
Duration doesn't work as I expected - it seems to slow the animation down (like timeScale, but in the reverse sense)
ClampWhenFinished seems to act as if it is always "true".
ClampWhenFInished was a bug in my code - for a checkbox, don't read "value" property, read "checked" instead. Also updated on both click & change.
OK, I'd misunderstood the functon provided by 'duration'.
It is supposed to specify the duration of a singe loop of the animation. That's always been the case, evidence here, for example.
So why does timeScale also exist? Motivation seems to have been to provide a way to pause an animation.
I don't much like the interface. Seems unnecessary to have two different properties to do pretty much exactly the same thing. But we should maintain both properties for backwards compatibility reasons.
So for now, just documenting more clearly what 'duration' actually does.
Fix for #380