mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
[API] Fix several floating links issues & add Reroute.totalLinks (#815)
Resolves several issues with floating links. Highlights: - Caches floating links on slots, removing some loop checks (inefficient / does not scale) - Simpler APIs - Adds `Reroute.totalLinks` (regular and floating
This commit is contained in:
@@ -221,7 +221,7 @@ export class LLink implements LinkSegment, Serialisable<SerialisableLLink> {
|
||||
|
||||
for (const reroute of reroutes) {
|
||||
reroute.linkIds.delete(this.id)
|
||||
if (!keepReroutes && !reroute.linkIds.size && !reroute.floatingLinkIds.size) {
|
||||
if (!keepReroutes && !reroute.totalLinks) {
|
||||
network.reroutes.delete(reroute.id)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user