phil-r / react-native-looped-carousel

:carousel_horse: Looped carousel for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_placeCritical() bad logic was executed

008v opened this issue · comments

An incorrect operation was performed in the _placeCritical() method.

Specifically,

  _onScrollEnd = (event) => {
    const offset = { ...event.nativeEvent.contentOffset };
    const page = this._calculateCurrentPage(offset.x);
    this._placeCritical(page);     // <--  scroll to some page without animation when onScrollEnd()
    this._setCurrentPage(page);
    this._setUpTimer();
  }