Jump to content
Search Community

MotionPathPlugin (or stroke-dashoffset & stroke-dasharray) not working

jsco test
Moderator Tag

Go to solution Solved by PointC,

Recommended Posts

Sometimes the motionpathplugin doesn't work for certain paths and I'm not sure why. Here's an example. 

In this case, I want to draw different parts of the white line but it seems like either the css properties (stroke-dashoffset & stroke-dasharray) or the plugin isn't working.
I tried running the svg through svgo too, but that didn't help either.

See the Pen KKZeQVw?editors=1010 by cubefox (@cubefox) on CodePen

Link to comment
Share on other sites

  • Solution

I'm not sure if you're talking about the MotionPath plugin or DrawSVG since your demo is using DrawSVG.

 

The problem with the demo is the path with an ID of #mask is a filled path. DrawSVG only works with strokes. You'd want an open path or a series of lines with a stroke to do that reveal with DrawSVG.

 

Happy tweening.

:)

 

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