Jump to content
Search Community

Draws SVG is not revealing the segment as expected

Kenner Stross test
Moderator Tag

Recommended Posts

I have a very, very simple svg set up to test and understand the DrawSVG plugin. It's just a line, and I'm just trying to reveal the middle portion of the line. But... what I see are series of dashed lines. Clearly I'm misunderstanding something. If anyone has insight into what I'm doing wrong, I would greatly appreciate hearing from you. Thx

See the Pen zYvbRze by kennerstross (@kennerstross) on CodePen

Link to comment
Share on other sites

The problem is that you're animating the wrong element - you put your "myline" id on the <svg> element instead of the actual <path> whose stroke you're animating. 

 

Here's a fork where I put the id on the correct element and fixed the tween too:

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

 

Is that what you were looking for? 

  • Like 2
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...