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

[BUG] NaN in point animation when using spring animations #2791

Open
cheald opened this issue Sep 5, 2024 · 0 comments
Open

[BUG] NaN in point animation when using spring animations #2791

cheald opened this issue Sep 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cheald
Copy link

cheald commented Sep 5, 2024

Describe the bug

When animating a <polygon> point list with a "spring" animation, at various points in the animation, the computed pointlist contains NaNs and throws console errors.

image

CodeSandbox reproduction of the bug

https://codesandbox.io/p/sandbox/pensive-khayyam-5mwd29?file=%2Fsrc%2FApp.js%3A9%2C68&workspaceId=5c31fde4-86cd-4353-99cd-cbe570ccc4aa

Steps to reproduce

  1. Define an SVG with a polygon element.
  2. Animate the points of the element, and use a spring animation.
  3. Observe that you get a bunch of complaints about NaNs in your error console.

When the animation type is not "spring", the NaN errors are not thrown (though one "expected number, 'undefined'" message is thrown per polygon element).

Expected behavior

When an SVGPointList would produce NaNs, it should not incorrectly attempt to set the pointlist with NaNs on the element.

Environment details

Reproduced in Brave v 1.69.153 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36)

@cheald cheald added the bug Something isn't working label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant