fix clamps

This commit is contained in:
Samuel Newman
2025-12-31 16:11:40 +02:00
parent abe6100f2c
commit 8930a226d6
2 changed files with 7 additions and 2 deletions
@@ -1,5 +1,6 @@
import {type StyleProp, View, type ViewStyle} from 'react-native' import {type StyleProp, View, type ViewStyle} from 'react-native'
import Animated, { import Animated, {
Extrapolation,
interpolate, interpolate,
type SharedValue, type SharedValue,
useAnimatedStyle, useAnimatedStyle,
@@ -44,7 +45,9 @@ function GrowableAvatarInner({
const animatedStyle = useAnimatedStyle(() => ({ const animatedStyle = useAnimatedStyle(() => ({
transform: [ transform: [
{ {
scale: interpolate(clampedScrollY.get(), [-150, 0], [1.2, 1]), scale: interpolate(clampedScrollY.get(), [-150, 0], [1.2, 1], {
extrapolateRight: Extrapolation.CLAMP,
}),
}, },
], ],
})) }))
@@ -74,7 +74,9 @@ function GrowableBannerInner({
const animatedStyle = useAnimatedStyle(() => ({ const animatedStyle = useAnimatedStyle(() => ({
transform: [ transform: [
{ {
scale: interpolate(clampedScrollY.get(), [-150, 0], [2, 1]), scale: interpolate(clampedScrollY.get(), [-150, 0], [2, 1], {
extrapolateRight: Extrapolation.CLAMP,
}),
}, },
], ],
})) }))