Litegraph Reroute Beta (#1421)

* Add Reroute support - ConnectingLinkImpl

Bonus: TS strict

* Add Reroute support

* Remove unused TS expect error

* Add reroute beta opt-in option

* Add settings option: Middle-click reroute node

* Add settings: Link Markers

* Move settings

* Update litegraph

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
filtered
2024-11-13 03:46:14 +11:00
committed by GitHub
parent 40f9b881f3
commit feafbf9cbf
6 changed files with 84 additions and 34 deletions

View File

@@ -104,6 +104,12 @@ watchEffect(() => {
)
})
watchEffect(() => {
LiteGraph.middle_click_slot_add_default_node = settingStore.get(
'Comfy.Node.MiddleClickRerouteNode'
)
})
watchEffect(() => {
nodeDefStore.showDeprecated = settingStore.get('Comfy.Node.ShowDeprecated')
})
@@ -134,6 +140,24 @@ watchEffect(() => {
}
})
watchEffect(() => {
const linkMarkerShape = settingStore.get('Comfy.Graph.LinkMarkers')
const { canvas } = canvasStore
if (canvas) {
canvas.linkMarkerShape = linkMarkerShape
canvas.setDirty(false, true)
}
})
watchEffect(() => {
const reroutesEnabled = settingStore.get('Comfy.RerouteBeta')
const { canvas } = canvasStore
if (canvas) {
canvas.reroutesEnabled = reroutesEnabled
canvas.setDirty(false, true)
}
})
watchEffect(() => {
if (!canvasStore.canvas) return