Add Comfy.Workflow.SortNodeIdOnSave setting (#502)

* Update litegraph (Sort order)

* nit

* Add sort node on save setting

* nit
This commit is contained in:
Chenlei Hu
2024-08-17 23:23:40 -04:00
committed by GitHub
parent 9d3ca763d0
commit d8887a434d
6 changed files with 25 additions and 11 deletions

View File

@@ -29,11 +29,11 @@ describe('LGraph', () => {
const node2 = new DummyNode()
const graph = createGraph(node1, node2)
const result1 = graph.serialize()
const result1 = graph.serialize({ sortNodes: true })
expect(result1.nodes).not.toHaveLength(0)
// @ts-expect-error
// @ts-expect-error Access private property.
graph._nodes = swapNodes(graph._nodes)
const result2 = graph.serialize()
const result2 = graph.serialize({ sortNodes: true })
expect(result1).toEqual(result2)
})