meerk40t / svgelements

SVG Parsing for Elements, Paths, and other SVG Objects.
MIT License
124 stars 28 forks source link

Svgelement automatically assigns height #213

Open mehditvk8 opened 1 year ago

mehditvk8 commented 1 year ago

Hi. I parsed svg that had a rect object that has no height attribute. But svgelement return me an rectangle with height 100000. Is there anyway to solve this or recognize if rect element has height or not?

tatarize commented 1 year ago

A rectangle without a height has a default value of 0 which is degenerate and shouldn't render. Can you give some example code or svg showing behavior which is inconsistent with the spec.