-
Notifications
You must be signed in to change notification settings - Fork 47
resolve #116 #117
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
resolve #116 #117
Conversation
|
Since |
…teFromProps with added componentDidUpdate functionality
amio
left a comment
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.
Thanks @lluisrojass , just a few refinements
src/carousel.js
Outdated
| if (this.state.frames.length && this.state.frames.length !== prevState.frames.length) { | ||
| // reset to default state | ||
| this.hideFrames() | ||
| translateXY(this.refs['f0'], 0, 0, 0) |
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.
Should use this.prepareAutoSlide() instead of translateXY(this.refs['f0'], 0, 0, 0) to get all frames positioned correctly.
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.
@amio just noticed the comments :/ will be able to get to it within 24 hours, thanks for the patience and I apologize for the latency.
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.
@amio this has been addressed
src/carousel.js
Outdated
| if (frames.length && frames.length !== prevState.frames.length) { | ||
| nextState.current = 0 | ||
| } | ||
|
|
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.
Extra spaces
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.
got it 👍
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.
@amio this has been addressed in latest commit.
Resolves #116
componentWillReceivePropswill now reset frames to default state upon receiving an array of frames differing fromstateframes.