SVG shapes instead of stencils

2019-06-11 13:22发布

问题:

I'm new in mxGraph world and trying to find out how to use SVG symbols with mxGraph in JS. I have a number of SVG files that I would like to use with mxGraph instead of converting each of these to stencils. Is there a way to do that? I have tried using SVG symbol as image in shapes but then I have the problem with connections not going all the way into the symbol.

Any suggestions? Thanx in advance.

回答1:

If you just want to use it as an image mxImage can help you.

If you want a special shape for your svg, define it by yourself as a custom shape

or use svg2xml to create a stencil xml.