Skip to content

Commit 6209fc7

Browse files
committed
Don't bounce touchableFixedForeground
1 parent 53135e9 commit 6209fc7

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/ImageHeaderScrollView.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,23 +182,12 @@ class ImageHeaderScrollView extends Component<Props, State> {
182182
renderTouchableFixedForeground() {
183183
const height = this.interpolateOnImageHeight([this.props.maxHeight, this.props.minHeight]);
184184

185-
const headerScale = this.state.scrollY.interpolate({
186-
inputRange: [-this.props.maxHeight, 0],
187-
outputRange: [3, 1],
188-
extrapolate: 'clamp',
189-
});
190-
191-
const headerTransformStyle = {
192-
height,
193-
transform: [{ scale: headerScale }],
194-
};
195-
196185
if (!this.props.renderTouchableFixedForeground) {
197186
return <View />;
198187
}
199188

200189
return (
201-
<Animated.View style={[styles.header, styles.touchableFixedForeground, headerTransformStyle]}>
190+
<Animated.View style={[styles.header, styles.touchableFixedForeground, { height }]}>
202191
{this.props.renderTouchableFixedForeground()}
203192
</Animated.View>
204193
);

0 commit comments

Comments
 (0)