fix clamps
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {type StyleProp, View, type ViewStyle} from 'react-native'
|
||||
import Animated, {
|
||||
Extrapolation,
|
||||
interpolate,
|
||||
type SharedValue,
|
||||
useAnimatedStyle,
|
||||
@@ -44,7 +45,9 @@ function GrowableAvatarInner({
|
||||
const animatedStyle = useAnimatedStyle(() => ({
|
||||
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(() => ({
|
||||
transform: [
|
||||
{
|
||||
scale: interpolate(clampedScrollY.get(), [-150, 0], [2, 1]),
|
||||
scale: interpolate(clampedScrollY.get(), [-150, 0], [2, 1], {
|
||||
extrapolateRight: Extrapolation.CLAMP,
|
||||
}),
|
||||
},
|
||||
],
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user