question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

path.getTotalLength on IOS does not work

See original GitHub issue

Hey, first of all thanks for the great project.

I came across an issue when I try to get path’s total length with getTotalLength on IOS. It always returns 0. It works just fine on Android.

I created small demo with Expo Snack to test it. Please refer to the link below: https://snack.expo.io/@vydimitrov/gettotallength

  1. First check it on Android device and you will see the total length is printed on the screen.
  2. Change device to IOS and you will see the the length never changes, it is always 0 as the initial value.

It seems that the issue was first reported here - https://github.com/react-native-community/react-native-svg/issues/986 and PR was created to fix it here - https://github.com/react-native-community/react-native-svg/pull/1135. However there seems to be an issue with the IOS implementation.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
stale[bot]commented, Jun 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a “discussion” and I will leave this open.

0reactions
camilossantos2809commented, Jan 15, 2021

I’m having the same problem… any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

path.getTotalLength on IOS does not work #1336 - GitHub
I came across an issue when I try to get path's total length with getTotalLength on IOS. It always returns 0. It works...
Read more >
SVGGeometryElement.getTotalLength() - Web APIs | MDN
The SVGGeometryElement.getTotalLength() method returns the user agent's computed value for the total length of the path in user units.
Read more >
circle.getTotalLength() Internet explorer error - Stack Overflow
1 Answer 1 ... Although you may not use the getTotalLength method, since what you have is a circle, you can use the...
Read more >
SVGGeometryElement API: getTotalLength - CanIUse
"Can I use" provides up-to-date browser support tables for support of front-end web ... SVGGeometryElement API: getTotalLength ... Safari on iOS *.
Read more >
gettotallength is not a function - You.com | The search engine you ...
You are trying to create a normal HTML-Element called path , which does not have any function called path.getTotalLength() . Try document.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found