mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-11 16:10:05 +00:00
Update litegraph (link snap to slot & highlight) (#1378)
* Update litegraph (link snap) * Add settings * nit * Add playwright test * Update test expectations [skip ci] --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -85,6 +85,16 @@ watchEffect(() => {
|
||||
}
|
||||
})
|
||||
|
||||
watchEffect(() => {
|
||||
LiteGraph.snaps_for_comfy = settingStore.get('Comfy.Node.AutoSnapLinkToSlot')
|
||||
})
|
||||
|
||||
watchEffect(() => {
|
||||
LiteGraph.snap_highlights_node = settingStore.get(
|
||||
'Comfy.Node.SnapHighlightsNode'
|
||||
)
|
||||
})
|
||||
|
||||
watchEffect(() => {
|
||||
nodeDefStore.showDeprecated = settingStore.get('Comfy.Node.ShowDeprecated')
|
||||
})
|
||||
|
||||
@@ -458,5 +458,23 @@ export const CORE_SETTINGS: SettingParams[] = [
|
||||
{ value: LiteGraph.SPLINE_LINK, text: 'Spline' },
|
||||
{ value: LiteGraph.HIDDEN_LINK, text: 'Hidden' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Node.AutoSnapLinkToSlot',
|
||||
name: 'Auto snap link to node slot',
|
||||
tooltip:
|
||||
'When dragging a link over a node, the link automatically snap to a viable input slot on the node',
|
||||
type: 'boolean',
|
||||
defaultValue: true,
|
||||
versionAdded: '1.3.29'
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Node.SnapHighlightsNode',
|
||||
name: 'Snap highlights node',
|
||||
tooltip:
|
||||
'When dragging a link over a node with viable input slot, highlight the node',
|
||||
type: 'boolean',
|
||||
defaultValue: true,
|
||||
versionAdded: '1.3.29'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -502,7 +502,9 @@ const zSettings = z.record(z.any()).and(
|
||||
'Comfy.Keybinding.NewBindings': z.array(zKeybinding),
|
||||
'Comfy.Extension.Disabled': z.array(z.string()),
|
||||
'Comfy.Settings.ExtensionPanel': z.boolean(),
|
||||
'Comfy.LinkRenderMode': z.number()
|
||||
'Comfy.LinkRenderMode': z.number(),
|
||||
'Comfy.Node.AutoSnapLinkToSlot': z.boolean(),
|
||||
'Comfy.Node.SnapHighlightsNode': z.boolean()
|
||||
})
|
||||
.optional()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user