mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-04 20:50:06 +00:00
[Bug] Fix remove of floatingLinks (#792)
Resolves https://github.com/Comfy-Org/litegraph.js/issues/791 This PR fixes removal of floating links. --------- Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
This commit is contained in:
@@ -32,6 +32,18 @@ describe("LGraph", () => {
|
||||
const fromOldSchema = new LGraph(oldSchemaGraph)
|
||||
expect(fromOldSchema).toMatchSnapshot("oldSchemaGraph")
|
||||
})
|
||||
|
||||
describe("Reroutes", () => {
|
||||
test("Floating reroute should be removed when node and link are removed", ({ expect, floatingLinkGraph }) => {
|
||||
const graph = new LGraph(floatingLinkGraph)
|
||||
expect(graph.nodes.length).toBe(1)
|
||||
graph.remove(graph.nodes[0])
|
||||
expect(graph.nodes.length).toBe(0)
|
||||
expect(graph.links.size).toBe(0)
|
||||
expect(graph.floatingLinks.size).toBe(0)
|
||||
expect(graph.reroutes.size).toBe(0)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe("Legacy LGraph Compatibility Layer", () => {
|
||||
|
||||
Reference in New Issue
Block a user