Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Keep hidden nav content item hidden after tween completion #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions components/NavBarContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@ var NavBarContent = React.createClass({
},

componentWillReceiveProps: function(newProps) {
var beginOpacity = this.props.willDisappear ? 1 : 0;
var endOpacity = this.props.willDisappear ? 0 : 1;

if (newProps.route !== this.props.route) {
this.setState({
opacity: this.props.willDisappear ? 1 : 0
opacity: beginOpacity
});

setTimeout(() => {
this.tweenState('opacity', {
easing: tweenState.easingTypes.easeInOutQuad,
duration: 200,
endValue: 1
endValue: endOpacity
});
}, 0);
}
Expand Down