Finds the shortest path between two DiagramNode elements, optionally considering the Weight of nodes and / or links.
Namespace: MindFusion.Diagramming
Package: PathFinder.js
JavaScript Copy Code |
---|
function findShortestPath (from, to, [useNodeWeights, [useLinkWeights]]) |
The first DiagramNode in the Path.
The last DiagramNode in the Path.
If true, the Path with minimal total weight is found, summing the Weight of nodes in the Path.
If true, the Path with minimal total weight is found, summing the Weight of links in the Path.
A Path instance that represents the shortest Path found or null if there is no Path connecting from and to.
NetDiagram Programmer's Guide | © 2023 MindFusion |