Skip to content

Commit

Permalink
Merge pull request #516 from AtticusFetch/master
Browse files Browse the repository at this point in the history
Fix iOS initial index issue && Bump version
  • Loading branch information
Bart Arribe authored Aug 14, 2017
2 parents ac52429 + 97e4551 commit 6fd0c3d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "react-native-swiper",
"keywords": ["react-component", "react-native", "ios"],
"version": "1.5.9",
"keywords": [
"react-component",
"react-native",
"ios"
],
"version": "1.5.10",
"description": "Swiper component for React Native.",
"main": "index.js",
"scripts": {
Expand All @@ -12,7 +16,9 @@
"test": "npm run lint"
},
"pre-commit": {
"run": ["precommit"],
"run": [
"precommit"
],
"silent": true
},
"standard": {
Expand All @@ -25,7 +31,11 @@
"setImmediate",
"fetch"
],
"ignore": ["dist/", "mock/", "node_modules/"]
"ignore": [
"dist/",
"mock/",
"node_modules/"
]
},
"ava": {
"babel": "inherit",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default class extends Component {

// only update the offset in state if needed, updating offset while swiping
// causes some bad jumping / stuttering
if (width !== this.state.width || height !== this.state.height) {
if (!this.state.offset || width !== this.state.width || height !== this.state.height) {
state.offset = offset
}
this.setState(state)
Expand Down

3 comments on commit 6fd0c3d

@mrdezzods
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arribbar Can you mention the changes in the readme? Then I'll make a new release

Thanks

@arribbar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, I have already made a new release with these changes.
I'll update the readme today and do the release if you want to

@mrdezzods
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arribbar Oh I see its updated now. I thought only I had access. Good that @leecade added you as well :)

Please sign in to comment.