Skip to content
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

Error: <circle> attribute r: A negative value is not valid. #342

Open
massprogressive opened this issue Mar 1, 2018 · 6 comments
Open
Labels

Comments

@massprogressive
Copy link

I'm trying to animate two circles using their attributes "ry" to make a blink of an eye effect. all works for me but when I'm opening console I've got error:
Error: attribute ry: A negative value is not valid. ("-3.3084371372080135")

The values I'm using in range [21, 0, 21]. What makes this error happen and how to fix it?

But when I'm using numbers in range [21, 5, 21] all works without any issues.

@juliangarnier
Copy link
Owner

juliangarnier commented Mar 2, 2018

Looks like you're using an elastic easing, so animating to 0 means going negative at some point to create the bounce effect.

Try with an other easing function.

@massprogressive
Copy link
Author

I'm using 'linear' easing.

@juliangarnier
Copy link
Owner

Hard to help you without a live example.
Can you share a CodePen or JSfiddle ?

@sadeghbarati
Copy link

@juliangarnier

https://codepen.io/riccardo051/pen/bKXjpg

Unexpected value 46.0533334776393 parsing r attribute.

@kate-ivanova
Copy link

@juliangarnier Hi, I have the same issue. It happens here when I try to animate r to 0, e.g. r: [2, 0] with any easing. It seems that you need to add check for p === 'r' if the value is positive or 0. And if it's negative - set v = 0

@kate-ivanova
Copy link

kate-ivanova commented Oct 31, 2018

I've created PR for it #444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants