fix clamps
This commit is contained in:
@@ -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,
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user