ShapeNode instances are diagram nodes that represent geometric shapes.
Namespace: MindFusion.Diagramming
File: ShapeNode.js
JavaScript Copy Code |
---|
// class |
ShapeNode instance might represent nodes in graphs, tree, process diagrams, and so on. Node's geometry is specified via its shape property. The default shape of new nodes is specified by diagram's defaultShape property. Shapes can be rotated, either interactively using the rotation handle above the node, or programmatically using the rotationAngle property. Shape nodes can display images and text.
Assign an image to be painted inside a node by setting image, imageLocation or imageContent properties. Image position and alignment are set via the imagePadding and imageAlign properties.
Text inside a shape node is represented by the text property. Its appearance can be customized using textColor and font properties. To get even richer text formatting, set enableStyledText to true and embed HTML-like formatting tags in the raw text. To make a node big enough to display its text without clipping, call resizeToFitText.
MindFusion.Diagramming.DiagramItem
MindFusion.Diagramming.DiagramNode
MindFusion.Diagramming.ShapeNode
MindFusion.Diagramming.SvgNode