-
-
Notifications
You must be signed in to change notification settings - Fork 893
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
"rand" in className property throwing errors #138
Comments
Hey Robin, Thanks for the issue. The problem is that new mojs.Shape({
className: 'Brands-burst',
fill: colour,
strokeWidth: 'rand(0, 5)',
scale: { 0 : 1 },
easing:'quad.in'
}); This is totally a bug since we need to do the smarter job with As a solution, for now, you can use const shape = new mojs.Shape({
fill: colour,
strokeWidth: 'rand(0, 5)',
scale: { 0 : 1 },
easing:'quad.in'
});
shape.el.className += ' Brands-burst'; Cheers~ |
Thanks for the speedy reply! Good shout, somehow didn't think of that one. |
Thanks for taking time for reporting it, great catch! Yeah, the Regexp makes weak assumptions and needs to be revamped. |
I'm attempting to create a mojs.Shape tween for my current project. Here are the options I'm using:
Unfortunately, this throws the following error in the console:
I did some testing, and it seems it happens if the className property contains the letters "rand" - anything else works fine, but if that string is found anywhere in the property, the error is thrown.
The text was updated successfully, but these errors were encountered: