Jump to content
Search Community

Draw SVG Not Working For Me

ex-jedi test
Moderator Tag

Go to solution Solved by ZachSaucier,

Recommended Posts

I'm planning on trying some scroll animations with this SVG but I've fallen at the first hurdle. I can't get the paths to draw. I've succeeded with some simpler SVG's but this one an a couple of others aren't working.

 

I'm relatively new to DrawSVG so apologies if it's a glaringly simple fix. Any ideas? 

See the Pen OJXogyR by ex-jedi (@ex-jedi) on CodePen

Link to comment
Share on other sites

  • Solution

Hey ex-jedi and welcome to the GreenSock forums.

 

The issue is that you're attempting to apply DrawSVG to a path with no stroke. DrawSVG animates the stroke, so that's why you're not seeing anything happening :) If you use stroke instead it works, but likely not how you want it to be:

See the Pen ZEOMyPZ?editors=0010 by GreenSock (@GreenSock) on CodePen

 

To make it draw the "lines" that you have, you should create each part of your SVG using a single path with a wider stroke instead of "two" paths on both sides of the stem and leaf (really they're one path but all the way around but you don't want it to go up and down). Does that make sense?

 

Additionally we recommend using the position parameter over delays on tweens in timelines.

  • Like 3
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.
×
×
  • Create New...