Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagramming for JavaScript, V4.2.2 (Read 189 times)
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 635
Joined: Apr 6th, 2003
Diagramming for JavaScript, V4.2.2
Jun 3rd, 2022 at 6:46am
Print Post  
We have released version 4.2.2 of MindFusion JavaScript Diagram library. It contains the following new features and improvements:

React functional components
The @mindfusion/diagramming-react package now contains functional-component wrappers for the DiagramView and auxiliary controls, and has been upgraded to React 18. Old class-component wrappers have been moved to the @mindfusion/diagramming-react-cc package.

Using the functional components looks like this:
Code
Select All
JSX  Copy Code
const [diagram] = useState(new Diagramming.Diagram());
...
<DiagramView diagram={diagram} {...props}
    onDiagramChanged={(diagram, args) => onDiagramChanged(diagram, args)}
    onNodeCreated={(diagram, args) => onDiagramNodeCreated(diagram, args)} />
 


The DiagramView control exposes a forwardRef, that can be passed on to other controls, such as the Overview and ZoomControl. To obtain a reference to the underlying core controls, use the respective find method of the ref.

Bug fixes
  • Fix for NodeListView not working correctly when hosted nodes contain NodeLabel objects.
  • Fixed exception in dispose method of Overview control if called before the overview is attached to the diagram.

Distribution for the latest version can be downloaded here, or from the clients area on our site:
https://mindfusion.eu/JsDiagramTrial.zip

Updated scripts are also available as @mindfusion/diagramming NPM package.

Enjoy!
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint