The list below describes recent changes and additions to JsDiagram:
New in version 2.6
Free-form nodes
A
FreeFormNode collects all points from users' mouse or touch input and displays them as node's outline. To let users draw free-form nodes interactively, set
Behavior to
DrawFreeForms or
LinkFreeForms. Use the
Points property of
FreeFormNode to get or set outline points programmatically. If the
Closed property is set, the node is drawn as a closed shape and its interior filled, or otherwise the node is drawn as a poly-line. If the distance between first and last points drawn by user is shorter than
AutoCloseDistance, the node's
Closed property is automatically set to
true.
AutoCloseDistance default value is Number.MAX_VALUE, so free-form nodes are always closed.
Convert free-form drawings to ShapeNodes
Additional drawing modes, convenient for touch input, convert
FreeFormNode objects drawn by user to
ShapeNode objects with matching shapes. To enable them, set
Behavior to
DrawFreeShapes or
LinkFreeShapes. The shapes against which the user's input is matched are set via diagram's
FreeFormTargets property. By default it contains Rectangle, Decision and Ellipse shapes.
Miscellaneous
- TypeScript definitions for the Diagramming API are now provided in jsdiag.d.ts file.
- nodePasted and linkPasted events are now raised when new DiagramNode and DiagramLink instances are created from clipboard contents.
- VirtualScroll mode fixed for parent div size specified in percent units.
- Fixed bug where the ExpandOnIncoming property specifying link direction for collapse/expand actions did not work correctly.
- Removed several global variables created inadvertently by the control.