esoftplay 0.0.227 → 0.0.228
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.
|
@@ -181,13 +181,15 @@ export default class m extends LibComponent<LibCarrouselProps, LibCarrouselState
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
_onScrollEnd(event: any): void {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
184
|
+
if (this.state.childrenLength > 1) {
|
|
185
|
+
const offset = { ...event.nativeEvent.contentOffset };
|
|
186
|
+
const page = this._calculateCurrentPage(offset.x);
|
|
187
|
+
const originalPage = Math.round(offset / this.state.size.width);
|
|
188
|
+
if (originalPage != page)
|
|
189
|
+
this._placeCritical(page);
|
|
190
|
+
this._setCurrentPage(page);
|
|
191
|
+
this._setUpTimer();
|
|
192
|
+
}
|
|
191
193
|
}
|
|
192
194
|
|
|
193
195
|
_onScroll(event: any): void {
|