mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 09:14:25 +00:00
[Cleanup] Reroute and serialisation (#767)
- Fixes root cause of minor in-memory-only corruption when deleting reroutes from output slots - Already automatically corrected via serialisation - If `reroutes` or `links` are empty arrays, removes them from newer object-based serialised output entirely - Minor refactors - Removes unused code - Fixes some serialisation types - Adds `ReadonlyLinkNetwork` interface
This commit is contained in:
@@ -111,10 +111,16 @@ export interface IPinnable {
|
||||
unpin(): void
|
||||
}
|
||||
|
||||
export interface ReadonlyLinkNetwork {
|
||||
readonly links: ReadonlyMap<LinkId, LLink>
|
||||
readonly reroutes: ReadonlyMap<RerouteId, Reroute>
|
||||
getNodeById(id: NodeId): LGraphNode | null
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains a list of links, reroutes, and nodes.
|
||||
*/
|
||||
export interface LinkNetwork {
|
||||
export interface LinkNetwork extends ReadonlyLinkNetwork {
|
||||
readonly links: Map<LinkId, LLink>
|
||||
readonly reroutes: Map<RerouteId, Reroute>
|
||||
getNodeById(id: NodeId): LGraphNode | null
|
||||
|
||||
Reference in New Issue
Block a user