mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-25 00:39:49 +00:00
[Cleanup] Removed unused convenience setter - reroutes (#768)
- New features are making the reroutes convenience setter unmanageable. - Not currently in use. - Prefer `configure()`, as it includes validation.
This commit is contained in:
@@ -144,23 +144,6 @@ export class LGraph implements LinkNetwork, Serialisable<SerialisableGraph> {
|
|||||||
return this.#reroutes
|
return this.#reroutes
|
||||||
}
|
}
|
||||||
|
|
||||||
public set reroutes(value: Map<RerouteId, Reroute>) {
|
|
||||||
if (!value) throw new TypeError("Attempted to set LGraph.reroutes to a falsy value.")
|
|
||||||
|
|
||||||
const reroutes = this.#reroutes
|
|
||||||
if (value.size === 0) {
|
|
||||||
reroutes.clear()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const rerouteId of reroutes.keys()) {
|
|
||||||
if (!value.has(rerouteId)) reroutes.delete(rerouteId)
|
|
||||||
}
|
|
||||||
for (const [id, reroute] of value) {
|
|
||||||
reroutes.set(id, reroute)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @deprecated See {@link state}.{@link LGraphState.lastNodeId lastNodeId} */
|
/** @deprecated See {@link state}.{@link LGraphState.lastNodeId lastNodeId} */
|
||||||
get last_node_id() {
|
get last_node_id() {
|
||||||
return this.state.lastNodeId
|
return this.state.lastNodeId
|
||||||
|
|||||||
Reference in New Issue
Block a user