Skip to content

Commit

Permalink
feat: 增加计算两点间所有路径的逻辑,并发布到npm
Browse files Browse the repository at this point in the history
  • Loading branch information
hxgqh committed Mar 5, 2022
1 parent 712d538 commit 4d7b14a
Show file tree
Hide file tree
Showing 3 changed files with 9,632 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ Return all paths, data format is: [ [ node, edge, node, edge, ... ], ... ]
> options
> - maxPaths: limit the maximum number of paths. default is -1, means unlimited
> - rootIds: manually specify the root(s). if it is empty, will automatically calculate
> - directed: boolean. default: false
> - target: string. default: null

`cy.elements().cytoscapeAllPathsTo(target, settings)`

> - target: string. The target node ID
> - settings: object. The existing settings object with keys rootIds and maxPaths
cytoscapeAllPathsTo is an alias of cytoscapeAllPaths({directed: true, target: "YOUR_TARGET", ...})


## Build targets
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cytoscape-all-paths",
"version": "0.1.0",
"name": "hm-cytoscape-all-paths",
"version": "0.1.2",
"description": "Get all possible paths",
"main": "cytoscape-all-paths.js",
"author": {
Expand Down
Loading

0 comments on commit 4d7b14a

Please sign in to comment.