Line data Source code
1 : import { nextTick } from 'vue'
2 :
3 : import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
4 : import type { ComfyExtension } from '@/types/comfy'
5 :
6 24 : export const cameraInfoExtension: ComfyExtension = {
7 : name: 'Comfy.CreateCameraInfo',
8 :
9 : async nodeCreated(node: LGraphNode) {
10 26 : if (node.constructor.comfyClass !== 'CreateCameraInfo') return
11 :
12 0 : const [oldWidth, oldHeight] = node.size
13 0 : node.setSize([Math.max(oldWidth, 360), Math.max(oldHeight, 480)])
14 :
15 0 : await nextTick()
16 : }
17 : }
|