Commit 2356b0b
authored
fix: prevent image preview resize issues when switching to vueNodes mode (#7868)
## Summary
- Fix duplicate rendering issue for image preview nodes when switching
from litegraph to vueNodes mode by setting canvasOnly: true on
ImagePreviewWidget
## Problem
When switching from litegraph to vueNodes mode, image preview nodes
(LoadImage, PreviewImage) had two issues:
1. Node becoming longer: The ImagePreviewWidget was being rendered twice
- once as a WidgetLegacy canvas (with stale computedHeight from
litegraph mode) and once as Vue's ImagePreview component
## Solution
1. Set canvasOnly: true for ImagePreviewWidget so it won't render as
WidgetLegacy in Vue mode (Vue's ImagePreview.vue already handles image
display)
## Screenshots (if applicable)
before
https://github.com/user-attachments/assets/925c4fb4-bc9a-4da5-b8ae-3557c2d3836b
after
https://github.com/user-attachments/assets/5faa6878-c56d-44dd-86f5-728bff9ad58a
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7868-fix-prevent-image-preview-resize-issues-when-switching-to-vueNodes-mode-2e16d73d36508106a058da2f8d17c410)
by [Unito](https://www.unito.io)1 parent dad1eaf commit 2356b0b
File tree
1 file changed
+2
-1
lines changed- src/renderer/extensions/vueNodes/widgets/composables
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
| 372 | + | |
372 | 373 | | |
373 | 374 | | |
374 | 375 | | |
| |||
0 commit comments