Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates AnimatedRegion component #3744

Merged
merged 14 commits into from
Sep 15, 2021
Merged

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
borjomemost pushed a commit to borjomemost/react-native-maps that referenced this pull request May 6, 2022
* 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>
@monholm monholm deleted the updates/AnimatedRegion branch July 12, 2022 21:38
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