mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 17:10:07 +00:00
13 lines
349 B
TypeScript
13 lines
349 B
TypeScript
import { useExtensionService } from '@/services/extensionService'
|
|
|
|
useExtensionService().registerExtension({
|
|
name: 'Comfy.ImageCrop',
|
|
|
|
async nodeCreated(node) {
|
|
if (node.constructor.comfyClass !== 'ImageCropV2') return
|
|
|
|
const [oldWidth, oldHeight] = node.size
|
|
node.setSize([Math.max(oldWidth, 300), Math.max(oldHeight, 450)])
|
|
}
|
|
})
|