Rendering problem - Forum

Forum Navigation
You need to log in to create posts and topics.

Rendering problem

Sometime, I to face with rendering problem inside VisualNEO Web, but I don't know how to solve that,

i have use the below tag in a div,

<img src="profile.png"  width="100" height="100">

The path of image is correct but it does not render anything.

 

Hi @asmat

Unfortunately, when using HTML code, VisualNEO Web will only show images with absolute paths. An alternative, although I only recommend it for small images, is using base64 enconded images.  When possible, inline vector SVG images are also a good alternative (note that next VisualNEO Web version will be able to manipulate SVG images to a great extent).
Let me know if you have any doubt.

Regards.

asmat has reacted to this post.
asmat

@luishp
@asmat

Unfortunately, when using HTML code, VisualNEO Web will only show images with absolute paths. An alternative, although I only recommend it for small images, is using base64 enconded images.

Another option could be to 'change the src property at run time' ...

1) assuming that the images are in the same folder (or relative folder) as your App, use GetAppBaseURL command to compose the absolute path to the the image ... then replace the image's src property

OR

2) use something like SetObjectAttribute "Image1" "src" "./img/imagefile.jpg" (will need to give the image tag a name/id)

Hope these alternatives work.

 

Please note that the example in the Help file says SetObjectStyle which is incorrect.

 

asmat has reacted to this post.
asmat

Maybe this will help. I have successfully used the variable name to indicate the image file name in this project:

https://github.com/VadimLjovkin/Green-Energy-Graph-for-Web

Use single and double click on the vertices of the graph.

Web version: https://vadimljovkin.github.io/GEG/

asmat has reacted to this post.
asmat

@luishp ,@Gave and @Vadim Thank you so much for your answers.