Cleanup: Litegraph/Vue synchronization work (#5789)

## Summary

Cleanup and fixes to the existing syncing logic.

## Review Focus

This is probably enough to review and test now.

Main things that should still work: 
- moving nodes around
- adding new ones
- switching back and forth between Vue and Litegraph

Let me know if you find any bugs that weren't already present there.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5789-WIP-Litegraph-Vue-synchronization-work-27a6d73d3650811682cacacb82367b9e)
by [Unito](https://www.unito.io)
This commit is contained in:
Alexander Brown
2025-09-27 16:01:59 -07:00
committed by GitHub
parent 042c2caa88
commit 840f7f04fa
16 changed files with 148 additions and 415 deletions

View File

@@ -140,7 +140,6 @@ export function addValueControlWidgets(
valueControl.tooltip =
'Allows the linked widget to be changed automatically, for example randomizing the noise seed.'
// @ts-ignore index with symbol
valueControl[IS_CONTROL_WIDGET] = true
updateControlWidgetLabel(valueControl)
const widgets: [IComboWidget, ...IStringWidget[]] = [valueControl]
@@ -273,12 +272,10 @@ export function addValueControlWidgets(
valueControl.beforeQueued = () => {
if (controlValueRunBefore()) {
// Don't run on first execution
// @ts-ignore index with symbol
if (valueControl[HAS_EXECUTED]) {
applyWidgetControl()
}
}
// @ts-ignore index with symbol
valueControl[HAS_EXECUTED] = true
}