Skip to content

Commit

Permalink
Fixed hidesForSinglePage bug
Browse files Browse the repository at this point in the history
  • Loading branch information
martinslapinskis committed Mar 18, 2020
1 parent 6657641 commit 9847d2a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-chi-page-control",
"version": "0.0.1",
"version": "0.0.3",
"description": "Cool page control animations written in React Native",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions src/PageControlAji.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class PageControlAji extends Component {
};

animateActiveDotTranslateX(value, duration) {
if (isNaN(value)) return

Animated.timing(this.translateX, {
toValue: value,
duration: duration,
Expand Down
2 changes: 2 additions & 0 deletions src/PageControlAleppo.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ class PageControlAleppo extends Component {

newWidth = (radius * 2) + ((radius * 2) * extraWidthConst);

if (isNaN(translateX)) return

Animated.parallel([
Animated.timing(this.translateX, {
toValue: translateX,
Expand Down
2 changes: 2 additions & 0 deletions src/PageControlJaloro.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ class PageControlJaloro extends Component {
};

animateActiveDotTranslateX(value, duration) {
if (isNaN(value)) return

Animated.timing(this.translateX, {
toValue: value,
duration: duration,
Expand Down
2 changes: 2 additions & 0 deletions src/PageControlPoblano.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ class PageControlPoblano extends Component {
};

animateDotViewTranslateX(value, duration) {
if (isNaN(value)) return

Animated.timing(this.translateX, {
toValue: value,
duration: duration,
Expand Down

0 comments on commit 9847d2a

Please sign in to comment.