-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
How about Animated.subtract
?
#18451
Comments
Sure, we have Animated.divide so I guess substract does make sense too. If you want to make a PR I can review it, it should be relatively simple if you start from the add implementation. |
Thanks for posting this! It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out? If you believe your issue contains all the relevant information, let us know in order to have a maintainer remove the No Template label. Thank you for your contributions. |
Hey, @dgreensp are you working on it? Or is it something I could take on? |
@avendiart Go for it! |
Summary: Fixes facebook#18451 I've added another example to NativeAnimationsExample, which makes use of `Animated.substract()`, let me know if the example is not desired / doesn't add much value. Below two GIFs of the new method working on iOS and Android: <img width="320" src="https://user-images.githubusercontent.com/1437605/38154748-165cc5f8-3474-11e8-8b31-504444271896.gif" /> <img width="320" src="https://user-images.githubusercontent.com/1437605/38154749-1679bff0-3474-11e8-80b1-b558d44e0494.gif" /> <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> facebook/react-native-website#276 [GENERAL] [ENHANCEMENT] [Animated] - Implemented Animated.subtract Closes facebook#18630 Differential Revision: D7462867 Pulled By: hramos fbshipit-source-id: 4cb0b8af08bb0c841e44ea2099889b8c02a22a4a
Summary: Fixes facebook#18451 I've added another example to NativeAnimationsExample, which makes use of `Animated.substract()`, let me know if the example is not desired / doesn't add much value. Below two GIFs of the new method working on iOS and Android: <img width="320" src="https://user-images.githubusercontent.com/1437605/38154748-165cc5f8-3474-11e8-8b31-504444271896.gif" /> <img width="320" src="https://user-images.githubusercontent.com/1437605/38154749-1679bff0-3474-11e8-80b1-b558d44e0494.gif" /> <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> facebook/react-native-website#276 [GENERAL] [ENHANCEMENT] [Animated] - Implemented Animated.subtract Closes facebook#18630 Differential Revision: D7462867 Pulled By: hramos fbshipit-source-id: 4cb0b8af08bb0c841e44ea2099889b8c02a22a4a
Summary: Fixes facebook#18451 I've added another example to NativeAnimationsExample, which makes use of `Animated.substract()`, let me know if the example is not desired / doesn't add much value. Below two GIFs of the new method working on iOS and Android: <img width="320" src="https://user-images.githubusercontent.com/1437605/38154748-165cc5f8-3474-11e8-8b31-504444271896.gif" /> <img width="320" src="https://user-images.githubusercontent.com/1437605/38154749-1679bff0-3474-11e8-80b1-b558d44e0494.gif" /> <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> facebook/react-native-website#276 [GENERAL] [ENHANCEMENT] [Animated] - Implemented Animated.subtract Closes facebook#18630 Differential Revision: D7462867 Pulled By: hramos fbshipit-source-id: 4cb0b8af08bb0c841e44ea2099889b8c02a22a4a
Summary: Fixes facebook#18451 I've added another example to NativeAnimationsExample, which makes use of `Animated.substract()`, let me know if the example is not desired / doesn't add much value. Below two GIFs of the new method working on iOS and Android: <img width="320" src="https://user-images.githubusercontent.com/1437605/38154748-165cc5f8-3474-11e8-8b31-504444271896.gif" /> <img width="320" src="https://user-images.githubusercontent.com/1437605/38154749-1679bff0-3474-11e8-80b1-b558d44e0494.gif" /> <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> facebook/react-native-website#276 [GENERAL] [ENHANCEMENT] [Animated] - Implemented Animated.subtract Closes facebook#18630 Differential Revision: D7462867 Pulled By: hramos fbshipit-source-id: 4cb0b8af08bb0c841e44ea2099889b8c02a22a4a
Summary: Fixes facebook#18451 I've added another example to NativeAnimationsExample, which makes use of `Animated.substract()`, let me know if the example is not desired / doesn't add much value. Below two GIFs of the new method working on iOS and Android: <img width="320" src="https://user-images.githubusercontent.com/1437605/38154748-165cc5f8-3474-11e8-8b31-504444271896.gif" /> <img width="320" src="https://user-images.githubusercontent.com/1437605/38154749-1679bff0-3474-11e8-80b1-b558d44e0494.gif" /> <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> facebook/react-native-website#276 [GENERAL] [ENHANCEMENT] [Animated] - Implemented Animated.subtract Closes facebook#18630 Differential Revision: D7462867 Pulled By: hramos fbshipit-source-id: 4cb0b8af08bb0c841e44ea2099889b8c02a22a4a
I'm finding myself typing
Animated.add(x, Animated.multiply(-1, y))
a lot.Would you take a PR that adds an
Animated.subtract
?The text was updated successfully, but these errors were encountered: