-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpolating curved paths #77
Comments
You can only interpolate matching patterns, it doesn’t know what svg paths are otherwise, but if the structure matches it can manage, for instance if the number of points is the same as well as the format. For more complex paths use a custom interpolater, there’s an example in the examples page using flubber. |
couldn't the error here be improved? i burned over an hour because some function deep in the stack was throwing a generic array error and finally found out its most likely because each path had different number of points |
Maybe assert in develop mode would be a good idea. I can see how confusing this must've been for you. |
Interpolating the following gives a 'Uncaught TypeError: Cannot read property 'push' of undefined':
const toggledPathCurved = "M0.9,19c-9.2,0,56.5,0,48.4,0C34.3,19,32,0.6,25.1,0.6S12.4,19,0.9,19z";
const disabledPathCurved = "M0.9,38c-9.2,0,56.5,0,48.4,0c-15,0-17.4,0-24.3,0S12.4,38,0.9,38z";
While these paths work fine:
const toggledPathSimple = "M20,380 L380,380 L380,380 Z";
const disabledPathSimple = "M20,20 L20,380 L380,380 Z";
I'm guessing it has to do with the curves.
The text was updated successfully, but these errors were encountered: