mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-23 00:04:06 +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:
@@ -37,7 +37,7 @@ export interface SerialisableGraph {
|
||||
nodes?: ISerialisedNode[]
|
||||
links?: SerialisableLLink[]
|
||||
reroutes?: SerialisableReroute[]
|
||||
extra?: Record<any, any>
|
||||
extra?: Dictionary<unknown>
|
||||
}
|
||||
|
||||
export type ISerialisableNodeInput = Omit<INodeInputSlot, "_layoutElement" | "widget"> & {
|
||||
@@ -86,7 +86,9 @@ export interface ISerialisedGraph {
|
||||
groups: ISerialisedGroup[]
|
||||
config: LGraphConfig
|
||||
version: typeof LiteGraph.VERSION
|
||||
extra?: Record<string, unknown>
|
||||
extra?: Dictionary<unknown> & {
|
||||
reroutes?: SerialisableReroute[]
|
||||
}
|
||||
}
|
||||
|
||||
/** Serialised LGraphGroup */
|
||||
|
||||
Reference in New Issue
Block a user