ASP.NET Pack Programmer's Guide
SvgNode Class
Remarks See Also
 





SvgNode instances are diagram nodes that can render SVG drawings.

Namespace: MindFusion.Diagramming
Package: SvgNode.js

 Syntax

JavaScript  Copy Code

// class
SvgNode.prototype = {}

 Remarks

An SvgNode instance represents nodes that can display SVG drawings in addition to the rendering provided by the base ShapeNode class. The SVG drawing of a node is specified through its Content property. The SVG graphics are loaded and associated with the node through an SvgContent object, which should be initialized and then assigned to this property. Note that the MIME type of .svg files on server should be set to image/svg+xml.

 Example

The following code illustrates how to load SVG graphics from a server file and associate it with a new SvgNode:

JavaScript  Copy Code
var node = diagram.getFactory().createSvgNode(bounds);
node.setTransparent(true); // hide ShapeNode geometry

var svg = new SvgContent();
svg.parse("image.svg");
node.setContent(svg);

 See Also

SvgNode Members
MindFusion.Diagramming Namespace