Navigation Menu

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

pathLength doens't work on non-scaling-stroke [BUG] #521

Closed
ShanonJackson opened this issue Apr 30, 2020 · 0 comments · Fixed by #1325
Closed

pathLength doens't work on non-scaling-stroke [BUG] #521

ShanonJackson opened this issue Apr 30, 2020 · 0 comments · Fixed by #1325
Labels
bug Something isn't working

Comments

@ShanonJackson
Copy link

ShanonJackson commented Apr 30, 2020

2. Describe the bug
path length should animate even on non-scaling-strokes; My suspicion is you are calculating the line length using the DOM method .getTotalLength() however this returns the incorrect value for strokes with non-scaling-stroke this css value is extremely important to people creating graphs that are horizontally responsive without skew'ing the svg paths.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/s/kind-knuth-b1ed2?file=/src/index.tsx
Let me know if this doesn't work don't use code sandbox often.

5. Expected behavior
Line shouldn't have gaps.

Refactoring out of react-spring love the library so this is a blocker for me atm but other than that had no problems with library.

EDIT: Possible solution outlined here:
https://stackoverflow.com/questions/44389668/svg-gettotallength-wont-return-the-right-size-for-non-scaling-stroke-get-sv

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

Successfully merging a pull request may close this issue.

1 participant