@momo-kits/carousel 0.0.43-beta.52 → 0.0.43-beta.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CarouselV2.js +4 -1
- package/package.json +1 -1
- package/publish.sh +1 -1
package/CarouselV2.js
CHANGED
|
@@ -18,6 +18,7 @@ import PropTypes from 'prop-types';
|
|
|
18
18
|
// import RN_PACKAGE from '../../../react-native/package.json';
|
|
19
19
|
|
|
20
20
|
const IS_ANDROID = Platform.OS === 'android';
|
|
21
|
+
const IS_IOS = Platform.OS === 'ios';
|
|
21
22
|
|
|
22
23
|
// React Native automatically handles RTL layouts; unfortunately, it's buggy with horizontal ScrollView
|
|
23
24
|
// See https://github.com/facebook/react-native/issues/11960
|
|
@@ -885,7 +886,9 @@ export default class Carousel extends React.PureComponent {
|
|
|
885
886
|
this._activeItem = nextActiveItem;
|
|
886
887
|
onSnapToItem && onSnapToItem(this._getDataIndex(nextActiveItem));
|
|
887
888
|
|
|
888
|
-
if (hasSnapped) {
|
|
889
|
+
if (hasSnapped && IS_ANDROID) {
|
|
890
|
+
this._repositionScroll(nextActiveItem);
|
|
891
|
+
} else if (IS_IOS) {
|
|
889
892
|
this._repositionScroll(nextActiveItem);
|
|
890
893
|
}
|
|
891
894
|
}
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -26,4 +26,4 @@ cd ..
|
|
|
26
26
|
rm -rf dist
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
curl -X POST -H 'Content-Type: application/json' 'https://chat.googleapis.com/v1/spaces/AAAAbP8987c/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=UGSFRvk_oYb9uGsAgs31bVvMm6jDkmD8zihGm3eyaQA%3D&threadKey=JoaXTEYaNNkl' -d '{"text": "@momo-kits/carousel new version release: '*"$VERSION"*' https://www.npmjs.com/package/@momo-kits/carousel"}'
|