Skip to content

Commit

Permalink
use __getValue to get current value from a Animated.Value
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianonunes committed Jun 27, 2017
1 parent 37af048 commit 4312d6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ScrollableTabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const ScrollableTabBar = React.createClass({
measureTab(page, event) {
const { x, width, height, } = event.nativeEvent.layout;
this._tabsMeasurements[page] = {left: x, right: x + width, width, height, };
this.updateView({value: this.props.scrollValue._value, });
this.updateView({value: this.props.scrollValue.__getValue(), });
},

render() {
Expand Down Expand Up @@ -209,12 +209,12 @@ const ScrollableTabBar = React.createClass({
width = WINDOW_WIDTH;
}
this.setState({ _containerWidth: width, });
this.updateView({value: this.props.scrollValue._value, });
this.updateView({value: this.props.scrollValue.__getValue(), });
},

onContainerLayout(e) {
this._containerMeasurements = e.nativeEvent.layout;
this.updateView({value: this.props.scrollValue._value, });
this.updateView({value: this.props.scrollValue.__getValue(), });
},
});

Expand Down

10 comments on commit 4312d6c

@imzyf
Copy link

@imzyf imzyf commented on 4312d6c Aug 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@qhhuang
Copy link

@qhhuang qhhuang commented on 4312d6c Sep 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lee-my
Copy link

@lee-my lee-my commented on 4312d6c Sep 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GreyLove
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@djllhs
Copy link

@djllhs djllhs commented on 4312d6c Dec 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

厉害了我的哥

@JohnProg
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@songxiaoliang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect!

@bitting304
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works!! thank you!

@wsyxl365
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works :) thank you very much~~~~ six six six~~

@thalesf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!!! thank you!

Please sign in to comment.