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

Easing InOut #9

Open
SethHamilton opened this issue Jul 19, 2018 · 2 comments
Open

Easing InOut #9

SethHamilton opened this issue Jul 19, 2018 · 2 comments

Comments

@SethHamilton
Copy link

It would appear that the easing options that go in reverse (inOut or back) result in an exception.

@rafaelmaeuer
Copy link

Easing option was removed in v0.4.0 and set to linear:

easing: Easing.linear,

Could easing option please be added again? Linear looks a bit cheap...

@rafaelmaeuer
Copy link

Easing InOut still missing in v0.5.0, @kyo504 any plans to bring it back or add a parameter to choose easing?

I am using the following package-patch for now:

diff --git a/node_modules/react-native-marquee/src/index.tsx b/node_modules/react-native-marquee/src/index.tsx
index 8c86195..e8379a3 100644
--- a/node_modules/react-native-marquee/src/index.tsx
+++ b/node_modules/react-native-marquee/src/index.tsx
@@ -68,7 +68,7 @@ const createAnimation = (
   },
 ): Animated.CompositeAnimation => {
   const baseAnimation = Animated.timing(animatedValue, {
-    easing: Easing.linear,
+    easing: Easing.inOut(Easing.ease),
     useNativeDriver: true,
     ...config,
   });
@@ -85,7 +85,7 @@ const createAnimation = (
               useNativeDriver: true,
             }),
             Animated.timing(animatedValue, {
-              easing: Easing.linear,
+              easing: Easing.inOut(Easing.ease),
               useNativeDriver: true,
               ...config,
               duration: consecutive.duration,

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

No branches or pull requests

2 participants