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

Error loading SVG file #12

Closed
T-bond opened this issue Aug 30, 2016 · 5 comments
Closed

Error loading SVG file #12

T-bond opened this issue Aug 30, 2016 · 5 comments
Labels

Comments

@T-bond
Copy link

T-bond commented Aug 30, 2016

Hello.

I'm trying to load my SVG file, but I got js error in the Developer Console.

index.js:9 Uncaught TypeError: Cannot read property '_intersection' of null
(Google Chrome 52.0.2743.116 m (64-bit))

In Microsoft Edge:
The following popup appears:

Invalid SVG file
Please use a real SVG file instead.

My SVG file
It is a minified, simplified version of the svg made in Inkscape. (None of the option worked by default during export from Inkscape)
Simplified by: https://jakearchibald.github.io/svgomg/

I tried the example svg-s from this repo, and tried to edit the path, but it gives the same error.
There is a problem with the svg or with the generator?

@Maddoc42
Copy link
Owner

Hey @T-bond, thanks for reporting this issue.

The icon you are trying to convert contains two open paths with a large stroke width, which makes up the roof and walls. The shadow generator only works with closed paths.

Inkscape has a cool little tool for exactly that purpose. If you select your path, go to "Path" -> "Stroke to Path" and the result will be two closed paths. That should work fine with the shadow generator.

To illustrate what I mean:

Original icon (open paths)
house1

Updated icon (closed paths)
house2

Final result
ic_launcher

Does that makes sense?

@Maddoc42
Copy link
Owner

On a second thought, that should probably be included as part of a FAQ. Do you mind if I take your house icon as an example?

@T-bond
Copy link
Author

T-bond commented Aug 30, 2016

Thanks. It worked.
You can use the icon as an example. :)
But the Chrome should show the same popup, or not?

@Maddoc42 Maddoc42 added bug and removed question labels Aug 30, 2016
@Maddoc42
Copy link
Owner

Yes, nice catch 😳 Chrome doesn't display anything at all (other than console), that's a 🪲!

@Maddoc42
Copy link
Owner

The generator now shows a custom error msg on open paths, c10a714 should fix that.

Thanks again @T-bond for finding this 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants