bartbutenaers / node-red-contrib-ui-svg

A Node-RED widget node to show interactive SVG (vector graphics) in the dashboard
Apache License 2.0
93 stars 27 forks source link

SVGWindowCtrl error while loading in DrawSvg #39

Open bartbutenaers opened 4 years ago

bartbutenaers commented 4 years ago

When I install it on: 3 Oct 15:43:49 - [info] Node-RED version: v0.19.5 3 Oct 15:43:49 - [info] Node.js version: v8.10.0

By default the SVG source only contains this:

<svg height="100" width="100">
</svg>

Chrome shows me a popup when I try to open the DrawSvg iframe: SVGWindowCtrl error while loading (TypeError) : Cannot read property 'Qv' of null

And then DrawSvg shows a popup : image

Will need to test if the default SVG string is perhaps a bit too minimalistic (e.g. namespaces ...)

bartbutenaers commented 4 years ago

Steve (@Steve-Mcl), I get that DrawSvg error as soon as I remove at least one of the namespaces from the SVG element... Not sure whether we should handle this or DrawSvg? When I remove the namespaces, I don't get an error by the Ace editor. So I assume the SVG is correct, so DrawSvg could add the namespaces automatically if not availalbe?