-
Notifications
You must be signed in to change notification settings - Fork 27
Local server images in DrawSvg #35
Comments
Hi, Example: I want to find all lines intersecting with a systems boundary and add their names in a textbox. Any Idea how i can find those intersections with node-red? |
Hi @tkirchm, Pushing an image into the SVG node is indeed something we had considered at the time being. However then the image is not always available. For example when you edit the drawing via DrawSvg (or via another third party SVG editor tool), you won't have the image available there. Which makes it harder to create a nice drawing. For example when you have a background image of your home, and you want to draw icons at the correct locations. Not easy when inject your images afterwards at runtime ... P.S. To find intersection points of lines with Javascript, multiple tutorials are available like here on Stackoverflow. But please keep this issue dedicated to local server images ... |
Hi @bartbutenaers , I prefer editing my images in Inkscape and therefore it would be easier to work on a samba drive instead of copying the drawing into the node. Can't you tell DrawSVG to load an local image? This flow would also allow me to enrich the svg with information from an database. Something like a option to select an local file and then there would be no svg information stored in the node. Thomas |
Morning @tkirchm , DrawSvg can load a local image for sure, but "local" means on the pc where the flow editor is being displayed. But we need it to get it from the server... Think I have seen something that you want last week in another issue. But not sure where he puts the local file. And had no time yet to contact him again. The option to load the entire SVG dynamically surely is possible, but have lots of other things to do before I can implement something like that... |
That is how I include images: Upload image to node-red's static folder - done! |
Thanks a lot. That looks like the solution I was searching for. |
Hi @andreypopov how do you include svg File from static folder? |
it's been awhile but I'm still thinking about a solution. Can't you store svg content from an msg in your node? My workflow would be to create svg in the node with DrawSVG and get the information to make some calculations and then return the result. An example would be to calculate sum of input in a box and create a text with results. Client side svg would be awesome to get latest information. This flow will be activated by button and so there will always be a client. |
Currently DrawSvg can only display local images when stored on the machine where you are viewing the Node-RED dashboard. But it cannot display local images when stored on the machine where the Node-RED flow is running. Joseph Liard is going to analyze whether a new API could be implemented...
The text was updated successfully, but these errors were encountered: