mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-14 01:20:03 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user