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

bbox() not returning the right dimensions for a path #1221

Closed
svenssf opened this issue Oct 1, 2021 · 2 comments
Closed

bbox() not returning the right dimensions for a path #1221

svenssf opened this issue Oct 1, 2021 · 2 comments

Comments

@svenssf
Copy link

svenssf commented Oct 1, 2021

Bug report

box = elem.bbox()

does not return the right dimensions for:

<path d="M167.13,255.08a19.24,19.24,0,0,0-17.7-11.2h-.7a19.1,19.1,0,0,0-11,3.9,19.47,19.47,0,0,0-7.9,15.7c0,.7.1,1.4.1,2.1a12.43,12.43,0,0,0-4.3-.1c-5.5.7-10.7,4.5-13.7,10.1a2.51,2.51,0,0,0,4.4,2.4c2.3-4.2,6-7,10-7.5a6.27,6.27,0,0,1,5.4,1.4,19.59,19.59,0,1,0,35.4-16.8Zm-29.8,16.5c-.2,0-.4.1-.5,0a4.25,4.25,0,0,1-1.1-.2,2.52,2.52,0,0,1-1.2-3.3c.1-.2.2-.3.3-.5a1.21,1.21,0,0,1,.5-.5.76.76,0,0,1,.4-.2c-.3-.5-.5-.9-.8-1.4a30.41,30.41,0,0,1-2.4-5.9.35.35,0,0,0-.1-.2l-.1-.2a2.73,2.73,0,0,1,1.5-2.6c.1-.1.3-.1.4-.2a2.44,2.44,0,0,1,2.2.4,2.73,2.73,0,0,1,.9,1.2l.1.2a23.88,23.88,0,0,0,3.5,7.6,42.85,42.85,0,0,0,4.2-1.5c-2.1-2.8-4.9-7.2-6-11.2-.1-.4-.2-.9-.3-1.4a2.52,2.52,0,0,1,2-2.9,2.49,2.49,0,0,1,2.6,1.2c.1.3.2.5.3.8.6,3.3,3.6,8.3,5.9,11.2a21.73,21.73,0,0,0,4.2-3.1c-1.9-3.9-3.8-6.5-6-8.2a2.53,2.53,0,0,1-.5-3.5,3.13,3.13,0,0,1,1.1-.9,2.48,2.48,0,0,1,1.7,0l.6.3a19.91,19.91,0,0,1,3,2.8,35.47,35.47,0,0,1,3.2,4.7,7.49,7.49,0,0,0,.5-1.6,2.62,2.62,0,0,1,.5-.9,2.55,2.55,0,0,1,2.6-.9c.2.1.4.1.6.2a2.43,2.43,0,0,1,1.2,2.8c-.2.7-.4,1.3-.6,1.9-3.9,10.1-16.7,14.3-24.3,16Zm29.4-8.1c-.1.1-.1.2-.2.3a19.6,19.6,0,0,1-3.8,5.7,30.54,30.54,0,0,1-15,8.5,40,40,0,0,1-4.8.8h-.2a2.5,2.5,0,0,1-.2-5c9.9-.8,17.4-6.7,19.6-12.2a2.53,2.53,0,0,1,4.7.2A2.52,2.52,0,0,1,166.73,263.48Z"/>

If you open the Pet-86.svg.txt SVG (remove .txt extension) in Illustrator or another tool you will see that for the path above (the ball in the attached svg) the dimensions are not correct.

@Fuzzyma
Copy link
Member

Fuzzyma commented Oct 2, 2021

We rely on the browser implementation for bbox calculations. If there is a bug in the browser, you need to file a bug report at the specific vendor. You can also double check with different browsers. Also: illustrator could be wrong as well

@svenssf
Copy link
Author

svenssf commented Oct 2, 2021 via email

@Fuzzyma Fuzzyma closed this as completed Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants