The list below describes recent changes and additions to JsDiagram:
New in version 4.4.4
New mouse events
- nodePointed event has been replaced by a set of more specific events: nodePointerEnter and nodePointerLeave are raised when the mouse pointer respectively enters or leaves the boundaries of a node. nodeHovered fires if the pointer rests over a node for hoverDelay milliseconds.
- linkPointed event has been replaced by a set of more specific events: linkPointerEnter and linkPointerLeave are raised when the mouse pointer respectively enters or leaves the boundaries of a link. linkHovered fires if the pointer rests over a link for hoverDelay milliseconds.
Miscellaneous
- Enable the autoDeleteChildren property to automatically delete child nodes when a container is deleted.
- Fix for custom Shape definitions not setting the id property.
- Fix for selected property setter of DiagramItem not immediately reflecting assigned value due to async calls.
API changes
New in version 4.4.3
- Due to problems with some script loaders, the library no longer registers web components automatically. Call the WebComponents.register method to explicitly register component classes.
- Set cornerRadius to change the size of corners when node's shape is set to a rounded rectangle.
- Set the autoDeleteLinks property to false to prevent deleting links along with a node they connect, and disconnect the links instead.
- Fixed a bug where child nodes keep reference to their deleted container.
New in version 4.4.2
TableNode improvements
TabbedDiagramView improvements
- Enable allowRenamePages to let users edit the title of DiagramPage by clicking the active tab.
- The control raises pageAdding event when users click the plus icon to let you validate the operation, and pageAdded once the page is added.
- The control raises pageRemoving event when users close a tab to let you validate the operation, and pageRemoved once the page is removed.
- Fix for scroll range not updating when changing tabs.
Miscellaneous
New in version 4.4.1
New in version 4.4
Web components
The library registers each control class as a web component. You can use the following tags to create corresponding components:
- <mindfusion-diagramview> creates a DiagramView instance.
- <mindfusion-ruler> creates a Ruler instance.
- <mindfusion-zoomcontrol> creates a ZoomControl instance.
- <mindfusion-overview> creates an Overview instance.
- <mindfusion-nodelistview> creates a NodeListView instance.
When instantiated as a web component, each control class creates required HTML elements as internal shadow DOM. You can get the JavaScript object corresponding to a web component by calling controls' find method with id argument.
HTML
Copy Code
|
---|
<mindfusion-diagramview id="diagramView" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: auto;"> </mindfusion-diagramview> |
JavaScript
Copy Code
|
---|
var diagramView = DiagramView.find("diagramView"); var diagram = diagramView.diagram; |
Animations
The library now includes several standard animation classes and methods.
The animate method of DiagramItem can run following animations:
Following animations can be applied to DiagramNodes:
The animate method of DiagramView can run following animations:
DiagramLink improvements
- Set the intermediateShape property to display arrowheads at the middle of each link segment. This could help users follow longer link paths. Intermediate arrowheads can be customized further by setting intermediateBrush and intermediateShapeSize.
- Set the allowSplitLinks property of Diagram to let users insert new link segments by dragging any point of a selected link's segment. In this mode users can also merge link segments by making them close to collinear, or by moving adjustment handles close to each other, as set via mergeThreshold.