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

Doesn't work on https pages #64

Closed arybitskiy closed 4 years ago

arybitskiy commented 4 years ago

Hi,

I have node-red on a https connection and it doesn't work because editor url is http://drawsvg.org/drawsvg.html. If you would change this line https://github.com/bartbutenaers/node-red-contrib-ui-svg/blob/33ca6da11021086af6142f8b1b4c3e4bf8b26e7a/svg_graphics.html#L336 to

editorUrl: {value: "//drawsvg.org/drawsvg.html"},

That should fix issue.

bartbutenaers commented 4 years ago

Hello @arybitskiy, This issue was already quite some time on my todo list. Very kind of you to share the solution! I will update it in the #panzoom branch which is the version 2.0.0 branch. Thanks a lot!! Bart

bartbutenaers commented 4 years ago

P.S. I have also added a fix to the panzoom branch, to give a (timeout) error after 2 seconds when the popup window cannot be closed (due to invalid editor url):

image