fix mask editor bug under vueNodes (#5953)

## Summary

fix mask editor issues on vueNodes

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5953-fix-mask-editor-bug-under-vueNodes-2856d73d3650810aa8a2e1a94c4d97a6)
by [Unito](https://www.unito.io)
This commit is contained in:
Terry Jia
2025-10-14 20:42:36 -04:00
committed by GitHub
parent 7caad10e93
commit 476d6df1ca
4 changed files with 46 additions and 4 deletions

View File

@@ -331,6 +331,26 @@ export const useNodeOutputStore = defineStore('nodeOutput', () => {
nodeOutputs.value = outputs
}
function updateNodeImages(node: LGraphNode) {
if (!node.images?.length) return
const nodeLocatorId = nodeIdToNodeLocatorId(node.id)
if (nodeLocatorId) {
const existingOutputs = app.nodeOutputs[nodeLocatorId]
if (existingOutputs) {
const updatedOutputs = {
...existingOutputs,
images: node.images
}
app.nodeOutputs[nodeLocatorId] = updatedOutputs
nodeOutputs.value[nodeLocatorId] = updatedOutputs
}
}
}
function resetAllOutputsAndPreviews() {
app.nodeOutputs = {}
nodeOutputs.value = {}
@@ -349,6 +369,7 @@ export const useNodeOutputStore = defineStore('nodeOutput', () => {
setNodeOutputsByExecutionId,
setNodePreviewsByExecutionId,
setNodePreviewsByNodeId,
updateNodeImages,
// Cleanup
revokePreviewsByExecutionId,