mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 17:30:07 +00:00
Add Reroutes (#301)
* Add Reroute - Initial Reroute implementation - LLink and Reroute both implement the new LinkSegment interface - LinkSegments can have a parentId, which always points to a Reroute * Narrow TS type of schema v0.4 extras * Add reroutes to schema 0.4 Use extras.reroutes to store additional data * Add Reroute POC to LLink * Add Reroute rendering * Add Reroute context menu - Delete Reroute * Update delete selected - include reroutes & groups * Add Reroute select & move * Include reroutes in area-select * Move disconnect link logic to LLink * Add Reroute connect * nit * Add Reroute support - connecting links * Add Add Reroute from link menu (menu) * nit * Add shift-drag from reroute to add new link * Prevent Reroutes from disappearing Add keepReroutes option to prevent Reroute GC * Add fourth param to connectInputToOutput * Allow both connecting in/out to be null * Move ConnectingLink start pos to Reroute * Add link render options * Refactor renderLink - spline / bezier * Refactor renderLink - linear, straight * Fix centre points on all link types Improves link render time * [Refactor] Generic recursive interface / flat set * nit * Allow Reroutes to be members of groups * Start links from the closest reroute For the "shift-click drag link from link" feature * Add Reroutes using alt-click on link paths * nit - Refactor * nit - Refactor * Fix reroute deselect UX Temporary workaround * Add Reroute link centre-marker handling * Add optional link arrow markers Add enum for link markers -> Pointing the way forward -> Set default centre marker to arrow * Add module export: LinkMarkerShape * Add link arrow direction for all link types * Add Reroute auto-swivel with custom curves * Add state switch to disable reroutes Works at root of all canvas interactions, should leave existing reroutes untouched but invisible until e.g. links are edited / changed. * Fix cannot deselect when reroutes disabled * Include reroutes in select-all
This commit is contained in: