Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
jorma

drawSVG bug?

Recommended Posts

The initial state of the animation the very first time the page is initialised seems incorrect. The line in my CodePen is drawn from the start state of the last tween, not the first. This only happens the first time the drawing is animated. To reproduce this behavior just change the log text and watch the animation.

See the Pen vzmqBw by jormaturkenburg-the-typescripter (@jormaturkenburg-the-typescripter) on CodePen

Link to comment
Share on other sites

Not a bug. You have two fromTo tweens which have immediateRender set to true by default. So when second fromTo executes, it immediately renders your path to that value. You can either set immediateRender to false or use a 'to tween'.

 

See the Pen aawobp?editors=1010 by Sahil89 (@Sahil89) on CodePen

 

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

Yup, Sahil is exactly right. In case you need more help understanding immediateRender check out this video

 

 

Also, a little tip for using CodePen. You shouldn't have to change a log() or any code to get your demo to run. You can enable a "run" button via the pen's settings as shown here:

 

u4m99smsSCuC2xOKFWV_dw.png

 

Your pen with "run" button enabled

 

See the Pen dqRoag by GreenSock (@GreenSock) on CodePen

 

Hope that helps

  • Like 3
  • Thanks 1
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.
×