Skip to content

Commit

Permalink
Merged PR i6mi6#57
Browse files Browse the repository at this point in the history
Merged PR i6mi6#57

i6mi6#57
  • Loading branch information
fungilation committed Aug 5, 2017
1 parent a960f3d commit 85f0a35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/bookmarks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bookmarks": []
}
9 changes: 7 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,20 @@ class ParallaxScrollView extends Component {
const { viewWidth, scrollY } = this.state;
if (renderStickyHeader || renderFixedHeader) {
const p = pivotPoint(parallaxHeaderHeight, stickyHeaderHeight);
let height = interpolate(scrollY, {
inputRange: [0, stickyHeaderHeight],
outputRange: [0, stickyHeaderHeight],
extrapolate: 'clamp',
});
return (
<View style={[styles.stickyHeader, { width: viewWidth, ...(stickyHeaderHeight ? { height: stickyHeaderHeight } : null ) }]}>
<View style={[styles.stickyHeader, { width: viewWidth }]}>
{
renderStickyHeader
? (
<Animated.View
style={{
backgroundColor: backgroundColor,
height: stickyHeaderHeight,
height: height,
opacity: interpolate(scrollY, {
inputRange: [0, p],
outputRange: [0, 1],
Expand Down

0 comments on commit 85f0a35

Please sign in to comment.