Skip to content

Updates AnimatedRegion component#3744

Merged
christopherdro merged 14 commits intomasterfrom
updates/AnimatedRegion
Sep 15, 2021
Merged

Updates AnimatedRegion component#3744
christopherdro merged 14 commits intomasterfrom
updates/AnimatedRegion

Conversation

@jasonmichaels
Copy link
Collaborator

This PR doesn't directly address any issues; rather, it's more of a cleanup PR.

Changes

  • cleans up the spring and timing methods of the AnimatedRegion component
  • implements a more readable flow in the constructor when setting latitude, longitude, latitudeDelta, and longitudeDelta via the setInitialValue method

Testing

Run the example apps to confirm functionality.

Jason White added 4 commits March 12, 2021 11:57
…more succinct, and constructor w/ common setInitialValue method for Animated.Value; ADDED: configTypes and defaultValues vars
@jasonmichaels jasonmichaels self-assigned this Mar 12, 2021
@christopherdro
Copy link
Collaborator

@jasonmichaels I'm not sure why those files int the android directory were creating but I don't think it was from merging in master. Either way, do you mind checkout out those files? I think the only files that need to be changed are AnimatedRegion.js and index.d.ts

@christopherdro
Copy link
Collaborator

@jasonmichaels any updates here ?

@christopherdro
Copy link
Collaborator

@jasonmichaels can you please give an update to this PR?

@jasonmichaels
Copy link
Collaborator Author

@christopherdro I updated the PR to infer/coerce useNativeDriver from per-spring/timing calls in the config. Also updated the docs and added notes to example files AnimatedMarkers and AnimatedRegions indicating that while useNativeDriver is set to true in said examples, it defaults to false if not specified/given.

@jasonmichaels
Copy link
Collaborator Author

@miallo I removed the instance method, setInitialValue to a standalone function, getAnimatedValue. Not sure if there's a better place for that (I'm considering a PR to consolidate constants and common functions).

Jason White added 2 commits August 23, 2021 16:03
@christopherdro christopherdro merged commit b49453e into master Sep 15, 2021
@monholm monholm deleted the updates/AnimatedRegion branch July 12, 2022 21:38
pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
* CHANGED: spring and timing methods of AnimatedRegion component to be more succinct, and constructor w/ common setInitialValue method for Animated.Value; ADDED: configTypes and defaultValues vars

* FIXED: linting on AnimatedRegion component

* REVERTED: changes to Podfile.lock

* REVERTED: changes to Podfile.lock

* CHANGED: Animated.spring and Animated.timing in AnimatedRegion to both useNativeDriver true

* ADDED: optional useNativeDriver to AnimatedRegion constructor as class prop used in spring and timing methods, with coersion to false when not provided

* ADDED: useNativeDRiver to Region interface as optional

* FIXED: typo on AnimatedRegion from useDefaultDrive to useNativeDriver

* CHANGED: AnimatedRegion spring and timing methods w/ optional config.useNativeDriver

* UPDATED: README, AnimatedMarkers, AnimatedViews w/ useNativeDriver notes on spring and timing

* CHANGED: index.d.ts w/ useNativeDriver on AnimatedRegionTimingConfig and AnimatedRegionSpringConfig; REMOVED: useNativeDriver from AnimatedRegion

* REMOVED: files added during build testing in OS dirs

Co-authored-by: Jason White <jasonwhite@Jasons-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants