We have released version 4.7 of MindFusion JavaScript Diagram library. It contains the following new features and improvements:
ItemListView componentItemListView supersedes NodeListView and lets you show both nodes and links in the list. Items can be added by calling addItem method, and removed by calling removeItem. defaultNodeSize property from NodeListView is called newInstanceSize in the new class. The autoConnectLinks and autoConnectDistance properties control whether links created via drag-and-drop should connect to nearby nodes in the target diagram. ItemListView also provides more properties for customizing the list layout, such as columns and labelPosition. For compatibility with legacy code, NodeListView won't be removed from the library, bit it won't be getting any new improvements.
Palette componentThe Palette control represents a tool palette that displays DiagramItem objects grouped into categories. It implements Accordion user interface that displays ItemListView components as its child panels, and category icon, title and collapse/expand button in pane headers. Each child ItemListView displays the items added to its corresponding category. Call the addCategory method to define a category and create its respective accordion pane. Call addItem to add an item to specified category. Palette provides same layout and appearance properties as the ItemListView class.
ItemLabel imageNew image and imageLocation properties added to ItemLabel let you display icons along a link's geometry, or add more images to a ShapeNode. If a label contains both text and image, their relative position is specified by imageAlign property (by default the image is placed on left side of text), and distance by contentPadding. The image is rendered using bitmap's intrinsic size, unless you override it by setting imageSize property. You can treat label images as clickable icons by handling linkClicked or nodeClicked events and checking label argument passed to their handlers.
Miscellaneous- locked property added to ItemLabel. It lets you prevent users from editing label's text, and moving it when behavior is set to MoveLabels.
- label argument now provided with item click and double click events.
- Improved repaint speed of Overview component.
API Changes- iconSize value of NodeListView now depends on view's measureUnit property.
Distribution for the latest version can be downloaded here, or from the
clients area on our site:
https://mindfusion.eu/JsDiagram.zipUpdated scripts are also available as
@mindfusion/diagramming NPM package.
Enjoy!