The MindFusion Forums
Flow Diagramming Components >> News >> Diagramming for JavaScript, V3.2.1
https://mindfusion.eu/Forum/YaBB.pl?num=1527596266

Message started by Forum Admin on May 29th, 2018 at 12:17pm

Title: Diagramming for JavaScript, V3.2.1
Post by Forum Admin on May 29th, 2018 at 12:17pm
We have released version 3.2.1 of MindFusion JavaScript Diagram library. It contains the following new features and improvements:

Path finding
The PathFinder class provides methods that help you find paths and cycles in a graph:

  • findShortestPath(from, to) finds the shortest path between two DiagramNode objects;
  • findLongestPath(from, to) finds the longest path between the specified DiagramNode objects;
  • findCycle(participant) detects whether the specified DiagramNode participates in a cycle;
  • findAllPaths(from, to) finds all paths that exist between two DiagramNode objects;
  • findAllCycles() finds all cycles in the underlying diagram;

Path objects returned by these methods contain nodes, links and items arrays containing sequences of elements in the path. New PathFinder sample page included in distribution demonstrates path finding and animations over the found paths.

Embedded hyperlinks
Nodes and Text components with style text enabled can now contain <a> tags to create hyperlinks. When a link is clicked, the control raises hyperlinkClicked event to let you implement navigation:

[code]
// node is a ShapeNode instance
node.setText("test <a='http://mindfusion.eu'>link</a> test");
node.setEnableStyledText(true);

//...

// attach an event listener to the hyperlinkClicked event
diagram.addEventListener(Events.hyperlinkClicked, onHyperlinkClicked);

function onHyperlinkClicked(sender, args)
{
    window.open(args.getHyperlink());
} [/code]
Miscellaneous

  • The serializeTag event lets you save complex Tag and Id objects in XML format.
  • Various arrowhead rendering fixes.

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 diagram-library NPM package.
    
Enjoy!

The MindFusion Forums » Powered by YaBB 2.6.11!
YaBB Forum Software © 2000-2024. All Rights Reserved.