mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 14:27:40 +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:
@@ -380,11 +380,15 @@ export class ComfyApp {
|
||||
const paintedIndex = selectedIndex + 1
|
||||
const combinedIndex = selectedIndex + 2
|
||||
|
||||
// for vueNodes mode
|
||||
const images =
|
||||
node.images ?? useNodeOutputStore().getNodeOutputs(node)?.images
|
||||
|
||||
ComfyApp.clipspace = {
|
||||
widgets: widgets,
|
||||
imgs: imgs,
|
||||
original_imgs: orig_imgs,
|
||||
images: node.images,
|
||||
images: images,
|
||||
selectedIndex: selectedIndex,
|
||||
img_paste_mode: 'selected', // reset to default im_paste_mode state on copy action
|
||||
paintedIndex: paintedIndex,
|
||||
@@ -411,7 +415,8 @@ export class ComfyApp {
|
||||
ComfyApp.clipspace.imgs[ComfyApp.clipspace.combinedIndex].src
|
||||
}
|
||||
if (ComfyApp.clipspace.imgs && node.imgs) {
|
||||
if (node.images && ComfyApp.clipspace.images) {
|
||||
// Update node.images even if it's initially undefined (vueNodes mode)
|
||||
if (ComfyApp.clipspace.images) {
|
||||
if (ComfyApp.clipspace['img_paste_mode'] == 'selected') {
|
||||
node.images = [
|
||||
ComfyApp.clipspace.images[ComfyApp.clipspace['selectedIndex']]
|
||||
@@ -513,6 +518,8 @@ export class ComfyApp {
|
||||
}
|
||||
|
||||
app.graph.setDirtyCanvas(true)
|
||||
|
||||
useNodeOutputStore().updateNodeImages(node)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user