@momo-kits/carousel 0.0.43-beta.70 → 0.0.43-beta.74
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 +1 -11
- package/package.json +1 -1
- package/publish.sh +1 -1
package/CarouselV2.js
CHANGED
|
@@ -18,7 +18,6 @@ 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';
|
|
22
21
|
|
|
23
22
|
// React Native automatically handles RTL layouts; unfortunately, it's buggy with horizontal ScrollView
|
|
24
23
|
// See https://github.com/facebook/react-native/issues/11960
|
|
@@ -854,8 +853,6 @@ export default class Carousel extends React.PureComponent {
|
|
|
854
853
|
? this._getScrollOffset(event)
|
|
855
854
|
: this._currentScrollOffset;
|
|
856
855
|
const nextActiveItem = this._getActiveItem(scrollOffset);
|
|
857
|
-
const dataLength = this._getCustomDataLength();
|
|
858
|
-
const lastItemScrollOffset = this._getItemScrollOffset(dataLength - 1);
|
|
859
856
|
|
|
860
857
|
this._currentScrollOffset = scrollOffset;
|
|
861
858
|
|
|
@@ -865,11 +862,6 @@ export default class Carousel extends React.PureComponent {
|
|
|
865
862
|
onScrollIndexChanged(this._getDataIndex(nextActiveItem));
|
|
866
863
|
}
|
|
867
864
|
|
|
868
|
-
if (IS_IOS && scrollOffset >= lastItemScrollOffset) {
|
|
869
|
-
this._activeItem = nextActiveItem;
|
|
870
|
-
this._repositionScroll(nextActiveItem);
|
|
871
|
-
}
|
|
872
|
-
|
|
873
865
|
if (typeof onScroll === 'function' && event) {
|
|
874
866
|
onScroll(event);
|
|
875
867
|
}
|
|
@@ -893,9 +885,7 @@ export default class Carousel extends React.PureComponent {
|
|
|
893
885
|
this._activeItem = nextActiveItem;
|
|
894
886
|
onSnapToItem && onSnapToItem(this._getDataIndex(nextActiveItem));
|
|
895
887
|
|
|
896
|
-
if (hasSnapped
|
|
897
|
-
this._repositionScroll(nextActiveItem);
|
|
898
|
-
} else if (IS_IOS) {
|
|
888
|
+
if (hasSnapped) {
|
|
899
889
|
this._repositionScroll(nextActiveItem);
|
|
900
890
|
}
|
|
901
891
|
}
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -26,4 +26,4 @@ cd ..
|
|
|
26
26
|
rm -rf dist
|
|
27
27
|
|
|
28
28
|
|
|
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"}'
|
|
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"}'
|