bartbutenaers / node-red-contrib-ui-svg

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

performance .... #91

Open JoeWiseman opened 3 years ago

JoeWiseman commented 3 years ago

Hi @bartbutenaers this not really an issue but more a question of how to avoid a problem in the future ... I want to buil a UI for IoT with your node. In the Backgroud I habe a png rendered by SmartHome3D (about 2MB). The site will only be accessed from within the local network.

Is it better to place the PNG-code wihtin the SVG-data or is it better to put it as a background image into node-red's dashboard itself?

Would be great to get some help.

Joe

JoeWiseman commented 3 years ago

Hi,

I just figured out how to display an underlying bitmap other than including it into the SVG-code. My Floorplan is a rendered by SmartHome3D and is about 2MB. Because my GUI shoould only be accessed from the local network the size is not a problem for transfering data to the client ;-) But when inserting the PNG-code into my SVG-code Node Red is giving an error that payload is too long ....

My first thought was to set the image as background in the dashboards group. But as I found out I was not able to set the background of the node-red-contrib-ui-svg. Setting the background to transparent works fine for the standard elements like button or slider, but not for the SVG-node. Maybe there is an issue wihtin the CSS that the styles are not exactley set to the values of the standard dashboard-element?

Yesterday I red here https://github.com/bartbutenaers/node-red-contrib-ui-svg/issues/35 in a post from @andreypopov after clsing the issue about the possibility to use a link from within the SVG-code which works fine for me.

Regards Joe