@momo-kits/carousel 0.0.43-beta.60 → 0.0.43-beta.72
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 +7 -0
- package/package.json +1 -1
package/CarouselV2.js
CHANGED
|
@@ -854,6 +854,8 @@ export default class Carousel extends React.PureComponent {
|
|
|
854
854
|
? this._getScrollOffset(event)
|
|
855
855
|
: this._currentScrollOffset;
|
|
856
856
|
const nextActiveItem = this._getActiveItem(scrollOffset);
|
|
857
|
+
const dataLength = this._getCustomDataLength();
|
|
858
|
+
const lastItemScrollOffset = this._getItemScrollOffset(dataLength - 1);
|
|
857
859
|
|
|
858
860
|
this._currentScrollOffset = scrollOffset;
|
|
859
861
|
|
|
@@ -863,6 +865,11 @@ export default class Carousel extends React.PureComponent {
|
|
|
863
865
|
onScrollIndexChanged(this._getDataIndex(nextActiveItem));
|
|
864
866
|
}
|
|
865
867
|
|
|
868
|
+
if (IS_IOS && scrollOffset >= lastItemScrollOffset) {
|
|
869
|
+
this._activeItem = nextActiveItem;
|
|
870
|
+
this._repositionScroll(nextActiveItem);
|
|
871
|
+
}
|
|
872
|
+
|
|
866
873
|
if (typeof onScroll === 'function' && event) {
|
|
867
874
|
onScroll(event);
|
|
868
875
|
}
|