This should allow frontend drop the stroke logic in hijack of
`drawNodeShape`. Example usage:
```ts
node.strokeStyles["executionError"] = (this: LGraphNode) =>
app.lastNodeErrors?.[this.id] ? { colour: 'red', thickness: 2 } : undefined
```
- Resolves https://github.com/Comfy-Org/ComfyUI_frontend/issues/3247
Bypasses the logic that automatically removed reroutes that had no
remaining links. Reroutes are now always converted to floating whenever
reroutes are reconnected.
Allows globally setting the bezier control point offset from the reroute
centre point. This can be increased to allow larger curves on longer
links, or set to 0 to completely disable the spline on inter-reroute
link segments.
Currently widget needs to get access to `LGraphCanvas` instance to know
whether the canvas is rendering in low quality (Zoomed out). Usually
canvas object is obtained from `ComfyApp` instance.
This PR passes the lowQuality value to `IWidget.draw` to decouple the
dependency on `LGraphCanvas`.
Example usage with ComfyUI_frontend, via console / devtools:
```ts
const inputIndicators = new InputIndicators(app.canvas)
// Dispose:
inputIndicators.dispose()
```
- Fixes floating inputs have invisible segment after moving
- Fixes floating input can be moved onto existing input link, resulting
in the slot having two links
Prevents nodes connecting links to themselves when moving existing
links.
If moving multiple links with reroutes, this will instead _reconnect_
any links that would become loopbacks, only without any rereoutes.
- Fixes link centre marker highlight drawn over dragged items
- Fixes arrow-style link centre marker drawn twice
- Adds missing centre markers for output floating links
- Adds render sort order for reroutes (more links rendered on top)
Reason: Performance
- 40x slower slot serialisation using randomised data
- Overall 2-3x slower `graph.serialize()` on a 600 node graph
This reverts commit 77465113cd.
- Splits link connect logic out of `LinkConnector` to individual
`RenderLink` classes
- Add support for connecting / reconnecting reroutes in various
configurations
- Adds support for moving existing floating links from outputs / inputs
- Fixes numerous corruption issues when reconnecting reroutes / moving
links
- Tests in separate PR #816
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
### Reroute snap highlight
When connecting links, a simple border now helps to indicate that a
connecting link can be dropped on a reroute below the pointer.
### Reroute ID badges
Optionally, intended for debugging purposes, drawing of ID badges can
also be manually enabled via console.
- Fixes TS types
- Various bug fixes for reroute / link (re)connect
- Adds reroute snap circle when connecting links
- Validates reroutes on drop (part of larger work)
- Prevent nodes linking to themselves