Skip to content

Commit

Permalink
Merge pull request #8 from catosaurusrex2003/node-ordering-while-open…
Browse files Browse the repository at this point in the history
…ing-or-closing

fix: nodes maintain ordering while opening or closing
  • Loading branch information
AceTheCreator authored Dec 19, 2024
2 parents 9c87f1f + 40df70b commit 165bfd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "schyma",
"version": "1.0.6",
"version": "1.0.7",
"description": "JSON Schemas Visualizer React component",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down
4 changes: 3 additions & 1 deletion src/utils/dagreUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export const getLayoutedElements = (nodes: Node[], edges: Edge[], direction = 'L
dagreGraph.setEdge(edge.source, edge.target)
})

dagre.layout(dagreGraph)
dagre.layout(dagreGraph, {
disableOptimalOrderHeuristic: true,
})

nodes.forEach((node: Node) => {
const nodeId = node.id
Expand Down

0 comments on commit 165bfd5

Please sign in to comment.