jonobr1 / two.js

A renderer agnostic two-dimensional drawing api for the web.
https://two.js.org
MIT License
8.31k stars 455 forks source link

two.load() creates multiple groups #558

Closed Ra1nko closed 3 years ago

Ra1nko commented 3 years ago

Hello there!

Found out that two.load() creates separate group for each element in one image and adds them to scene.

Sandbox with example: https://codesandbox.io/s/staging-wood-3kg6g?file=/src/App.js

I expect that exactly one object will be added when i use two.load

Image for reference: image

Environment (please select one):

two.js version: 0.7.8

jonobr1 commented 3 years ago

Thanks for posting. That certainly looks like a bug! I'll look into this.

jonobr1 commented 3 years ago

Thanks again for posting this issue. The latest dev branch has this resolved (see this commit). In the case of your example, the icon imports at a more consistent scale to the SVG written.