Skip to content

Commit

Permalink
Fix timing function used in AnimatedRegion.spring (react-native-maps#…
Browse files Browse the repository at this point in the history
  • Loading branch information
oeb25 authored and Masu Lin committed Aug 7, 2017
1 parent 5c8e533 commit 02ca55f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/components/AnimatedRegion.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,25 @@ export default class AnimatedMapRegion extends AnimatedWithChildren {
spring(config) {
var animations = [];
config.hasOwnProperty('latitude') &&
animations.push(Animated.timing(this.latitude, {
animations.push(Animated.spring(this.latitude, {
...config,
toValue: config.latitude
}));

config.hasOwnProperty('longitude') &&
animations.push(Animated.timing(this.longitude, {
animations.push(Animated.spring(this.longitude, {
...config,
toValue: config.longitude
}));

config.hasOwnProperty('latitudeDelta') &&
animations.push(Animated.timing(this.latitudeDelta, {
animations.push(Animated.spring(this.latitudeDelta, {
...config,
toValue: config.latitudeDelta
}));

config.hasOwnProperty('longitudeDelta') &&
animations.push(Animated.timing(this.longitudeDelta, {
animations.push(Animated.spring(this.longitudeDelta, {
...config,
toValue: config.longitudeDelta
}));
Expand Down

0 comments on commit 02ca55f

Please sign in to comment.