diff --git a/CHANGELOG.md b/CHANGELOG.md index 6acdf2702..fab0f652a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v2.1.2 +* Do not trigger `onSnapToItem` when snapping back to the same slide (thanks [@rgabs](https://github.com/rgabs)) +* Add prop `carouselHorizontalPadding` to override container's inner padding (thanks [@skeie](https://github.com/skeie)) + ## v2.1.1 * Ensure compatibility with RN 0.43 (previous version of plugin's dependency `react-addons-shallow-compare` was breaking with React 16) * Fix issue with padding on iOS that could cause the carousel to snap back when its last item was clicked @@ -10,7 +14,7 @@ ## v2.0.3 -* Prevent error when carousel has only one child (thanks [@kevinvandijk](https://github.com/kevinvandijk) !) +* Prevent error when carousel has only one child (thanks [@kevinvandijk](https://github.com/kevinvandijk)) * Fix issue when appending dynamic slides (the first one was ignored) * Fix edge case that prevented the first slide from being focused when swiping back with momentum enabled * Bump example's RN version to 0.42.3 @@ -21,11 +25,11 @@ ## v2.0.1 -* Fix un-handled exception with interpolators (thanks [@chitezh](https://github.com/chitezh) !) +* Fix un-handled exception with interpolators (thanks [@chitezh](https://github.com/chitezh)) ## v2.0.0 -* Items are now direct children of the component, which makes it easier to use (thanks [@Jonarod](https://github.com/Jonarod) !) +* Items are now direct children of the `` component, which makes it easier to use (thanks [@Jonarod](https://github.com/Jonarod)) * Props `items` and `renderItem` have been removed ## v1.6.1 @@ -34,16 +38,16 @@ ## v1.6.0 -* Add `enableMomentum` prop +* Add prop `enableMomentum` * Fix an infinite-loop on iOS with momentum enabled * Fix the snapping effect when releasing touch without interia on iOS with momentum enabled * Fix autoplay on Android, it should start and stop properly and stop being triggered while swiping -* Use `View.propTypes.style` instead of `PropTypes.number` in styles validation (thanks [@pesakitan22](https://github.com/pesakitan22) !) +* Use `View.propTypes.style` instead of `PropTypes.number` in styles validation (thanks [@pesakitan22](https://github.com/pesakitan22)) ## v1.5.0 -* Items length can now be changed on-the-fly (thanks [@superical](https://github.com/superical) !) -* Now handling momentum (thanks [@FakeYou](https://github.com/FakeYou) !) +* Items length can now be changed on-the-fly (thanks [@superical](https://github.com/superical)) +* Now handling momentum (thanks [@FakeYou](https://github.com/FakeYou)) ## v1.4.0 @@ -56,7 +60,7 @@ ## v1.3.0 -* Pass the item data as the 2nd param of onSnapToItem callback +* Pass the item data as the 2nd param of `onSnapToItem` callback ## v1.2.1 @@ -64,10 +68,10 @@ ## v1.2.0 -* Add onSnapToItem prop +* Add prop `onSnapToItem` ## v1.1.0 * Center slides properly * Handle one slide only -* Add props 'inactiveSlideScale', 'inactiveSlideOpacity', 'containerCustomStyle' and 'contentContainerCustomStyle' \ No newline at end of file +* Add props `inactiveSlideScale`, `inactiveSlideOpacity`, `containerCustomStyle` and `contentContainerCustomStyle` \ No newline at end of file diff --git a/README.md b/README.md index 3cbc36b5c..f57000eb0 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ Prop | Description | Type | Default ------ | ------ | ------ | ------ animationFunc | Animated animation to use. Provide the name of the method | String | `timing` animationOptions | Animation options to be merged with the default ones. Can be used w/ animationFunc | Object | `{ easing: Easing.elastic(1) }` +carouselHorizontalPadding | Override container's inner padding (needed for slides's centering). **Warning: be aware that overriding the default value can mess with carousel's behavior.** | Number | `(sliderWidth - itemWidth) / 2` containerCustomStyle | Optional styles for Scrollview's global wrapper | ScrollView Style Object | `{}` contentContainerCustomStyle | Optional styles for Scrollview's items container | ScrollView Style Object | `{}` inactiveSlideOpacity | Value of the opacity effect applied to inactive slides | Number | `1` diff --git a/package.json b/package.json index b92e52ac7..6cc00800d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-snap-carousel", - "version": "2.1.1", + "version": "2.1.2", "description": "Swiper component for React Native with previews and snapping effect. Compatible with Android & iOS.", "main": "index.js", "repository": {