Skip to content

Commit 02ca55f

Browse files
oeb25Masu Lin
authored and
Masu Lin
committed
Fix timing function used in AnimatedRegion.spring (react-native-maps#1479)
1 parent 5c8e533 commit 02ca55f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/components/AnimatedRegion.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,25 @@ export default class AnimatedMapRegion extends AnimatedWithChildren {
111111
spring(config) {
112112
var animations = [];
113113
config.hasOwnProperty('latitude') &&
114-
animations.push(Animated.timing(this.latitude, {
114+
animations.push(Animated.spring(this.latitude, {
115115
...config,
116116
toValue: config.latitude
117117
}));
118118

119119
config.hasOwnProperty('longitude') &&
120-
animations.push(Animated.timing(this.longitude, {
120+
animations.push(Animated.spring(this.longitude, {
121121
...config,
122122
toValue: config.longitude
123123
}));
124124

125125
config.hasOwnProperty('latitudeDelta') &&
126-
animations.push(Animated.timing(this.latitudeDelta, {
126+
animations.push(Animated.spring(this.latitudeDelta, {
127127
...config,
128128
toValue: config.latitudeDelta
129129
}));
130130

131131
config.hasOwnProperty('longitudeDelta') &&
132-
animations.push(Animated.timing(this.longitudeDelta, {
132+
animations.push(Animated.spring(this.longitudeDelta, {
133133
...config,
134134
toValue: config.longitudeDelta
135135
}));

0 commit comments

Comments
 (0)