mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 06:44:32 +00:00
## Summary using the new hideOutputImages flag for image crop. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8873-fix-hide-output-images-for-ImageCropV2-node-3076d73d365081079839dfc9b801606c) by [Unito](https://www.unito.io)
14 lines
382 B
TypeScript
14 lines
382 B
TypeScript
import { useExtensionService } from '@/services/extensionService'
|
|
|
|
useExtensionService().registerExtension({
|
|
name: 'Comfy.ImageCrop',
|
|
|
|
async nodeCreated(node) {
|
|
if (node.constructor.comfyClass !== 'ImageCropV2') return
|
|
|
|
node.hideOutputImages = true
|
|
const [oldWidth, oldHeight] = node.size
|
|
node.setSize([Math.max(oldWidth, 300), Math.max(oldHeight, 450)])
|
|
}
|
|
})
|