Jump to content
GreenSock

JIZA

MotionPathPlugin (start / end positions) doesn't work more than 1, in React, why?

Moderator Tag

Recommended Posts

https://codesandbox.io/s/zen-sunset-jf3fm?file=/src/App.js

 

When 

 motionPath{ 
        start: 0.5,
        end: -0.65,
}

Animation fires twice, how to fix it in React?

Because, I need the element to start moving near the start and end at the finish

https://prnt.sc/1zbakcb

And how to align so that the movement follows the path of the road

Link to comment
Share on other sites

  • JIZA changed the title to MotionPathPlugin (start / end positions) doesn't work more than 1, in React, why?

Welcome to the forums @JIZA

 

23 minutes ago, JIZA said:

Animation fires twice, how to fix it in React?

 

I'll need to check on that behavior, but the easiest solution is to just draw your SVG path at the correct start and end points.

 

Another option is to animate the progress of the timeline like this.

 

https://codesandbox.io/s/red-brook-xvwi9?file=/src/App.js

 

  • Like 1
Link to comment
Share on other sites

7 minutes ago, OSUblake said:

I'll need to check on that behavior

 

Yes, it looks like that issue will be fixed in the next release.

 

 

 

  • Thanks 1
Link to comment
Share on other sites

43 minutes ago, OSUblake said:

Welcome to the forums @JIZA

 

 

I'll need to check on that behavior, but the easiest solution is to just draw your SVG path at the correct start and end points.

 

Another option is to animate the progress of the timeline like this.

 

https://codesandbox.io/s/red-brook-xvwi9?file=/src/App.js

 

Thank you very much. You have a great library, I recently started using and learning about it. Cool😍

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Amazing! Very cool library. And thanks for the support!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×