-
-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: added iterationPause property #169
Conversation
createAnimatableComponent.js
Outdated
@@ -291,11 +291,12 @@ export default function createAnimatableComponent(WrappedComponent) { | |||
delay, | |||
onAnimationBegin, | |||
onAnimationEnd, | |||
iterationPause, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer to name this iterationDelay
instead to keep it consistent.
createAnimatableComponent.js
Outdated
@@ -349,10 +350,10 @@ export default function createAnimatableComponent(WrappedComponent) { | |||
this.setState({ animationStyle, compiledAnimation }, callback); | |||
} | |||
|
|||
animate(animation, duration) { | |||
animate(animation, duration, iterationCount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be iterationDelay
no?
createAnimatableComponent.js
Outdated
@@ -389,21 +390,24 @@ export default function createAnimatableComponent(WrappedComponent) { | |||
if (reversed) { | |||
easing = Easing.out(easing); | |||
} | |||
|
|||
Animated.timing(animationValue, { | |||
const delay = iterationPause ? { delay: iterationPause } : {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of this style, can't you just do it inline with a default to 0
like the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Some stylistic changes and a nit about naming otherwise good job!
@itchingpixels Thanks again for your PR. Are you planning on addressing the comments? |
Can't wait using it! |
I'll get this done in 24 hours :) |
done!:) |
A new, optional property to insert a pause between two iterations.
We're happy to update the README to include this, if everything is fine with this PR.
Closes #168