vscode-interactive-graphviz
vscode-interactive-graphviz copied to clipboard
Node images not showing in preview
With a test.dot file like:
digraph D { a [shape="none" label="Node a"; image="actor.png"]; b; a->b; }
and assuming actor.png is on the same folder as the dot file, the preview doesn't include an image object in the generated svg. Verified this by opening preview in the default browser. However, running this in the command line:
dot -Tsvg test.dot
makes graphviz to include the image when generating output, proving that graphviz does generate images for the node. Could I be missing an attribute, configuration or something?
The extension does not use dot but d3-graphviz. D3-Graphviz already supports images in the API: https://github.com/magjac/d3-graphviz#images.
However, since VS Code shields file system access it's not that easy to bring images to the extension.
I have a version that replaces reference to images in the workspace with protected reference names, but since involves replacing stuff in a script, I'm not sure how secure it would be.

I could submit a PR with my attempt.
use unicode https://emojis.wiki/person-fencing/ :)