Uncaught TypeError: svgDocument.matchAll(...)
vlrmprjct opened this issue · 8 comments
Okay, the regex won't match any <path ... >
tags within the svg. I should add a proper error message for that. Can you provide an example svg?
Sure.
Thank you. The image you provided consists of a lot of <line ... >
segments which are not yet supported. But it also contains three <path ... >
segments which import fine for me:
You can however convert the missing lines to paths using the free software Inkscape. Just open the SVG with Inkscape, select everything (CTRL
+A
) and then convert outlines to paths (Path -> Stroke to Path; CTRL
+ALT
+C
) and save it. After that, the complete image imports fine for me. I've attached the converted image.
Ok.
Thank you for your response.
But the point is the posted samplefile is a valid SVG and it is created with Inkscape.
So can you please provide some DOES and DONT's for SVGs for a successful import ?
Maybe the readme.md ?
There is a reference.svg
in the root of the project. Also, I cannot reproduce the issue shown in your screenshot even with an empty string loaded as SVG. I guess the browser may be the issue. Are you using the desktop version of EasyEDA? I've actually not tested that yet, I use it with Chrome in the Browser. I've read that the Desktop Version ships with an older Browser version. Maybe that is the issue?
Okay, confirmed that. The Desktop Version of EasyEDA ships with Chrome/69.0.3497.128
... String.matchAll()
requires at least Chrome/73
which was released in march 2019. So, for now, the extension will only work in the Browser. I'll have a look if I can find some polyfills to make it also work with that old version.
You are right.
It depends on the browser version.
I testet it in the latest Edge Browser and its working fine with the sample svg above without any changes.